refactor: update vertex data and add transform matrix in vertex shader

This commit is contained in:
2025-09-15 15:32:19 +02:00
committed by Adrian G L (aider)
parent 41d0819814
commit d3fde9cfc2
2 changed files with 46 additions and 16 deletions

View File

@@ -4,7 +4,16 @@ in layout(location=0) vec3 position;
in layout(location=1) vec4 aColor;
out vec4 vColor;
mat4 transform;
void main() {
gl_Position = vec4(position, 1.0f);
transform = mat4(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0
);
gl_Position = transform * vec4(position, 1.0f);
vColor = aColor;
}