- Home /
Transparent shader for Android
I'm trying to create a simple blue, transparent cylinder. This works in the preview with any of the transparent shaders (Diffuse, Bumped Diffuse, etc.). However, on the device (Samsung Note 3 is the only one I have) it is the bright pink color indicating that the shader is not working.
I've tried using a couple of suggested mobile shaders:
These all have similar results. They appear white and not transparent in Preview, but still bright pink on the device.
It doesn't seem like any of the default Mobile shaders have transparency either.
Is there anything I can do to create a simple transparent shape on a mobile device?
Answer by StormSabotage · Dec 10, 2013 at 09:03 PM
Particles/Additive or Particles/AlphaBlended from default Unity shaders can let you make transparent texture that will work at Android device, 100% works on Android 2.3.3 and higher.
These both appear white in the preview, but still pink on the device. I'm using it like this:
renderer.material.color = new Color(255, 0, 0, 0.3f);
renderer.material.shader = Shader.Find ("Particles/Additive");
If you only use the shader through Shader.Find(), you need to have it in a Resources-folder so that it gets included in the build. Was bitten by this today myself. :)
Your answer
Follow this Question
Related Questions
How to add rim light for mobile in my shader? 0 Answers
Unity 5 standard shader transparency not working on mobile 1 Answer
Transparency artifacts android 0 Answers
android shader issue 1 Answer
Transparent material on iPhone Android 3 Answers