From 35bfa6291622d7393d2ceece281ff5bf6433b704 Mon Sep 17 00:00:00 2001 From: Rakarake Date: Tue, 24 Feb 2026 19:18:25 +0100 Subject: [PATCH] on the side --- examples/wavy.glsl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/wavy.glsl b/examples/wavy.glsl index b8d05f2..c1d1afb 100644 --- a/examples/wavy.glsl +++ b/examples/wavy.glsl @@ -1,3 +1,5 @@ +#define PI 3.1415926538 + void mainImage(out vec4 fragColor, in vec2 fragCoord) { vec2 uv = fragCoord / iResolution; @@ -9,7 +11,13 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord) { float distance = distance(uv, vec2(0.5, 0.5)); float inverse_distance = 1.0 - distance; lines_uv += (lines_uv - vec2(0.5, 0.5)) * inverse_distance * 3.0; - + float rot = PI * 0.2; + mat2x2 rotm = mat2x2( + cos(rot), -sin(rot), + sin(rot), cos(rot) + ); + lines_uv *= rotm; + //mat2x2 x = mat2x2(1.0, 1.0, 1.0, 1.0); // The lines themselves float lines_timescale = iTime * 0.6; lines_uv.x += sin(lines_timescale + lines_uv.y * 30.0) * 0.2;// * sin(lines_timescale);