diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-14 11:59:59 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-14 11:59:59 +0200 |
commit | d87f2e311e3aadeb800e6ef448685c4c314ceb62 (patch) | |
tree | 83ebfc10bdbcd2b2d3d932ae6d22511654caee2d | |
parent | 81ef753739abd1a3a541ab7d66ef073585693eeb (diff) |
more minor effect tweaks
-rw-r--r-- | pass1.frag | 6 | ||||
-rw-r--r-- | pass2.frag | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -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) { @@ -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 } |