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
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
- Incorrect rotations on bones when importing FBX animations with a Humanoid Rig
- Render Graph Viewer “Pass List” section is flickering when resizing vertically and the Render Graph Viewer window is docked
- Render Graph Viewer Capture button plays the click animation but does not do anything when the Capture button is pressed with the “Enter” key on the keyboard
- UI Builder Scrollview is unable to scroll all the way down when the window is downsized vertically
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.