vulkan_test2

view 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 source
1 #version 450
2 #extension GL_ARB_separate_shader_objects: enable
4 layout(location = 0) out vec4 outpos;
6 const vec3 vdata[] = vec3[](
7 vec3(-0.5, -0.5, 0.0),
8 vec3(0.5, -0.5, 0.0),
9 vec3(0.7, 0.0, 0.0));
11 void main()
12 {
13 outpos = vec4(vdata[gl_VertexIndex], 1.0);
14 }