light/data/test_assets/triangle.vert

27 lines
477 B
GLSL
Raw Normal View History

2025-10-01 17:32:38 +03:30
#version 450 core
layout(push_constant ) uniform pc {
mat4 view_projection;
};
vec3 positions[3] = vec3[](
vec3(0.0, -0.5, 0.5),
vec3(0.5, 0.5, 0.5),
vec3(-0.5, 0.5, 0.5)
2025-10-01 17:32:38 +03:30
);
vec3 colors[3] = vec3[](
vec3(0.0, 0.0, 0.0),
vec3(0.0, 0.0, 0.0),
vec3(0.0, 0.0, 0.0)
2025-10-01 17:32:38 +03:30
);
layout(location = 0) out vec3 out_frag_color;
void main()
{
gl_Position = view_projection * vec4(positions[gl_VertexIndex], 1.0);
2025-10-01 17:32:38 +03:30
out_frag_color = colors[gl_VertexIndex];
}