From f11ab29328ba8c9f8269fef066bdd17287a6eb1f Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Sat, 2 Aug 2025 00:19:08 +1000 Subject: [PATCH] fixed shader function formatting --- www/shaders/segfault.glsl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/www/shaders/segfault.glsl b/www/shaders/segfault.glsl index cc6f89c..35b4c35 100644 --- a/www/shaders/segfault.glsl +++ b/www/shaders/segfault.glsl @@ -27,7 +27,7 @@ precision highp float; // =================================================================== // Library Functions // -inline float rand(vec2 co){ +inline float rand(vec2 co) { return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); } @@ -296,8 +296,7 @@ float vt220Font(vec2 p, float c) { // smokeNoise(...) is for the main noise generation algorithm (very tunable) // https://www.shadertoy.com/view/MsdGWn // -float textLines(vec2 uvG) -{ +float textLines(vec2 uvG) { float wt = 5. * (iTime + 0.5*sin(iTime*1.4) + 0.2*sin(iTime*2.9)); // wobbly time vec2 uvGt = uvG + vec2(0., floor(wt)); float ll = rand(vec2(uvGt.y, - 1.)) * ROWCOLS.x; // line length @@ -354,8 +353,7 @@ inline float bloom(vec2 uv2) { * smoothstep(0., -SMOOTH*20., stdRS(uvC, -0.02)) * 0.5; } -void mainImage( out vec4 fragColor, in vec2 fragCoord ) -{ +void mainImage(out vec4 fragColor, in vec2 fragCoord) { vec2 uv = vec2(fragCoord.x, iResolution.y - fragCoord.y); vec2 uvT = ROWCOLS * FONT_SIZE * uv / iResolution.xy; vec2 uvG = floor(ROWCOLS * uv / iResolution.xy);