A downloadable project

Hey! My name is Van Andrew. 

During uni break I decided to learn the basics of GLSL using Shadertoy. This page documents some notable projects and what I learnt from each of them. 

I've learnt techniques most notably of generating noise, drawing simple shapes and ray marching. In combining these techniques I can procedurally model shapes using SDF's and manipulate them in simple ways using said shapes and noise, as opposed to traditionally modelling them by hand.

You can click on the images below to see the source code!

Or just visit my github.

Showcase

Path tracer

I wanted to learn ray-tracing techniques, and followed a blog from demofox to implement this basic path-tracer. Interesting to see the different implementations of ray-sphere intersection calculation, and sampling theory.

Chessboard and PawnsReally happy with this one. I showcase eight different material shaders. Pawn themselves are torus, cylinder and sphere SDF's. From left to right: brushed metal, clay, acrylic, glass, plastic, metal, wax, rock. Shader takes multiple bounces between pawns but NOT with lights so far.

Wax Cloud
This was an experiment to render clouds, but I ended up with a wax-like material. Used fixed step marching for the interior to calculate light absorption. Looks neat.
New Water Shader
New additions from the attempt below: AO, Soft Shadows, SSS, Gerstner Waves, Caustics, Camera Geom. Overall a much closer representation of water from ray marching standpoint.

Moana Water Shader

Following a blog post on rendering water, I attempted to follow along again. This time I managed to get closer to the end product, although I'm missing water caustics. The sand also remains 'dry' and unreactive, which is a problem. However as you'll see below, it is a big improvement. Process video here.
Canyon at Sunset
Used perlin noise to generate canyon structures. Played with colouring the rock and adding 'random' patches and shelves. Water actually reflects the sky, instead of approximating it.
Ocean Shader
This was an attempt to render water from a close-up town down perspective. So of course I had to throw in a sunset for those specular reflections. The buoy here is mainly to showcase the reflections in the water. It also bobs and rotates along with the water. Water surface SDF uses Perlin Noise FBM.
Gerstner Waves
I wanted to redo my waves shader, since perlin noise makes it look more rough and not realistic. This is a modification which uses gerstner waves (borrowed from another shader) and updates the look on the life bouy using polar coordinates. Everything else is identical.
UFO Sighting
Played around with voronoi-textures as the basis for heightmaps with ray-marching.

Wax Bust

I am showcasing a variety of different materials here; the wax bust uses sub-surface scattering to create a translucent tone, the glass plate refracts the texture of the wooden table below. Fun to play with textures and for the first time; the phong lighting model.

Glass Marbles

I played with refraction and reflection with five different spheres of varying density and roughness. Interesting to see the results.

Raymarched Mountains

I used fbm and smooth noise to generate organic mountains. Ray marching provides nice lighting. Has a lot of issues with artefacts and distortion.
New Mountains
I went back and redid my previous shader. This one is properly lit (no fake lighting) and much faster with less artefacts.
The Himalayas

I went back and redid my terrain shader for the 3rd time. This time I used a texture to create ridges and lit it using 2 lights. Much prettier image. Process video here.
Mountains_v4

Fourth attempt ray marching mountains. This time I've patched up the colouring method and detail of terrain. Added water using refraction/reflection model from previous shaders.
Planet
I rendered a planet using the same techniques on my previous mountain iterations. I think the revised water looks much better than my first attempt below.
Tiny Planet
Some cool new tricks: Volumetric rendering, proper coordinate system, triplaner texturing, stars and atmospheric effects.
Cel Shading
I wanted to create a quick toon shader. This is using my new template shader code which supports materials. The toon shader just splits up lighting into four (can be changed) bands, which alter the colour output.
Soft Shadows and AO
I added soft shadows and ambient occlusion to my boilerplate ray marching code. I think it looks pretty neat.
Volumetric Render
I tried to render clouds but never got to applying 3D noise. This render uses fixed marching steps as opposed to traditional ray marchers. Resultant look gives a nice opaque material.
Falling Sand Simulation
I played too much Noita and wanted to make a falling sand simulation. Uses buffers to keep track of a pixel's previous state, since shaders enact per frame.
Game of Life

This is a version of Conway's Game of Life which uses cellular automata to create emergent behaviours. I've added a visual changed where pixels leave a 'trail' of where they have been which fades over time, much like slime. I've added CRT effects to add that retro feel.

First time attempting to ray march water and was met with a bunch of issues. This was as far as I could get -basic refraction.

FBM

I used smooth noise with fbm to generate a moving pattern. Looks like an oil spillage.


Video Showcase 1 | Video Showcase 2

Resources

I'd like to draw attention to these amazing resources; and the source of much of my learning.

The Art of Code Youtube Channel | The Book of Shaders | Inigo Quilez's Blog | Learn OpenGL | Alan Zucconi's Blog | Chris's Blog | Demofox Blog | GPFault Blog | kevs3D Blog | ScratchAPixel Blog | reindernijhoff's Blog | Alain's Blog | Catlike Coding


I will be updating this page with new shaders as I make them. This page acts as a portfolio of sorts, showing the highlights of my journey. Enjoy!

All my links in one place.

Leave a comment

Log in with itch.io to leave a comment.