Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

lerping where branching is better #342

Open
161563 opened this issue May 28, 2019 · 0 comments
Open

lerping where branching is better #342

161563 opened this issue May 28, 2019 · 0 comments
Labels
refactor Request to re-factor a working system/class/etc.

Comments

@161563
Copy link
Contributor

161563 commented May 28, 2019

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.

@VZout VZout added the refactor Request to re-factor a working system/class/etc. label Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor Request to re-factor a working system/class/etc.
Projects
None yet
Development

No branches or pull requests

2 participants