View shader on Shadertoy - Published on 2014-11-18
I was hoping that 'folding' the input domain of the distance function would lead to some elegant math. Unfortunately, the math isn't that elegant at all, and also it isn't stable for large folding-angles (hence the 'clipping hack' at lines 90 to 99).
Source: Image.glsl
- Folding on Shadertoy
- An overview of all my shaders
- My public profile on Shadertoy
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.