Application prototype #14

Merged
glen merged 101 commits from app-proto into main 2024-10-21 23:38:28 +00:00
Showing only changes of commit b289d2d4c3 - Show all commits

View File

@ -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;