Search Issue Tracker
Not Reproducible
Votes
0
Found in
5.6.1f1
Issue ID
944214
Regression
No
[Metal][iOS] Weather/Diffuse Shader error: "Compilation failed: cannot use as_type cast"
Steps to reproduce:
1. Open the attached project
2. Build to iOS
3. Observe the cube in iOS device
Expected result: cube is black&white
Actual result: cube is pink, Debug log is flooded with these messages:
Compilation failed:
program_source:97:29: error: cannot use as_type to cast from 'half' to 'int', types of different size
u_xlati9 = u_xlatb2.y ? as_type<int>(u_xlat16_2.x) : int(0);
^~~~~~~~~~~~~~~~~~~~~~~~~~
program_source:115:53: error: cannot use as_type to cast from 'half' to 'unsigned int', types of different size
u_xlati22 = int(uint(u_xlatb22) * 0xffffffffu | as_type<uint>(u_xlat16_2.y));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
program_source:119:34: error: cannot use as_type to cast from 'half' to 'int', types of different size
u_xlati22 = u_xlatb4.y ? as_type<int>(u_xlat16_2.x) : int(0);
^~~~~~~~~~~~~~~~~~~~~~~~~~
Reproduced on: 5.5.4p2, 5.6.3f1, 2017.1.0p5, 2017.2.0b6 (Metal)
Could not reproduce on: 2017.3.0a4, on this version the shader has a compile error in the editor:
Too many texture interpolators would be used for ForwardBase pass (11 out of max 10)
Thus the cube is purely white on both Metal and OpenGLES2
______
FIXED IN 2017.3
The line "#pragma target 3.0" should be commented out or removed.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Profiler connects to a different opened Editor project when more than one project is open and building for WebGL with Autoconnect Profiler enabled
- Creating and then deleting the "Integration Update: Rotation" block breaks and makes unusable VFX Graph
- “ArgumentNullException: Value cannot be null.” when deleting a newly created input action
- Undoing the creation of the "Button - TextMeshPro" GameObject only removes Canvas and EventSystem GameObjects
- NullReferenceException errors are thrown when entering the Play Mode when ShaderGraph window is focused
Add comment