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
- Placeholder asset is not loaded with Advertisement Legacy sample when using the latest version of the package
- Addressables content build fails but the Player build is successful when building a development build
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
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.