Shadertoy
A gold mine of really good fragment shaders.
# Resources
- https://shadertoyunofficial.wordpress.com/ - lots of cool stuff
# Current shaders I’m breaking down
- Fractal tree by EvilRyu
# Accounts of some cool guys
- Nimitz (stormoid)
- Shane
- Paulo Falcao
- Kali
- flockaroo
- Evvvvil
- Flopine
- Nusan
- BigWings aka The Art of Code
- knighty - many mathy things!
# Pitfalls
- Shadertoy mysterious bugs
- ANGLE can ruin many things. See this, for example. But I’m not sure if disabling ANGLE is a good idea.
- This guy has a lot of examples of precision errors.
- Don’t ask for the angle of a null vector. => atan(y,x+1e-15) (
source). But for coordinates it should be fine, as
gl_FragCoord
is always fractional. - Complex expressions including redefinition of variables ( e.g., x = (x=y)*x ) may not be evaluate in the same order on some systems (typically, after translation to HLSL by Windows Angle; API drivers can also have problems), or can even be bugged (O += x -O on some old systems). (OpenGL is wrongly evaluating first all the subdefinitions while here Angle is right.) For wide compatibility, avoid reusing the same variable redefinition within a single expression – which span includes comma-separated expressions.
- there are different bugs in OpenGL… ;-/ ( e.g. on very big arrays ) ( source)
Always define your variables!
# Useful
- Python program to render Shadertoys
- How to adapt iterative shaders to the power of the computer
- Set shader as a website background