pass a uniform

This commit is contained in:
David Allemang
2024-07-08 10:51:42 -04:00
parent 29cd7fa5e5
commit 53d063246b
3 changed files with 57 additions and 12 deletions

View File

@@ -1,11 +1,15 @@
#version 450
layout(location = 0) in vec4 a_pos;
layout(location = 1) in vec3 a_color;
layout (set = 0, binding = 0) uniform CameraBuffer {
mat4 viewproj;
} cam;
layout(location = 0) out vec3 v_color;
layout (location = 0) in vec4 a_pos;
layout (location = 1) in vec3 a_color;
layout (location = 0) out vec3 v_color;
void main() {
gl_Position = a_pos;
gl_Position = a_pos * cam.viewproj;
v_color = a_color;
}