feat: visualize vertex normals as colors by passing normals to fragment shader

This commit is contained in:
2025-10-02 01:04:21 +02:00
parent 07a0b0260d
commit b1d0bbdfb6
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -2,10 +2,13 @@
in layout(location=0) vec3 position;
in layout(location=1) vec4 aColor;
in layout(location=2) vec3 aNormal;
out vec4 vColor;
out vec3 vNormal;
layout(location = 0) uniform mat4 transform;
void main() {
gl_Position = transform * vec4(position, 1.0f);
vColor = aColor;
vNormal = aNormal;
}