🪟 Refraction, dispersion, and other shader light effects
by @maximeheckel
#ReactThreeFiber #GSLS #3D #animation #webdev
https://blog.maximeheckel.com/posts/refraction-dispersion-and-other-shader-light-effects/
#ReactThreeFiber #gsls #3d #animation #webdev
```
fract(0.5 * dwell + time / 3.0) < 0.5
? vec3(1.0, 0.0, 0.0)
: vec3(1.0);
```
Where dwell (aka #continuous #escapetime) is computed 4x per pixel for image-space distance estimation (because using #gsls dFdx and dFdy on computed data is too low-resolution and fraught with peril in the event of incoherent control flow, works fine for the input smooth coordinates to know where to offset the 4x dwell computations).
For some reason I always seem to end up with #fractals that look a bit like insects
#colour #cycling #loop #continuous #escapetime #gsls #fractals