A PBR renderer with real-time ray-tracing of refractions implemented in C++ and OpenGL.

Highlights

  • Cook-Torrance microfacet specular BRDF
    • GGX/Trowbridge-Reitz specular normal distribution function
    • Schlick-GGX geometry function
    • Fresnel-Schlick approximation of the Fresnel equation
  • Image based lighting (IBL) using split sum approximation
    • Pre-filtered environment map
    • BRDF look-up texture
  • Lambert diffuse
  • Real-time ray-tracing
  • Shadow mapping
  • PBR textures
  • HDR

Tree scene

Tree scene

  • Live shadow mapping with a directional light
  • Live reflections
  • Simple transmittance of light through leaves
  • Procedurally generated tree branches and leaves

Glass scene

Glass scene

  • Ray-tracing from the point light through the glass sphere to the environment
  • Ray-tracing from the environment through the glass sphere to the camera
  • Live shadow mapping with a point light

Real-time refractions

Glass refractions

  • Left: direction of light rays leaving one side of the glass sphere
  • Right: direction of light rays leaving the opposite side with importance sampling
  • Efficient computation and decent visual quality enabled by importance sampling