Commit 74e15617 authored by Shu's avatar Shu 🍠
Browse files

Indicator pass

parent 7cdb3c63
#version 450 core
layout(push_constant) uniform PushConstants {
mat4 MVP;
layout(binding = 0) uniform UniformBufferObject {
mat4 view;
mat4 proj;
} UBO;
layout(push_constant) uniform PushConst {
mat4 model;
} Push;
layout(location = 0) in vec3 Position_modelspace;
......@@ -10,7 +14,7 @@ layout(location = 1) in vec4 Color_model;
layout(location = 0) out vec4 Color;
void main(){
gl_Position = Push.MVP * vec4(Position_modelspace, 1);
gl_Position = UBO.proj * UBO.view * Push.model * vec4(Position_modelspace, 1);
Color = Color_model;
}
......@@ -3,7 +3,7 @@
layout(binding = 0) uniform UniformBufferObject {
mat4 view;
mat4 proj;
} ubo;
} UBO;
layout (location = 0) in vec3 Position_modelspace;
......@@ -11,7 +11,7 @@ layout (location = 0) out vec3 UV;
void main(){
UV = Position_modelspace;
mat4 view = ubo.view;
mat4 view = UBO.view;
view[3] = vec4(0.0f, 0.0f, 0.0f, 1.0f);
gl_Position = (ubo.proj * view * vec4(Position_modelspace, 1.0)).xyww;
gl_Position = (UBO.proj * view * vec4(Position_modelspace, 1.0)).xyww;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment