Search Issue Tracker
By Design
Votes
0
Found in
2021.3.33f1
2022.3.14f1
2023.2.2f1
Issue ID
UUM-59078
Regression
No
Fragment Shader has "0" set on the alpha when returning float3 or half3
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Scenes/SampleScene” Scene
3. Observe the Game View
Expected result: The “Cube” GO is red
Actual result: The “Cube” GO is transparent
Reproducible with: 2021.3.33f1, 2022.3.14f1, 2023.2.2f1
Couldn’t test with: 2023.3.0a16 - The Game View shows “No cameras rendering”
Reproducible on: Windows 10
Not reproducible on: No other environment tested
Notes:
- Workaround: comment lines 43-47 and uncomment lines 50-53 in “ShaderBug.shader” asset
- When previewing the “AlphaRenderTexture” asset, a red cube is visible
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
- Spot Light with 'Box' Shape stops working when it collides with Mesh
- Accepting Asset Store EULA endless loop in Package Manager window
- “InvalidOperationException: Sequence contains no matching element“ error when reenabling a custom Debug Draw Mode
- Prefab that contains a layout group is marked as changed by the Editor when opened
- Emission animation does not appear when the "Emission Map" parameter is set to black in a Lit material
Resolution Note:
If the fragment shader doesn't write a value to a subset of channels, the resulting data in these channels depends on the content of the render target. The content of the render target may either be undefined (if nothing wrote to it and it's configured to not clear the data) or it contains the data that was written to it before, either by another fragment shader invocation or by the clear command.