Search Issue Tracker
Not Reproducible
Votes
0
Found in
5.3.4p6
Issue ID
801584
Regression
No
Metal shader compiler treats const variables differently than OpenGLCore compiler
Reproduction Steps:
1. Open project
2. Pick OSX standalone target
3. Select "NewUnlitShader.shader" in Editor
4. In inspector under "Compile and show code" pick only Metal API
5. Click "Compile and show code"
6. Notice error in the console:
Shader error in 'Unlit/NewUnlitShader': 'const' : non-matching types for const initializer at line 44 (on metal)
Compiling Vertex program
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_NO_LINEAR_COLORSPACE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_MOBILE SHADER_API_DESKTOP
7. Try the same with OpenGLCore - no errors
Expected behaviour: If GLCore compiles the code, the Metal should compile it too.
Reproduced in versions: Unity 5.3.4p6, 5.3.5p2, 5.4.0b20
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment