This commit is contained in:
2019-07-23 21:55:02 +02:00
parent 7d50d00ab6
commit 1f980e7c12
4 changed files with 91 additions and 38 deletions

View File

@@ -1,7 +1,9 @@
#version 450
layout(location = 0) in vec3 pos;
layout(location = 0) out vec4 f_color;
void main() {
f_color = vec4(0.0, 1.0, 0.0, 1.0);
f_color = vec4(pos, 1.0);
}

View File

@@ -2,10 +2,13 @@
layout(location = 0) in vec3 position;
layout(location = 0) out vec3 pos;
layout(push_constant) uniform push_constants {
float time;
} push;
void main() {
gl_Position = vec4(position + vec3(sin(push.time / 10.), 0., 0.), 1.0);
pos = gl_Position.xyz;
}