Pre-multiply V and P matrices

This commit is contained in:
Camden Dixie O'Brien committed 2025-10-04 14:10:00 +01:00
1 parent e7f4f4b51d
commit 2cf4f6832d
5 files changed
+21 -25

No files matched your search

+2 -3
View File
@@ -3,8 +3,7 @@
layout(location = 0) out vec3 frag_normal;
layout(push_constant) uniform vp_t {
mat4 view;
mat4 proj;
mat4 transform;
} vp;
vec2 vertices[4] = vec2[](
@@ -16,6 +15,6 @@ vec2 vertices[4] = vec2[](
void main() {
const vec2 pos = 3 * vertices[gl_VertexIndex];
gl_Position = vp.proj * vp.view * vec4(pos.x, 0, pos.y, 1);
gl_Position = vp.transform * vec4(pos.x, 0, pos.y, 1);
frag_normal = vec3(0, 1, 0);
}