Mandelbrot Julia

Unity Shaders Little Toys

Just a small but growing collection of little Unity toys with more or less typical mathematical tricks implemented in a fragment shader. What’s impressive is, as often happens in maths, the simplicity of most formulas when implemented. I’ve always found coding a really good way of understanding maths. I adapted these old snippets I made in Processing to ShaderLab/CG. I intentionally shared in their most basic form to leave room to creativity. How much I love this stuff I can’t just explain.

To use these toys, in Unity, you need to:

    Create a shader in your Project window.
    Create a material and assign the new shader to it (this is done automagically if you right click on the shader and create the material from there).
    Create a quad in your scene.
    Assign the material to the quad.
    Position the camera so the quad faces it (or viceversa)

#1: Mandelbrot Julia Set

Julia Set

Julia Set

#2: 3n plus 1 rule