abrasion/engine/shaders/forward.vert

25 lines
450 B
GLSL
Raw Normal View History

2020-01-20 02:23:41 +00:00
// vim: set ft=glsl:
#version 450
layout(push_constant) uniform UniformBufferObject {
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;
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() {
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
}