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

lerping where branching is better #342

@161563

Description

@161563

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorRequest to re-factor a working system/class/etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions