- Timestamp:
- Jul 23, 2019, 4:02:06 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- d9ef6ab
- Parents:
- 8667f76
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/shader.vert
r8667f76 r80edd70 1 1 #version 450 2 3 layout(location = 0) in vec2 inPosition; 4 layout(location = 1) in vec3 inColor; 2 5 3 6 layout(location = 0) out vec3 fragColor; 4 7 5 vec2 positions[3] = vec2[](6 vec2(0.0, -0.5),7 vec2(0.5, 0.5),8 vec2(-0.5, 0.5)9 );10 11 vec3 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 17 8 void main() { 18 gl_Position = vec4( positions[gl_VertexIndex], 0.0, 1.0);19 fragColor = colors[gl_VertexIndex];9 gl_Position = vec4(inPosition, 0.0, 1.0); 10 fragColor = inColor; 20 11 }
Note:
See TracChangeset
for help on using the changeset viewer.