Skip to content

Commit dbc41cf

Browse files
Fix issue with Uber Post process shader when alpha is enabled (#422)
* Fix issue with alpha being over 1 hence, leading to the final color being boosted due to alpha handling * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
1 parent ecc4db3 commit dbc41cf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
583583
- Fixed issue with reflection probes in realtime time mode with OnEnable baking having wrong lighting with sky set to dynamic (case 1238047).
584584
- Fixed transparent motion vectors not working when in MSAA.
585585
- Fix error when removing DecalProjector from component contextual menu (case 1243960)
586+
- Fixed issue with post process when running in RGBA16 and an object with additive blending is in the scene.
586587

587588
### Changed
588589
- Improve MIP selection for decals on Transparents

com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/UberPost.compute

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ void Uber(uint3 dispatchThreadId : SV_DispatchThreadID)
218218
// Alpha mask
219219
#ifdef ENABLE_ALPHA
220220
// Post processing is not applied on pixels with zero alpha
221-
color.xyz = lerp(inputColor.xyz, color.xyz, inputColor.a);
221+
// Saturate is necessary to avoid issues when additive blending pushes the alpha over 1.
222+
color.xyz = lerp(inputColor.xyz, color.xyz, saturate(inputColor.a));
222223
#endif
223224

224225
// Done

0 commit comments

Comments
 (0)