feature/imgui-sdl
points-test
Last change
on this file since 75108ef 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
|
Rev | Line | |
---|
[4befb76] | 1 | #version 450
|
---|
| 2 |
|
---|
| 3 | layout(location = 0) out vec3 fragColor;
|
---|
| 4 |
|
---|
| 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 | void 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.