Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4
2019.4
2019.4.0f1
2020.2
2021.1
2021.2
Issue ID
1276188
Regression
No
RenderTarget with premultiplied alpha blending is too bright and does not blend with the background image
How to reproduce:
1. Open the user's attached project
2. Observe the circle In the Game view
Expected result: In the top half of the screen RenderTarget with premultiplied alpha blending blends with the background image
Actual result: In the top half of the screen RenderTarget with premultiplied alpha blending is too bright and does not blend with the background image
Reproducible with: 2018.4.31f1, 2019.4.20f1, 2020.2.4f1, 2021.1.0b6, 2021.2.0a4
Notes:
- Reproducible in Windows Build
Comments (1)
-
hazel_koop
Sep 24, 2020 16:19
A forum thread on the subject, with a possible explanation and (somewhat awkward) workaround: https://forum.unity.com/threads/blending-transparent-rendertexture-with-scene-gives-fringing-with-or-without-premultiplied-alpha.966407/
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UnityLinker causes crash when outputting snapshot data for very large projects
- Camera Preview does not detect multiple cameras with same GameObject name
- Crash on TypeTreeIterator::Children() when renaming a corrupted asset while Asset Serialization is set to Mixed
- Cameras (Camera.targetDisplay) render only to Display 0 in the Player when Multi-Display setup is used and DX12 API is set
- [Vulkan] _CameraOpaqueTexture produces a feedback effect on Android Adreno devices when using Vulkan
Resolution Note:
Workaround for Builtin-RP:
In PremultipliedShader, change the line
"Blend One OneMinusSrcAlpha" to "Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha"
OR
add "col.rgb *= col.a;" in fragment function
This bug doesn't reproduce in URP's default transparent shaders.