tesseract frame

This commit is contained in:
2018-12-20 21:12:39 -05:00
parent 7211e9fc1a
commit 5580899074
5 changed files with 85 additions and 36 deletions

View File

@@ -11,9 +11,10 @@ vec3 hsv2rgb(vec3 c) {
}
void main() {
float h = pos.w / 3 + .6;
float s = 1;
float v = smoothstep(2, -2, pos.z);
// float h = pos.w / 3 + .6;
float h = 0;
float s = 0;
float v = smoothstep(4, -4, pos.z);
fcolor = vec4(hsv2rgb(vec3(h, s, v)), 1);
}

View File

@@ -19,7 +19,7 @@ out vec4 pos;
void emit(vec4 v) {
pos = v;
gl_Position = proj * view * vec4(v.xyz, -v.w + 2);
gl_Position = proj * view * vec4(v.xyz, -v.w + 3);
EmitVertex();
}

View File

@@ -13,7 +13,7 @@ vec3 hsv2rgb(vec3 c) {
void main() {
float h = pos.w / 3 + .6;
float s = 1;
float v = smoothstep(2, -2, pos.z);
float v = smoothstep(3, -3, pos.z) / 2;
fcolor = vec4(hsv2rgb(vec3(h, s, v)), 1);
}

View File

@@ -19,7 +19,7 @@ out vec4 pos;
void emit(vec4 v) {
pos = v;
gl_Position = proj * view * vec4(v.xyz, -v.w + 2);
gl_Position = proj * view * vec4(v.xyz, -v.w + 3);
EmitVertex();
}