This page is created automatically. Click here to view this shader on Shadertoy.

This shader uses Image Based Lighting (IBL) to render an old watch. The materials of the objects have physically-based properties.

A material is defined by its albedo and roughness value and it can be a metal or a non-metal.

I have used the IBL technique as explained in the article 'Real Shading in Unreal Engine 4' by Brian Karis of Epic Games.[1] According to this article, the lighting of a material is the sum of two components:

  1. Diffuse: a look-up (using the normal vector) in a pre-computed environment map.
  2. Specular: a look-up (based on the reflection vector and the roughness of the material) in a pre-computed environment map, combined with a look-up in a pre-calculated BRDF integration map (Buf B).

Note that I do NOT (pre)compute the environment maps needed in this shader. Instead, I use (the lod levels of) a Shadertoy cubemap that I have remapped using a random function to get something HDR-ish. This is not correct and not how it is described in the article, but I think that for this scene the result is good enough.

I made a shader that renders this same scene using a simple path tracer. You can compare the result here:

https://www.shadertoy.com/view/MlyyzW

Source code

You can find (the full source of) Old watch (IBL) on Shadertoy.

Links