source: opengl-game/shaders/shader.vert@ fd70015

feature/imgui-sdl points-test
Last change on this file since fd70015 was 4befb76, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 5 years ago

Create a bash script for compiling shaders to SPIR-V files

  • Property mode set to 100644
File size: 360 bytes
Line 
1#version 450
2
3layout(location = 0) out vec3 fragColor;
4
5vec2 positions[3] = vec2[](
6 vec2(0.0, -0.5),
7 vec2(0.5, 0.5),
8 vec2(-0.5, 0.5)
9);
10
11vec3 colors[3] = vec3[](
12 vec3(1.0, 0.0, 0.0),
13 vec3(0.0, 1.0, 0.0),
14 vec3(0.0, 0.0, 1.0)
15);
16
17void main() {
18 gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
19 fragColor = colors[gl_VertexIndex];
20}
Note: See TracBrowser for help on using the repository browser.