NVIDIAGameWorks / Falcor

Real-Time Rendering Framework
https://developer.nvidia.com/falcor
Other
2.54k stars 464 forks source link

Fix linearZ slope in GBufferRT #434

Open niklassanden opened 1 month ago

niklassanden commented 1 month ago

When computing the linearZ slope in GBufferRT, a typo made ddxPosW be used twice, causing it to only consider the y-derivative. ddxPosW corresponded to the y-derivative because computeDdxPosW and computeDdyPosW used the wrong camera basis vectors.

Before and after: zSlope