| Shadertoy | https://www.shadertoy.com/user/diatribes |
| Shadertoy | https://www.shadertoy.com/user/diatribes |
https://b.pkh.me/2025-12-25-raining-stars.htm
#Shadertoy portage: https://www.shadertoy.com/view/tcVfRz
Happy xmas ️❄️
RE: https://fosstodon.org/@bug/115777356888947511
This #demo took me a little while.
The domain repetition was not that straightforward, but nothing insurmountable. On the other hand, finding a tiny hashing/mixing function (for the snowflakes offset) was. There are some using trigo (not reliable/portable) or simply too large.
I ended up multiplying by V(.82,.67,.55) which is a rough approx of 1/(𝜑₃,𝜑₃²,𝜑₃³) from https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/
And then I "mixed" and mod 1 with fract(c.zxy*c.yzx+c).
Not perfect but enough for the illusion here ️❄️
Long overdue, but I finally made a dedicated index page for my tiny #glsl demos: https://art.pkh.me
It's a bit bland at the moment, and there aren't a lot of #shaders, but I'm of course going to add more and more as time goes.
void mainImage(out vec4 o, vec2 u) {
vec3 c,p,r = iResolution;
float i, s, d;
for(; i++ < 1e2;
d += s = .01+ abs(1. - length(p.xy))*.3,
c += (1.3+cos(3.*p.z+vec3(6,4,2))) / s / d
)
for(p = vec3((u+u-r.xy)/r.y * d, d + iTime),
p.x *= .15,
p.z = .4*cos(p.z*.6),
s = 4.; s++ < 8.;
)
p.xz += asin(sin(p.zx*s))/s;;
o.rgb = tanh(c / 1e3);
}