2022-11-09 19:54:42 +00:00
|
|
|
#version 450
|
|
|
|
|
|
|
|
layout (location = 0) out vec4 outColor;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec2 pos;
|
|
|
|
|
|
|
|
if (gl_VertexIndex == 0)
|
|
|
|
{
|
2024-06-06 05:47:06 +00:00
|
|
|
pos = vec2(-1, -1);
|
2022-11-09 19:54:42 +00:00
|
|
|
outColor = vec4(1, 0, 0, 1);
|
|
|
|
}
|
|
|
|
else if (gl_VertexIndex == 1)
|
|
|
|
{
|
2024-06-06 05:47:06 +00:00
|
|
|
pos = vec2(1, -1);
|
2022-11-09 19:54:42 +00:00
|
|
|
outColor = vec4(0, 1, 0, 1);
|
|
|
|
}
|
|
|
|
else if (gl_VertexIndex == 2)
|
|
|
|
{
|
2024-06-06 05:47:06 +00:00
|
|
|
pos = vec2(0, 1);
|
2022-11-09 19:54:42 +00:00
|
|
|
outColor = vec4(0, 0, 1, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
gl_Position = vec4(pos, 0, 1);
|
|
|
|
}
|