aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-14 11:59:59 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-14 11:59:59 +0200
commitd87f2e311e3aadeb800e6ef448685c4c314ceb62 (patch)
tree83ebfc10bdbcd2b2d3d932ae6d22511654caee2d
parent81ef753739abd1a3a541ab7d66ef073585693eeb (diff)
more minor effect tweaks
-rw-r--r--pass1.frag6
-rw-r--r--pass2.frag6
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
}