31 lines
672 B
GLSL
31 lines
672 B
GLSL
#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), w*sin(0*PI/3), 0, 1),
|
|
vec4(w*cos(1*PI/3), w*sin(1*PI/3), 0, 1),
|
|
vec4(w*cos(2*PI/3), w*sin(2*PI/3), 0, 1),
|
|
vec4(w*cos(3*PI/3), w*sin(3*PI/3), 0, 1),
|
|
vec4(w*cos(4*PI/3), w*sin(4*PI/3), 0, 1),
|
|
vec4(w*cos(5*PI/3), w*sin(5*PI/3), 0, 1),
|
|
};
|
|
|
|
uint indices[] = {
|
|
0, 1, 2,
|
|
0, 2, 3,
|
|
0, 3, 4,
|
|
0, 4, 5,
|
|
0, 5, 6,
|
|
0, 6, 1,
|
|
};
|
|
|
|
void main() {
|
|
gl_Position = pc.context.proj * pc.context.view * vertices[indices[gl_VertexIndex]];
|
|
}
|