21 lines
355 B
GLSL
21 lines
355 B
GLSL
#version 450
|
|
|
|
layout(location = 0) out vec3 frag_normal;
|
|
|
|
layout(push_constant) uniform vp_t {
|
|
mat4 transform;
|
|
} vp;
|
|
|
|
vec2 vertices[4] = vec2[](
|
|
vec2(-1, -1),
|
|
vec2(-1, 1),
|
|
vec2(1, 1),
|
|
vec2(1, -1)
|
|
);
|
|
|
|
void main() {
|
|
const vec2 pos = 3 * vertices[gl_VertexIndex];
|
|
gl_Position = vp.transform * vec4(pos.x, 0, pos.y, 1);
|
|
frag_normal = vec3(0, 1, 0);
|
|
}
|