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
- UI Overlay Image gets darker on each Camera when multiple Cameras are used
- Assertion failed on expression: 'scriptedImporterClass == SCRIPTING_NULL error when opening the standalone profiler window
- Disabled assets in Import Unity Package window aren't tracked but count as being selected by user
- [Windows] Crash on GetManagerFromContext when video is playing and creating High Definition 3D Projects after FMOD failed to switch back to normal output Error appeared
- GC Alloc produced when adding items to MultiColumnListView with Auto Assign Binding
Add comment