Add floor

This commit is contained in:
Camden Dixie O'Brien committed 2025-10-04 01:02:55 +01:00
1 parent c24d3f4f27
commit 1009952a7b
4 files changed
+120 -15

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#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);
}