From c4569168c7ee63ff915c900270584ccc36babf7f Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Sat, 31 Jan 2026 11:14:40 +1000 Subject: [PATCH] fix segfault.glsl bad use of kw inline --- www/shaders/segfault.glsl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/www/shaders/segfault.glsl b/www/shaders/segfault.glsl index d4ceba0..9448d14 100644 --- a/www/shaders/segfault.glsl +++ b/www/shaders/segfault.glsl @@ -26,20 +26,20 @@ const float noiseTimeScale = 0.1; // =================================================================== // Library Functions // -inline float rand(vec2 co) { +float rand(vec2 co) { return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); } -inline float quantise(float val, float n) { +float quantise(float val, float n) { return clamp(floor(val * n), 0.0, n) / n; } -inline float roundSquare(vec2 p, vec2 b, float r) { +float roundSquare(vec2 p, vec2 b, float r) { return length(max(abs(p)-b,0.0))-r; } // standard roundSquare -inline float stdRS(vec2 uv, float r) { +float stdRS(vec2 uv, float r) { return roundSquare(uv - 0.5, vec2(WIDTH, HEIGHT) + r, 0.05); } @@ -53,19 +53,19 @@ inline float stdRS(vec2 uv, float r) { // Distributed under the MIT License. See LICENSE file. // https://github.com/ashima/webgl-noise // -inline vec3 mod289(vec3 x) { +vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } -inline vec4 mod289(vec4 x) { +vec4 mod289(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } -inline vec4 permute(vec4 x) { +vec4 permute(vec4 x) { return mod289(((x*34.0)+1.0)*x); } -inline vec4 taylorInvSqrt(vec4 r) { +vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; } @@ -314,7 +314,7 @@ float textLines(vec2 uvG) { return rand(uvGt)*15. + 2.; } -inline float fbm3(vec3 v) { +float fbm3(vec3 v) { float result = simplex(v); result += simplex(v * 2.) / 2.; result += simplex(v * 4.) / 4.; @@ -322,7 +322,7 @@ inline float fbm3(vec3 v) { return result; } -inline float fbm5(vec3 v) { +float fbm5(vec3 v) { float result = simplex(v); result += simplex(v * 2.) / 2.; result += simplex(v * 4.) / 4.; @@ -344,7 +344,7 @@ float smokeNoise(vec3 v) { // =================================================================== // Graphical Styling / Effects // -inline float bloom(vec2 uv2) { +float bloom(vec2 uv2) { // TODO c += (textureLod(iChannel0, uvC, 3.) + textureLod(iChannel0, uvC, 4.) +