lerping where branching is better
161563 opened this issue · 0 comments
Is your request related to a problem? Please describe.
The deferred_composition shader uses lerping to decide which value to use, but one of those values is being read from a texture. At the same time the comparison value is a constant, meaning that if branching is used all warps will follow the same branch.
The current situation results in unnecessary memory band-width usage and imposes speed penalties.
Describe the solution you'd like
replace all lerps where the code reads from textures with branches.
Describe alternatives you've considered
Part of the shadow denoiser branch includes a method for adding compile time defines to shaders. We can use this to create multiple pipelines, one for hybrid and one for deferred, avoiding branching and lerping entirely.
Additional context
Add any other context or screenshots about the request here.