Here is a selection of my Shadertoy
shaders from over the years, presented in a 'blog' style with most-recent at the top. All of my Shadertoy shaders can be found on my userpage here
All of my Shadertoy shaders are licensed under Creative Commons CC BY-SA 4.0
You can download a local backup of my publicly-published Shadertoy shaders as a single JSON file here
Raytraced Swept BSpline Surfaces
Raytracing a surface-of-revolution defined by a 1D quadratic uniform B-spline. This involves the solving of a quartic equation. I used Shane's generalised quartic solver and added some tricks on top to improve the precision and numerical stability.
Helix Distance Estimator
Approximate distance to a helix-like shape (actually a swept disc, hence the fact that the inner radius only applies in the XY plane at each point of the helix coil).
Rendered with sign distance field raymarching.
Wythoff Uniform Tilings +Duals
All of the Wythoff-constructible Euclidean uniform tilings (10 out of 11), constructed with the Wythoff method of repeatedly reflecting a base triangle through its edges across the plane. Drag the mouse to see all the tilings. Hold LMB to see the dual tiling.
Bijective Weighted 3Gon Sampling
Analytic approach to sampling a triangle with linearly-interpolated probability weights at each corner. The derivation of this approach is a little bit involved, so I might write a long-form explanation somewhere else.
Apollonian Gasket Möbius
Another apollonian gasket for shadertoy, but this one renders the limit circles directly. This is done by composing the inverse Möbius transformations applied during iteration. The final transformation maps the base limit circles back to screenspace.
Voxel Sprite Mario
Mario fan-art, made of isometric voxel sprites looking a bit like lego bricks. Click and drag to rotate.
An individual brick is rendered into a separate buffer using the current camera orientation, then
that buffer is used in the final image as a sprite texture. The sprites are rendered
from front-to-back in a 3D grid, the sorting is done by inverting voxel coordinates according to
the signs of the camera direction vector coordinates.
Tetrahedral Voxel Traversal
I adapted my single-sample-per-step terrain mesh ray traversal invention to 3D. In the end I decided to use something similar to the Hexakis cubic honeycomb, with each of the 6 square pyramids split into 4 tetrahedra making 24 tetrahedra per cubical cell.
Triangulated Heightfield Trick 2
I revisited this idea of raytracing a triangulated heightfield with only 1 heightfield sample per step. This time the logic is a lot simpler, because I've used a regular equilateral triangle tiling grid.
I was inspired by this awesome shader by Shane to try a simpler jigsaw pattern without needing to loop through neighbouring pieces, and which allows fast random sampling. Hold LMB to "reveal" the structure.
Curves and Blocks
Some differently-shaped voxels with a pencil hatching effect, and some 'perfect' temporal anti-aliasing due to the fact that deformation due to camera motion (vertical scrolling) is linear.
Some kind of tentacled object, made with IQ's implementation of the inverse spherical Fibonacci function from Keinert et al.
Some kind of glass, using accumulation for anti-aliasing. I'm not actually 100% sure if the glass material is really correct, but I kept playing with it anyway until I got a result I'm happy with. By the way, this uses a tent filter for anti-aliasing.
Features a method of raytracing a CSG model composed of one additive group and one subtractive group (this means there is no need for a stack when evaluating the CSG graph).
This is an example of how the new cubemap feature of Shadertoy can be used to cache and accumulate non-view-dependent illumination. Click and drag with the mouse to move the camera around.
Triangulated Heightfield Trick
Here is a trick to raytrace a triangulated heightfield taking only 1 sample of the heightfield for each triangle tested against the ray and reducing the ray-vs-triangle test to a ray-vs-plane test. Primary rays and shadow rays are both raytraced.
[SH18] Rabbit Character
I tried to create some kind of character using signed distance fields, and came up with this rabbit.
This wasn't originally an SH18 Shadertoy competition, but I decided to put it in (actually I hadn't realised that there is a new competition happening until after I made it).
A small sketch of some kind of aquatic animal in the open ocean.
Sorry for the really messy code this time. It's just a quick sketch.
A fanart recreation of the new boxy Pikachu design from the Nintendo game Pokémon Quest.
It turns out Pokémon are easy to make with SDFs when they are made of boxes!
Kirby, from the Kirby videogames by Nintendo. Modelled purely with code, from a reference found via Google. Composed and lit for this shot only.
Some more sizecoding doodling. I'm not finished with it (there are most likely more minifying transformations to be done) but I'm publishing it anyway! (p.s. I know, it's not truly isometric...)
A remake of the castle fly-by sequence from the classic 90's videogame Unreal. The geometry is converted directly from the level data and I made everything else myself. "Alter your reality...forever".
This shader is full of bugs... :D Their design is based on the Monarch butterfly, and I decided to only create the wings since the shader got complex enough already. The Monarch's markings warn predators that it's poisonous.
The Popular Shader
I remade my other shader (here) inspired by "The Popular Demo", to make it more accurate :)
I added a tiling effect to make the robot look faceted, but it seems to somehow over-complicate the shader so it doesn't compile.
Experimenting with clipped cones. Unfortunately I have not yet got this to work correctly on Firefox on Windows. Chrome should be okay.
I tried to create some convincing grass procedurally. The result became less than realistic, but I am still happy with how it went. There are some quite subtle gradients, which resulted in very noticeable mach bands. I mostly fixed them with noise.