IOS does not render `fade` rendering mode
I am working with vuforia package to create an AR software.
Everything works just fine on the computer. However, IOS messes up.
I am creating some gameObjects dynamically, meaning that with a C# script. Then I am setting the rendering mode of the material of those objects to fade
through following piece of code;
mat.SetFloat("_Mode", 2);
mat.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
mat.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
mat.SetInt("_ZWrite", 0);
mat.DisableKeyword("_ALPHATEST_ON");
mat.EnableKeyword("_ALPHABLEND_ON");
mat.DisableKeyword("_ALPHAPREMULTIPLY_ON");
mat.renderQueue = 3000;
And then I am assigning transparent color to those objects' material
new Vector4(255,0,0,0.5f);
When I do so, those objects appear red
with full opacity, no transparency at all. The strangiest part is, I am using ray tracing technique to detect touch/click on those objects. That works fine on the computer, but iphone does not register any touches on the objects.
Before implementing this transparent material thing, I tried the app on the iphone and the touches were being registered.
I am really confused with this problem and no clue how to tackle it. Would appreciate any helps.
Answer by digableMatt · Nov 01, 2018 at 03:56 PM
I just encountered this @oquas, did you ever find a solution? I am experiencing the same problem where materials set to "fade" appear red and do not honor any alpha setting.
Your answer
Follow this Question
Related Questions
Transparency / Fade Material lighing issues 0 Answers
Issues with Mathf.MoveTowards 2 Answers
Shader not working properly in a build 0 Answers