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
7000.0.0a1
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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