chore: wrap at 80 characters (#128)
All checks were successful
/ test (push) Successful in 3m44s

Wrap all lines in app-proto/src at 80 characters. The conventions this pull request uses for line wrapping often differ from the established conventions of this codebase. The resulting format inconsistencies will probably persist until we can start using the planned Husht preprocessor (https://code.studioinfinity.org/StudioInfinity/husht).

Reviewed-on: #128
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
Glen Whitney 2025-12-02 08:13:27 +00:00 committed by Vectornaut
parent 6c3a48fb52
commit d7587cb57f
7 changed files with 353 additions and 163 deletions

View file

@ -175,8 +175,9 @@ void main() {
if (debug_mode) {
// at the bottom of the screen, show the color scale instead of the
// layer count
if (gl_FragCoord.y < 10.) layer_cnt = int(16. * gl_FragCoord.x / resolution.x);
if (gl_FragCoord.y < 10.) {
layer_cnt = int(16. * gl_FragCoord.x / resolution.x);
}
// convert number to color
ivec3 bits = layer_cnt / ivec3(1, 2, 4);
vec3 color = mod(vec3(bits), 2.);
@ -217,14 +218,17 @@ void main() {
// highlight intersections
float ixn_dist = intersection_dist(frag, frag_next);
float max_highlight = max(highlight, highlight_next);
float ixn_highlight = 0.5 * max_highlight * (1. - smoothstep(2./3.*ixn_threshold, 1.5*ixn_threshold, ixn_dist));
float ixn_highlight = 0.5 * max_highlight * (1. - smoothstep(
2./3.*ixn_threshold, 1.5*ixn_threshold, ixn_dist));
frag.color = mix(frag.color, vec4(1.), ixn_highlight);
frag_next.color = mix(frag_next.color, vec4(1.), ixn_highlight);
// highlight cusps
float cusp_cos = abs(dot(dir, frag.normal));
float cusp_threshold = 2.*sqrt(ixn_threshold * sphere_list[hit.id].lt.s);
float cusp_highlight = highlight * (1. - smoothstep(2./3.*cusp_threshold, 1.5*cusp_threshold, cusp_cos));
float cusp_threshold
= 2.*sqrt( ixn_threshold * sphere_list[hit.id].lt.s);
float cusp_highlight = highlight * (1. - smoothstep(
2./3.*cusp_threshold, 1.5*cusp_threshold, cusp_cos));
frag.color = mix(frag.color, vec4(1.), cusp_highlight);
// composite the current fragment