PostFX and Deferred Lighting
The Video
The Explanation
This is a DirectX11 program mainly focussing on Deferred Lighting, a 3-phase deferred pipeline, and post effects. It also includes normal mapping, ImGUI, and some render target debugging.
Features:
- 3-Phase Deferred Lighting
- Gaussian Depth of Field Blur, and other smaller post effects
- RT debug views
- Normal Mapping
More Info:
The main focus of this project was its deferred system, and its post effects. It also served as a means of using ImGUI for the first time.
The 3-phase deferred system, called deferred lighting, is an alternative to the typically known 2-phase deferred 'shading' pipeline. In this pipeline, rather than writing all material
properties to g-buffers in the first pass, the first pass instead creates buffers for the minimal lighting information - this can be as little as a normals view with position reconstruction.
Then, the second phase calculates all the lighting, whilst the final phase redraws the geometry to bring in the additional colour and material information into the scene. It's more modular
and configurable than deferred shading, but has the drawback of having to draw geometry twice.
The main post effect here is the depth of field gaussian blur. This is a gaussian blur effect, that is a two-pass blur merging adjacent and vertical pixels, combined with depth features
such as a focal point and a circle of confusion to determine where this effect is applied. Additional effects include colour tinting and debug views being rendered to the screen,
as seen on the right. These views show, of the cube, the world positions, normals, the calculated diffuse and the specular lighting, in that order.
Feel free to ask me anything more about this project!