Partially added matrices

This commit is contained in:
Ivan Belyavtsev
2025-03-27 17:57:15 +03:00
parent 2a46168748
commit cefbd1b4f7
2 changed files with 321 additions and 100 deletions
+5 -1
View File
@@ -4,6 +4,10 @@ layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec3 inNormal;
layout(location = 2) in vec2 inUV;
layout(binding = 0) uniform UniformBufferObject {
mat4 model;
} ubo;
layout(location = 0) out vec3 fragColor;
vec2 positions[3] = vec2[](
@@ -19,6 +23,6 @@ vec3 colors[3] = vec3[] (
);
void main() {
gl_Position = vec4(inPosition, 1.0);
gl_Position = ubo.model * vec4(inPosition, 1.0);
fragColor = inNormal;
}