push constants
This commit is contained in:
11
tests/shaders/frag4.glsl
Normal file
11
tests/shaders/frag4.glsl
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 450
|
||||
|
||||
layout(location = 0) out vec4 f_color;
|
||||
|
||||
layout(push_constant) uniform PushConstantData {
|
||||
float time;
|
||||
} pc;
|
||||
|
||||
void main() {
|
||||
f_color = vec4(pc.time, 0.5, 1.0, 1.0);
|
||||
}
|
||||
10
tests/shaders/vert4.glsl
Normal file
10
tests/shaders/vert4.glsl
Normal file
@@ -0,0 +1,10 @@
|
||||
#version 450
|
||||
|
||||
layout(location = 0) in vec2 position;
|
||||
|
||||
void main() {
|
||||
vec2 p = position;
|
||||
p.x += 0.2;
|
||||
gl_Position = vec4(p, 0.0, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user