by recursive · 1y ago · 0 comments
w = g-g*exp(-mix(h*3e2,d*2.5,a=h<.001?0.:1.))
w = g-g/exp(mix(h*3e2,d*2.5,a=h<.001?0.:1.)) w=g-g*exp(...),g-=w*a,c+=w*a*d*9.+...,c.r+=w*a*a*2,...
w=g-g*exp(...),g-=w*=a,c+=w*d*9.+...,c.r+=w*a*2,...
(I've tested this with the Shadertoy version. YMMV.)But! You can save 1 char by replacing w with a:
g -= a*=w,
c += a*d*9.+...
a = min(...),
c.r += w*a*a*.2,
So thank you for the idea!If you see a way to make it shorter, feel free to share :)