Add MVP projection passed through push constant
This commit is contained in:
1 parent
c770895217
commit
3d10fe76ce
4 files changed
+103
-12
No files matched your search
@@ -1,11 +1,17 @@
|
||||
#version 450
|
||||
|
||||
layout(location = 0) in vec2 position;
|
||||
layout(location = 0) in vec2 pos;
|
||||
layout(location = 1) in vec3 colour;
|
||||
|
||||
layout(location = 0) out vec3 frag_colour;
|
||||
|
||||
layout(push_constant) uniform MVP {
|
||||
mat4 model;
|
||||
mat4 view;
|
||||
mat4 proj;
|
||||
} mvp;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
gl_Position = mvp.proj * mvp.view * mvp.model * vec4(pos, 0.0, 1.0);
|
||||
frag_colour = colour;
|
||||
}
|
||||
Reference in new issue
Block a user