Files
rust-engine/shaders/triangle.vert
2019-08-13 11:36:40 +02:00

25 lines
542 B
GLSL

#version 450
#extension GL_ARB_separate_shader_objects : enable
layout(location = 0) in vec3 position;
layout(location = 1) in vec2 uv;
layout(location = 0) out vec2 tex_coords;
//layout(binding = 0) uniform UniformBufferObject {
// mat4 view;
// mat4 projection;
// float time;
//} ubo;
layout(push_constant) uniform PushConstants {
mat4 model;
mat4 view;
mat4 projection;
float time;
} push;
void main() {
gl_Position = push.projection * push.view * push.model * vec4(position, 1.0);
tex_coords = uv;
}