vulkan_test2
diff sdr/vertex.glsl @ 10:8eb3126cc2f1
starting on shaders
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 21 Jun 2018 06:58:58 +0300 |
parents | |
children | f8bd29f124a8 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/sdr/vertex.glsl Thu Jun 21 06:58:58 2018 +0300 1.3 @@ -0,0 +1,14 @@ 1.4 +#version 450 1.5 +#extension GL_ARB_separate_shader_objects: enable 1.6 + 1.7 +layout(location = 0) out vec4 outpos; 1.8 + 1.9 +const vec3 vdata[] = vec3[]( 1.10 + vec3(-0.5, -0.5, 0.0), 1.11 + vec3(0.5, -0.5, 0.0), 1.12 + vec3(0.7, 0.0, 0.0)); 1.13 + 1.14 +void main() 1.15 +{ 1.16 + outpos = vec4(vdata[gl_VertexIndex], 1.0); 1.17 +}