2020-01-20 02:23:41 +00:00
|
|
|
// vim: set ft=glsl:
|
|
|
|
#version 450
|
|
|
|
|
2020-03-14 16:32:05 +00:00
|
|
|
layout(push_constant) uniform UniformBufferObject {
|
2020-03-15 22:48:07 +00:00
|
|
|
mat4 view;
|
2020-01-22 02:33:56 +00:00
|
|
|
} ubo;
|
|
|
|
|
2020-01-20 02:23:41 +00:00
|
|
|
layout(location = 0) in vec3 pos;
|
|
|
|
layout(location = 1) in vec3 color;
|
2020-03-15 22:48:07 +00:00
|
|
|
layout(location = 2) in mat4 model;
|
2020-01-20 02:23:41 +00:00
|
|
|
|
|
|
|
layout(location = 0) out vec3 fragColor;
|
|
|
|
|
|
|
|
out gl_PerVertex {
|
|
|
|
vec4 gl_Position;
|
|
|
|
};
|
|
|
|
|
|
|
|
void main() {
|
2020-03-15 22:48:07 +00:00
|
|
|
gl_Position = ubo.view * model * vec4(pos, 1.0);
|
2020-01-20 02:23:41 +00:00
|
|
|
fragColor = color;
|
2020-01-25 19:20:32 +00:00
|
|
|
|
|
|
|
// Vulkanize
|
|
|
|
gl_Position.y = -gl_Position.y;
|
2020-01-20 02:23:41 +00:00
|
|
|
}
|