Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.36f1
2022.3.21f1
2023.2.14f1
6000.0.0b11
6000.1.0a7
Issue ID
UUM-66442
Regression
No
[Silicon] Artifacts are visible in a shader when it has a dither pattern
Reproduction steps:
1. Open the attached “ReproProj” project
2. Open the “Assets/Scenes/SampleScene.unity” Scene
3. Observe the Game view
Expected result: All materials in the Game view are clearly visible
Actual result: The “Sphere” GameObject has artifacts
Reproducible with: 2021.3.36f1, 2022.3.21f1, 2023.2.14f1, 6000.0.b11
Reproducible on: macOS 14.3.1 (M1 Max)
Not reproducible on: macOS 13.6.4 (Intel)
Note: The issue is more visible when zooming in/out
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
- 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
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
Alas, this seems to be a quite low-level issue inside drives with register allocation in the case of the non-uniform control flow (due to discard)
There are, though, two quite easy workarounds:
1. change `float DITHER_THRESHOLDS[16]` to be `const float DITHER_THRESHOLDS[16]` (or, more generally, make readonly array const indeed). This will move the initialization from runtime to "compiler, here is const data, please do something"; compiler seem to do the right thing
2. add `#pragma use_dxc metal` to the shader in question - dxc is WAY better at generating the code for filling float array used in the shader (in repro project), making it actually float1 and const
Resolution Note:
Alas, this seems to be a quite low-level issue inside drives with register allocation in the case of the non-uniform control flow (due to discard)
There are, though, two quite easy workarounds:
1. change `float DITHER_THRESHOLDS[16]` to be `const float DITHER_THRESHOLDS[16]` (or, more generally, make readonly array const indeed). This will move the initialization from runtime to "compiler, here is const data, please do something"; compiler seem to do the right thing
2. add `#pragma use_dxc metal` to the shader in question - dxc is WAY better at generating the code for filling float array used in the shader (in repro project), making it actually float1 and const