Search Issue Tracker
Fixed in 2020.1
Fixed in 2018.4, 2019.2, 2019.3
Unable to override ColorMask in a Surface Shader with an Alpha Pragma directive
Customer been trying to render objects with Surface Shaders (using the legacy Rendering Pipeline) that use Alpha Transparency onto a Render target and found that the alpha value of those Shaders does not get written to the Render Texture because the ColorMask render state is forced to RGB.
1. Download attached "SurfaceShaderColorMaskIssue.zip" project and open in Unity
2. Open "SampleScene" scene
3. Select the "Transparent Surface Shader" in Project window
4. In Inspector, click on "Show generated Code"
5. See at the Generated Code
Expected result: The generated code should not override the ColorMask value
Actual result: The line "ZWrite Off ColorMask RGB" is added, overriding the "ColorMask RGBA"
- This issue reproduces on both Windows and macOS
- This old case seems related to a Case 425429 and Case 618826
Reproduced on Unity 2017.4.0f1, 2017.4.31f1, 2018.3.14f1, 2018.4.5f1, 2019.1.14f1, 2019.2.1f1 and 2019.3.0a11
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [XR] Vulkan graphics device lacks support for additional graphics queue when using Oculus XR provider
- [TransformTool] Shift rotate always reset the rotation value when used
- Crash in wrapper managed-to-native) System.Diagnostics.StackFrame:get_frame_info (int,bo when importing an mp4 5760 x 2880 video
- Bug reporter on MacOS doesn't correctly support dark mode
- [Vulkan][Android] Video Player in 2018.4 using Vulkan does not play Videos