mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-15 09:21:33 +00:00
c366b1b7bb
It turned out the bindless approach wouldn't work too well for my design of the sprite objects, but I don't think that's a big issue at this stage (and it seems bindless is causing problems for brush/alias rendering via renderdoc and on my versa pro). However, I have figured out how to make effective use of descriptor sets (finally :P). The actual normal still needs checking, but the sprites are currently unlit so not an issue at this stage.
31 lines
511 B
GLSL
31 lines
511 B
GLSL
#version 450
|
|
|
|
layout (set = 0, binding = 0) uniform Matrices {
|
|
mat4 Projection3d;
|
|
mat4 View;
|
|
mat4 Sky;
|
|
mat4 Projection2d;
|
|
};
|
|
|
|
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;
|
|
}
|