#version 450 #extension GL_EXT_buffer_reference : require #include "hex_common.glsl" #define PI 3.1415926535897932384626433832795 float w = 0.5; vec4 vertices[] = { vec4(0, 0, 0, 1), vec4(w*cos(0*PI/3), 0, w*sin(0*PI/3), 1), vec4(w*cos(1*PI/3), 0, w*sin(1*PI/3), 1), vec4(w*cos(2*PI/3), 0, w*sin(2*PI/3), 1), vec4(w*cos(3*PI/3), 0, w*sin(3*PI/3), 1), vec4(w*cos(4*PI/3), 0, w*sin(4*PI/3), 1), vec4(w*cos(5*PI/3), 0, w*sin(5*PI/3), 1), }; uint indices[] = { 0, 2, 1, 0, 3, 2, 0, 4, 3, 0, 5, 4, 0, 6, 5, 0, 1, 6, }; void main() { gl_Position = pc.context.proj * pc.context.view * vertices[indices[gl_VertexIndex]]; }