quakeforge/libs/video/renderer/vulkan/shader/sprite_depth.vert
Bill Currie b7947b48a5 [vulkan] Move matrices uniform def to a header file
Too many places to keep up to date.
2022-11-21 20:02:18 +09:00

29 lines
506 B
GLSL

#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) uniform Vertices {
vec4 xyuv[4];
};
layout (push_constant) uniform PushConstants {
mat4 Model;
int frame;
};
layout (location = 0) out vec2 st;
void
main (void)
{
vec4 v = xyuv[frame * 4 + gl_VertexIndex];
vec4 pos = Model[3];
pos += v.x * Model[1] + v.y * Model[2];
gl_Position = Projection3d * (View * pos);
st = v.zw;
}