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
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
- Crash on OnDemandScheduler::HandleImportWorkerLogs when performing various Unity operations
Add comment