Files
gpu-renderer/floor-vert.glsl
T
2025-10-04 01:02:55 +01:00

22 lines
368 B
GLSL

#version 450
layout(location = 0) out vec3 frag_normal;
layout(push_constant) uniform vp_t {
mat4 view;
mat4 proj;
} 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.proj * vp.view * vec4(pos.x, 0, pos.y, 1);
frag_normal = vec3(0, 1, 0);
}