tesseract wireframe and project rename/refactor

This commit is contained in:
2018-12-19 07:36:33 -05:00
parent 7b85d1e4db
commit 83d0ce5ef3
14 changed files with 282 additions and 207 deletions

17
simplex/shaders/main.frag Normal file
View File

@@ -0,0 +1,17 @@
#version 440 core
out vec4 fcolor;
in vec4 pos;
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
void main() {
vec3 hsv = vec3(pos.w/3 + .6, 1, 1);
fcolor = vec4(hsv2rgb(hsv), 1);
}

16
simplex/shaders/main.vert Normal file
View File

@@ -0,0 +1,16 @@
#version 440 core
layout(location=0) in vec4 pos4;
layout(std140, binding=1) uniform Matrices {
mat4 model;
mat4 view;
mat4 proj;
};
out vec4 pos;
void main() {
pos = model * pos4;
gl_Position = proj * view * vec4(pos.xyz, -pos.w + 2);
}