OpenGL Shader Worlds

Introduction

Till von Ahnen

Till von Ahnen

Experienced 3D programmer interested in challenging opportunities and out-of-the box solutions with strong graphics and low-level background who loves to visualize data in every way.


OpenGL Shader Worlds

Featured

OpenGL Shader Worlds

.

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.

alignleft

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
  • Soft-shadows
  • Directional lights
  • Ambient light
  • Fog, glow and a sky for some other fancyness

Result

The final composition

aligncenter

Diffuse

aligncenter

Specular Highlights

aligncenter

Softshadow

aligncenter

Directional Light

aligncenter

Ambient Occlusion

aligncenter

Fog

aligncenter

Glow

aligncenter

Sky

aligncenter

View Comments...