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
- Crash on "block_merge_next" when entering PlayMode in a scene from the "POLYGON War Map - WWI - Low Poly 3D Art by Synty" package
- [Win ARM] URP projects fail to build that have a space in the name
- [Android][OpenGL]Soft Shadows contain artifacts when the OpenGL Graphics API is used
- The particle system prewarm flag is ignored when calling the Start function after the Stop function
- The Scene view flickers when moving around if there are visible Hair Shaders
Add comment