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
- GUI.changed is not set when dragging objects onto the header of a Reorderable List
- Window preview appears on a different monitor when undocking and dragging a window with a high-resolution monitor set up on the right and a low-resolution monitor on the left.
- Probe Volume Baking Set Reference Documentation is missing
- Crash on RendererScene::NotifyInvisible when entering Play mode after undoing a change within the scene with Ctrl+z
- [iOS] Final Image misaligned when using "ScalableBufferManager.ResizeBuffers" to resize
Add comment