does not work

This commit is contained in:
Emil Shanaty
2025-03-27 15:07:08 +03:00
parent 7cde1b9218
commit a701036dc8
3 changed files with 231 additions and 16 deletions
-1
View File
@@ -1,7 +1,6 @@
#version 450
layout(location = 0) in vec3 fragColor;
layout(location = 0) out vec4 outColor;
void main() {
+18 -12
View File
@@ -1,20 +1,26 @@
#version 450
<<<<<<< Updated upstream
=======
layout(binding = 0) uniform UniformBufferObject {
mat4 model;
mat4 view;
mat4 proj;
} ubo;
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec3 inNormal;
layout(location = 2) in vec2 inUV;
>>>>>>> Stashed changes
layout(location = 0) out vec3 fragColor;
vec2 positions[3] = vec2[](
vec2(0.0, -0.5),
vec2(0.5, 0.5),
vec2(-0.5, 0.5)
);
vec3 colors[3] = vec3[] (
vec3(1.0, 0.0, 0.0),
vec3(0.0, 1.0, 0.0),
vec3(0.0, 0.0, 1.0)
);
void main() {
<<<<<<< Updated upstream
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
fragColor = colors[gl_VertexIndex];
=======
gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
fragColor = inNormal * 0.5 + 0.5;
>>>>>>> Stashed changes
}