After reading "Rendering worlds with two traingles" from iq(kudos for sharing the knowledge) back in 2007 I wanted to see myself what is possible to do with this technique so I started to port my old raymarchers from the CPU to the GPU using OpenGL with GLSL.
Setting up the Camera and projection settings were quite easy since i've implemented quite alot raymarch/tracers beforehand and therefore could get a nice start into creating objects with distance functions.
The first scene I made was nicknamed "Sandbox" which featured a cut-out cube in a desert like enviroment.
As you can see it already featured basic light sources and specular but this wasnt the whole shebang I was aiming for so I was trying to get way more out of the shaders powers.
The Effect Stack
In 2007 Screen space ambient occlusion short SSAO became popular in video-games and was a must have in any realistic visuals.
So I Got my head around it and gave it a shot in my renderings.You can spot some Ambient Occlusion at the intersecting edges of the cubes below.
With this done there was just the good old physics pipeline left to implement consisting of
- Diffuse materials
- Specular highlights
- Directional lights
- Ambient light
- Fog, glow and a sky for some other fancyness
The final composition