Derpius / gmod-dxr

Garry's Mod rendered using DirectX Raytracing
MIT License
30 stars 0 forks source link

[feature] Use a GBuffer pass instead of rays for initial hits #6

Open Derpius opened 3 years ago

Derpius commented 3 years ago

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.

Derpius commented 3 years ago

A VBuffer may be preferable, see https://github.com/NVIDIAGameWorks/Falcor/tree/master/Source/RenderPasses/GBuffer/VBuffer