OpenGL Deferred Renderer
Overview
- Period: December 2024
- Type: Personal project
- Objective: Implement a deferred renderer using the OpenGL API.
Development Stages
- Implemented a forward renderer.
- Converted the renderer to deferred rendering.
- Added selective shading through conditional branches inside shader loops.
- Optimized lighting by rendering spherical light volumes and using the stencil buffer.
Key Features
- Applied physically based rendering shading.
- Loaded glTF files and rendered triangle-mesh data.
Optimization Details
- Defined each light’s influence radius using light attenuation.
- Rendered light-volume spheres and wrote to the stencil buffer based on depth comparisons.
- Shaded only pixels that passed the stencil test and blended the resulting lighting image.
- Ref: OGLDev Tutorial 37
Rendering Methods
| Method | Description |
|---|---|
| Method-0 | Forward Renderer |
| Method-1 | Deferred Renderer |
| Method-2 | Deferred Renderer with sphere radius consideration for each light |
| Method-3 | Optimized Deferred Renderer using Stencil Test and Depth Test |










