first commit

This commit is contained in:
2026-03-28 22:36:32 +01:00
commit 4ab7f93ac6
39 changed files with 2142 additions and 0 deletions

35
shaders/skybox.vert Normal file
View File

@@ -0,0 +1,35 @@
#version 460 core
// layout (location = 0) in vec3 a_position;
struct PositionData {
float x;
float y;
float z;
};
layout (binding = 0, std430) restrict readonly buffer _positions {
PositionData pos_data[];
};
vec4 getPosition(int index) {
return vec4(
pos_data[index].x,
pos_data[index].y,
pos_data[index].z,
1
);
}
layout (binding = 0, std140) uniform SharedMatrices {
mat4 projection;
mat4 cam_matrix;
};
out vec3 v_texcoord;
void main() {
vec4 a_position = getPosition(gl_VertexID);
vec4 WVP_position = projection * mat4(mat3(cam_matrix)) * a_position;
gl_Position = WVP_position.xyww;
v_texcoord = a_position.xyz;
}