Started hex drawing
parent
62d17bee4a
commit
43c5ff71ad
@ -0,0 +1,6 @@
|
||||
#version 450
|
||||
#extension GL_EXT_buffer_reference : require
|
||||
|
||||
void main() {
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
#version 450
|
||||
#extension GL_EXT_buffer_reference : require
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
void main() {
|
||||
outColor = vec4(1, 1, 1, 1);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
#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]];
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
layout(std430, buffer_reference) readonly buffer HexContext {
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
layout(std430, push_constant) uniform PushConstant {
|
||||
HexContext context;
|
||||
float time;
|
||||
} pc;
|
Loading…
Reference in New Issue