2025-10-01 17:32:38 +03:30
|
|
|
#version 450 core
|
|
|
|
|
|
2025-12-13 14:23:33 +03:30
|
|
|
layout(push_constant) uniform pc {
|
|
|
|
|
mat4 view_projection;
|
2025-10-26 06:56:18 +00:00
|
|
|
};
|
|
|
|
|
|
2025-12-13 14:23:33 +03:30
|
|
|
struct VertexData
|
|
|
|
|
{
|
|
|
|
|
vec3 position;
|
|
|
|
|
vec3 color;
|
|
|
|
|
};
|
2025-10-01 17:32:38 +03:30
|
|
|
|
2025-12-13 14:23:33 +03:30
|
|
|
layout(std140, set = 0, binding = 0) readonly buffer Vertices {
|
|
|
|
|
|
|
|
|
|
VertexData vertices[];
|
|
|
|
|
} ssbo_vertices;
|
2025-10-01 17:32:38 +03:30
|
|
|
|
|
|
|
|
layout(location = 0) out vec3 out_frag_color;
|
|
|
|
|
|
|
|
|
|
void main()
|
|
|
|
|
{
|
2025-12-13 14:23:33 +03:30
|
|
|
VertexData vertex = ssbo_vertices.vertices[gl_VertexIndex];
|
|
|
|
|
|
|
|
|
|
gl_Position = view_projection * vec4(vertex.position, 1.0);
|
|
|
|
|
out_frag_color = vertex.color;
|
2025-10-01 17:32:38 +03:30
|
|
|
}
|