2021-04-24 01:40:39 +00:00
|
|
|
#version 450
|
2022-05-24 15:17:57 +00:00
|
|
|
#extension GL_GOOGLE_include_directive : enable
|
2023-07-30 02:52:13 +00:00
|
|
|
#extension GL_EXT_multiview : enable
|
|
|
|
|
|
|
|
layout (set = 0, binding = 0) buffer ShadowView {
|
|
|
|
mat4x4 shadowView[];
|
|
|
|
};
|
|
|
|
|
|
|
|
layout (push_constant) uniform PushConstants {
|
|
|
|
uint MatrixBase;
|
|
|
|
};
|
2021-04-24 01:40:39 +00:00
|
|
|
|
2022-05-24 15:17:57 +00:00
|
|
|
#include "entity.h"
|
|
|
|
|
|
|
|
layout (set = 1, binding = 0) buffer Entities {
|
|
|
|
Entity entities[];
|
2021-04-24 01:40:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
layout (location = 0) in vec4 vertex;
|
2022-05-24 15:17:57 +00:00
|
|
|
layout (location = 2) in uint entid;
|
2021-04-24 01:40:39 +00:00
|
|
|
|
|
|
|
layout (location = 0) out int InstanceIndex;
|
|
|
|
|
|
|
|
void
|
|
|
|
main (void)
|
|
|
|
{
|
2023-07-30 02:52:13 +00:00
|
|
|
vec4 pos = vec4 (vertex * entities[entid].transform, 1);
|
|
|
|
gl_Position = shadowView[MatrixBase + gl_ViewIndex] * pos;
|
2021-04-24 01:40:39 +00:00
|
|
|
}
|