Page MenuHome

Fix T93155: Approximate shadow catcher displayed wrong on CPU and GPU
ClosedPublic

Authored by Sergey Sharybin (sergey) on Nov 24 2021, 5:22 PM.

Details

Summary

Was happening during rendering, causing visual artifacts when doing
CPU+GPU rendering, and giving different in-progress results on different
devices.

The root of the issue comes to the fact that math used in the approximate
shadow catcher calculation might have resulted in negative alpha channel,
and negative values for display are handled differently on CPU and GPU.
Such difference in handling is caused by an approximate conversion used on
the CPU for the performance reasons.

This change makes it so no negative alpha is generated by the approximate
shadow catcher. Not sure if we need some explicit clamping somewhere to
deal with possible negative values coming from somewhere else.


The shadow catcher cornell box tests are to be updated for the new code,
but the new result sees more accurate.

The comparison:

Diff Detail

Repository
rB Blender