2021-12-14 05:44:16 +00:00
|
|
|
#version 450
|
2022-11-21 11:02:18 +00:00
|
|
|
#extension GL_GOOGLE_include_directive : enable
|
2023-01-22 10:23:15 +00:00
|
|
|
#extension GL_EXT_multiview : enable
|
2021-12-14 05:44:16 +00:00
|
|
|
|
2022-11-21 11:02:18 +00:00
|
|
|
layout (set = 0, binding = 0) uniform
|
|
|
|
#include "matrices.h"
|
|
|
|
;
|
2021-12-14 05:44:16 +00:00
|
|
|
|
2021-12-14 16:22:05 +00:00
|
|
|
layout (set = 1, binding = 0) uniform Vertices {
|
|
|
|
vec4 xyuv[4];
|
2021-12-14 05:44:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
layout (push_constant) uniform PushConstants {
|
|
|
|
mat4 Model;
|
|
|
|
int frame;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout (location = 0) out vec2 st;
|
|
|
|
layout (location = 1) out vec4 position;
|
|
|
|
layout (location = 2) out vec3 normal;
|
|
|
|
|
|
|
|
void
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
vec4 v = xyuv[frame * 4 + gl_VertexIndex];
|
|
|
|
|
2021-12-14 16:22:05 +00:00
|
|
|
vec4 pos = Model[3];
|
2021-12-14 05:44:16 +00:00
|
|
|
pos += v.x * Model[1] + v.y * Model[2];
|
|
|
|
|
2023-01-22 10:23:15 +00:00
|
|
|
gl_Position = Projection3d * (View[gl_ViewIndex] * pos);
|
2021-12-14 05:44:16 +00:00
|
|
|
st = v.zw;
|
|
|
|
position = pos;
|
|
|
|
normal = -vec3(Model[0]);
|
|
|
|
}
|