From d87f2e311e3aadeb800e6ef448685c4c314ceb62 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 14 Jun 2024 11:59:59 +0200 Subject: more minor effect tweaks --- pass1.frag | 6 +++--- pass2.frag | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pass1.frag b/pass1.frag index f00cdcf..5cac343 100644 --- a/pass1.frag +++ b/pass1.frag @@ -9,7 +9,7 @@ layout(location = U_LOC_TIME) uniform float time; layout(location = U_LOC_PASS1) uniform sampler2D buf; ivec2 res = ivec2(RES_H, RES_V); -const float step = 0.03; +const float step = 0.02; const float turns = 9.0; const vec3 white = vec3(1.0, 1.0, 1.0); @@ -24,9 +24,9 @@ void main() { vec2 gc = (uv - 0.5) * 2.0; // graph coordinates (-1,-1) to (1,1) gc.x *= float(res.x) / float(res.y); // adjust circle aspect ratio - float offset = time * 1.0; + float offset = time * 4.0; - float mag = 1.3 + 0.5 * sin(2 * time); // braid ratio + float mag = 1.5 + 0.5 * sin(2 * time); // braid ratio float size = 0.4 + 0.1 * sin(3 * time); // total size for (float t = 0.0; t < PI_2; t += step) { diff --git a/pass2.frag b/pass2.frag index 78c1f75..9822db0 100644 --- a/pass2.frag +++ b/pass2.frag @@ -10,11 +10,11 @@ layout(location = U_LOC_PASS1) uniform sampler2D buf; layout(location = U_LOC_WINDOW) uniform ivec2 window; const vec4 color_a = vec4(0.15, 0.50, 0.90, 1.0); -const vec4 color_b = vec4(0.90, 1.00, 0.90, 1.0); +const vec4 color_b = vec4(0.85, 1.00, 0.85, 1.0); void main() { vec2 uv = gl_FragCoord.xy / window.xy; - float val = texture(buf, uv)[0]; - color = mix(color_a, color_b, val); // map b/w colors to gradient + color = texture(buf, uv); + color = mix(color_a, color_b, color[0]); // map b/w colors to gradient } -- cgit v1.2.3