It shows the poligons!

This commit is contained in:
Emil Shanaty
2025-03-22 13:37:42 +03:00
parent 32d684bcc4
commit 2a46168748
2 changed files with 18 additions and 37 deletions
+6 -2
View File
@@ -1,5 +1,9 @@
#version 450
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec3 inNormal;
layout(location = 2) in vec2 inUV;
layout(location = 0) out vec3 fragColor;
vec2 positions[3] = vec2[](
@@ -15,6 +19,6 @@ vec3 colors[3] = vec3[] (
);
void main() {
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
fragColor = colors[gl_VertexIndex];
gl_Position = vec4(inPosition, 1.0);
fragColor = inNormal;
}