Alex Dunn - Pyroclastic Explosions

This demo showcases my pixel shader based raymarcher, a screen aligned quad is used to render the entire effect. The effect is something I have been working on in my spare time for quite a while, it has gone through many iterations.

To achieve it, in it's current iteration, first I created a 6D noise function. This allowed me to have a seamlessly tiling noise function in 3D by wrapping the 6D noise around a cylinder for each axis. I create a 3d texture (128x128x128) offline and pass it into the pixel shader. The pixel shader uses the noise texture to distort the surface of a sphere, this is what gives us the explosion looking effect.

Next, the shader aims to find the surface of the explosion by using sphere tracing. Sphere tracing can be used to find the surface of an object much faster than stepping a fixed distance each iteration (like conventional ray marching), as the step rate is proportional to the distance returned from the scene function (which is the distance to the surface of an object from the current position). Once the surface has been found the shader starts the volume rendering phase. In which the rays are marched through the explosion, accumulating temperatures as they go, until they reach the other side, or have reached full opacity. Finally, colours are assigned based on how displaced from the surface of a sphere the current position is. These colours come from a gradient texture, also created offline.