summaryrefslogtreecommitdiff
path: root/files/shaders
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2023-11-10 21:30:33 +0200
committerkartofen <mladenovnasko0@gmail.com>2023-11-10 21:30:33 +0200
commit2a733f3d513a7279c1df4efe88fc5386ced2ed14 (patch)
tree800bd6d5c63034b9408d38c7a2b6264297981fbd /files/shaders
parent4512fafc57d2ad95b83c8476781ce105a2cdc4e5 (diff)
uniform buffer added
Diffstat (limited to 'files/shaders')
-rw-r--r--files/shaders/shader1.vert8
1 files changed, 7 insertions, 1 deletions
diff --git a/files/shaders/shader1.vert b/files/shaders/shader1.vert
index 9f27f54..de25828 100644
--- a/files/shaders/shader1.vert
+++ b/files/shaders/shader1.vert
@@ -1,11 +1,17 @@
#version 450
+layout(binding = 0) uniform uniform_buffer {
+ mat4 model;
+ mat4 view;
+ mat4 proj;
+} ubo;
+
layout(location = 0) in vec2 inPosition;
layout(location = 1) in vec3 inColor;
layout(location = 0) out vec3 fragColor;
void main() {
- gl_Position = vec4(inPosition, 0.0, 1.0);
+ gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 0.0, 1.0);
fragColor = inColor;
}