3 ms·
You can also premultiply w with a, as every occurrence of `w` looks like `w*a`. This should shave three more bytes: w=g-g*exp(...),g-=w*a,c+=w*a*d*9.+...,c.r
by lifthrasiir 1y ago
You can also premultiply w with a, as every occurrence of `w` looks like `w*a`. This should shave three more bytes:
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.)
- ux 1y agoThis is not equivalent; the `a` in `c.r+=w*a` is different, you need the original untouched w. The mountain looses its crack with your version. 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!