Skip to content

fix: saturate alpha regardless of HDR - #869

Merged
sindharta merged 3 commits into
masterfrom
fix-864
Aug 24, 2026
Merged

fix: saturate alpha regardless of HDR#869
sindharta merged 3 commits into
masterfrom
fix-864

Conversation

@sindharta

Copy link
Copy Markdown
Collaborator

No description provided.

@sindharta sindharta changed the title Fix 864 fix: saturate alpha regardless of HDR Aug 24, 2026
@sindharta-tanuwijaya
sindharta-tanuwijaya requested a lite review from Copilot August 24, 2026 07:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts toon shader fragment output alpha handling so transparency/clipping alpha is clamped (saturate) even when running in FP/HDR paths where SATURATE_IF_SDR is effectively a no-op.

Changes:

  • URP: Clamp trans-clipping / clipping-transmode alpha with saturate(_Inverse_Clipping_var + _Tweak_transparency).
  • HDRP: Clamp trans-clipping / clipping-transmode alpha using saturate(...) in the forward pass.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
com.unity.toonshader/Runtime/Shaders/URP/UniversalToonBodyShadingGradeMap.hlsl Uses saturate(...) for trans-clipping alpha so opacity is clamped regardless of FP/HDR behavior.
com.unity.toonshader/Runtime/Shaders/URP/UniversalToonBodyDoubleShadeWithFeather.hlsl Uses saturate(...) for clipping transmode alpha so opacity is clamped regardless of FP/HDR behavior.
com.unity.toonshader/Runtime/Shaders/HDRP/ShaderPassForwardUTS.hlsl Updates trans-clipping and clipping-transmode alpha clamping logic in HDRP forward pass.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread com.unity.toonshader/Runtime/Shaders/HDRP/ShaderPassForwardUTS.hlsl
@sindharta
sindharta merged commit c1440ad into master Aug 24, 2026
32 checks passed
@sindharta
sindharta deleted the fix-864 branch August 24, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants