Search Issue Tracker
By Design
Votes
0
Found in
2021.3.46f1
2022.3.54f1
6000.0.30f1
6000.1.0a7
Issue ID
UUM-89984
Regression
No
Compiled Shader code has self-assignments and redundant code in the Shaders that use "enable_d3d11_debug_symbols"
How to reproduce:
1. Open the attached “IN-89929.zip” project
2. Select the “NewUnlitShader” Shader Asset in the Project window
3. In the Inspector expand the “Compile and show code” Dropdown button
4. Select the “Metal” option in the Dropdown
5. Press the “Compile and show Code” Button in the Inspector
6. Observe the generated code
Excepted results: Compiled Shader code has no issues
Actual results: Shader has self assignments, such as ‘u_xlat0 = u_xlat0;'
Reproducible with: 2021.3.46f1, 2022.3.54f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: Windows 11, Windows 10 (user’s)
Not reproducible on: macOS 15.1.1 (Intel)
Notes:
- Reporter noted that changing Target Platform to Switch reproduces the issue, but targeting Windows Standalone doesn’t reproduce the issue, however during testing this was not observed issue was always reproducible regardless of Build Target, but using the “Current Build Platform” option in the “Compile and show code” will accordingly show results. If macOS is the Target Platform the issue is reproducible, if the Target Platform is Windows it will not reproduce the issue.
- Reproducible with Graphics Platforms: GLES3x, Metal, OpenGLCore
- Not reproducible with Graphics Platforms: D3D, Vulkan, WebGPU
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
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
- "Assertion failed on expression" error occurs when multiple Animation Components are instantiated after changing the Culling Type
- MacOS persistentDataPath uses old path when built compared to Editor Play mode
- Crash on RaiseException when entering Play Mode in a specific project
- Debug Console does not reappear when disabling and re-enabling Debug.developerConsoleEnabled
Resolution Note:
Turning on debug symbols also turns off all compiler optimizations.
It is expected that the resulting code is different.