Raymarching
Raymarching in shaders making cool effects
This work showcases raymarching through shaders.
just drawing basic shapes on the screen and working
towards instancing and other nifty effects.
I also produced a quadratic mandelbulb, like a 3D version of the Mandelbrot set.
Marching
Starting off I made a shader that could simply ray march to detect an object. The first objects I made where
the sphere and the cube. This got me familiar enough with raymarching to continue on to more difficult things
concerning the subject.
I also added some simple shading to the shapes to make depth clearer, by taking the dot product between
the surface normal and the light direction.
Instancing
I wanted more complex objects in my shader and a way to accomplish this is to instance them. This generates
more complex structures, in other words you make the same thing appear multiple times with very little
performance loss.
Visible at: Shadertoy
Effects
Raymarching allows for some computationally cheap effects to be added. Like for example: glow, hard shadows,
soft shadows and fog. With this shader I wanted to show these off with a moving light.
Visible at: Shadertoy
The quadratic mandelbulb
A 3d versions of the Mandelbrot set. I find these very interesting from a mathematical standpoint as well as
aesthetically pleasing to look at. The mandelbrot on the left is the quadratic version of the mandelbulb.
And the one on the right uses a sine wave to transition between the power of 2 and 18, to create a mandelbulb.
Visible at: Shadertoy