Distinguish odd layer counts in debug mode
The low-curvature construction admits odd layer counts.
This commit is contained in:
parent
163361184b
commit
b289d2d4c3
@ -193,15 +193,13 @@ void main() {
|
|||||||
if (debug_mode) {
|
if (debug_mode) {
|
||||||
// at the bottom of the screen, show the color scale instead of the
|
// at the bottom of the screen, show the color scale instead of the
|
||||||
// layer count
|
// layer count
|
||||||
if (gl_FragCoord.y < 10.) layer_cnt = 2 * int(8. * gl_FragCoord.x / resolution.x);
|
if (gl_FragCoord.y < 10.) layer_cnt = int(16. * gl_FragCoord.x / resolution.x);
|
||||||
|
|
||||||
// convert number to color
|
// convert number to color
|
||||||
vec3 color;
|
ivec3 bits = layer_cnt / ivec3(1, 2, 4);
|
||||||
if (layer_cnt % 2 == 0) {
|
vec3 color = mod(vec3(bits), 2.);
|
||||||
ivec3 bits = layer_cnt / ivec3(2, 4, 8);
|
if (layer_cnt % 16 >= 8) {
|
||||||
color = mod(vec3(bits), 2.);
|
color = mix(color, vec3(0.5), 0.5);
|
||||||
} else {
|
|
||||||
color = vec3(0.5);
|
|
||||||
}
|
}
|
||||||
outColor = vec4(color, 1.);
|
outColor = vec4(color, 1.);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user