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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
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.