/rendering-demo

Demo of various 3D rendering techniques, implemented with SDL2 and OpenGL

Primary LanguageC

3D Rendering Demo

Demo of various advanced 3D rendering techniques, implemented with SDL2 and OpenGL

demo

Many of these techniques are based on the Advanced Lighting tutorials found here: https://learnopengl.com/

TODO

  • Antialiasing
    • MSAA (Directly supported by OpenGL)
    • MSAA for secondary framebuffers with texture attachments
    • FXAA (or SMAA) (as MSAA is not (performantly) compatible with Deferred Shading)
  • Basic Lighting
    • Point Lights
    • Directional Lights
  • Advanced Lighting
    • Blinn-Phong Shading
    • Gamma Correction
    • Emissive Lighting
    • HDR
    • Bloom
    • Deferred Shading
    • SSAO
    • PBR
    • Image-Based Ambient Lighting
      • Diffuse Irradiance
      • Specular
  • Environment Maps
  • Add Control Panel rather than keyboard shortcuts

Requirements

How to build and run

On linux (not yet tested on macOS),

git clone git@github.com:mfirmin/rendering-demo.git
cd rendering-demo
mkdir build
cd build
ln -s ../assets .
cmake ..
make
./demo

Usage

  • A: Toggle FXAA AntiAliasing (default on)
  • L: Toggle Directional Lighting (default off)
  • 1-4: Toggle Scene Lights (default off)
  • S: Toggle Blinn-Phong shading on/off (default on)
  • H: Toggle HDR (default on)
  • E: Cycle through Exposure values (0.1, 0.2, 0.4, 0.8, 1.0, 2.0, 5.0, 10.0) (default = 1.0)
  • G: Toggle Gamma Correction (default on)
  • I: Cycle through different intensities (1, 2, 4, 8, 16) for light 1 (useful for seeing the effects of HDR)
  • B: Toggle Bloom on/off (default off)
  • O: Toggle SSAO on/off (default on)
  • P: Toggle PBR on/off (default on)
  • M: Cycle through PBR materials for model (metallic, glossy, rough, rough metal) (default: metallic)
  • Z: Toggle IBL on/off (default on)

Credits