engine/assets/shaders/triangle.glsl

24 lines
323 B
GLSL

#if VERTEX_SHADER
vec2 positions[3] = vec2[](
vec2(0.0, -0.5),
vec2(0.5, 0.5),
vec2(-0.5, 0.5)
);
void main() {
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
}
#endif
#if FRAGMENT_SHADER
layout(location = 0) out vec4 FragColor;
void main() {
FragColor = vec4(0.6, 0.8, 1.0, 1.0);
}
#endif