Skip to content

Conversation

@allenwp
Copy link
Contributor

@allenwp allenwp commented Dec 12, 2025

I've also updated related docs and moved clamping outside of other linear_to_srgb functions to stop the spread of unnecessary clamping to other parts of the code and prevent this sort of issue from happening again in the future.

This PR may affect existing projects that depend on this clamping. To achieve the existing behaviour after this PR is merged, simply use the existing Clamp visual shader node to clamp to the range of [0, 1].

Before PR: background clouds are clipped After PR: background clouds remain overbright for good tonemapping
Image Image

Note: the HDR output PR will remove clamping from the SMAA shader, but since this change is only needed by the HDR output PR, I'm leaving the behaviour as-is in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visual shader LinearToSRGB ColorFunc causes undesirable clamping

1 participant