Files
rust-engine/shaders/triangle.vert
2019-07-25 16:38:42 +02:00

17 lines
375 B
GLSL

#version 450
layout(location = 0) in vec3 position;
layout(location = 0) out vec3 pos;
layout(push_constant) uniform push_constants {
float time;
mat4 model;
mat4 view;
mat4 projection;
} push;
void main() {
gl_Position = push.projection * push.view * push.model * vec4(position + vec3(sin(push.time / 10.), 0., 0.), 1.0);
pos = gl_Position.xyz;
}