gmod-dxr
gmod-dxr copied to clipboard
[feature] Use a GBuffer pass instead of rays for initial hits
Describe the solution you'd like
Currently, for simplicity, initial hit positions from the camera are computed by tracing camera rays, this allows for more accurate thin lens depth of field, however doing DoF as a post processing step is far more efficient.
Given that not being able to simulate DoF directly is fine, the current method of tracing camera rays could be replaced with a far more efficient rasterised GBuffer pass, although just how much of a performance increase that would give is debateable given most of the performance hit comes from subsequent rays.
A VBuffer may be preferable, see https://github.com/NVIDIAGameWorks/Falcor/tree/master/Source/RenderPasses/GBuffer/VBuffer