Problems exporting to Android

Hello all.
I got a little problem here, every time i export a test game i get an error and then all the colors in my game change completely.
The error is:

Shader is using clip instructions (usually caused by alpha test). It might cause problems on some qualcomm/adreno drivers.
unityeditor.hostview:ongui()

any idea on how to fix this?

I got that error when I applied a shader that used alpha clipping. Android doesn’t like it and it caused my game to explode. I’m sure there is a more efficient way to handle see-through parts on mobile devices, but I haven’t pursued it…

Yeah i have been dealing with that error for a couple of days now.

Hi!

Did anyone found a solution for this? I would like to have a decent mobile shader for leaves/trees/vegatation on Android. Current one works well and fast, but gives this warning.

I’m using this one:

Shader “Mobile/Particles/Alpha Blended” {
Properties {
_MainTex (“Base (RGB) Transparency (A)”, 2D) = “” {}
}
SubShader {
Pass {
// Only render pixels with an alpha larger than 50%
AlphaTest Greater 0.5
SetTexture [_MainTex] { combine texture }
}
}
}

That alpha test will cause a 100% hang / reboot on HTC Thunderbolt and a number of other phones.

Unfortunately I don’t have a good solution for you, I’m still working on a solution for us.

Well instead of using the clip() if you write a shader that sets the pixel’s alpha value to 0.0 it works better. That’s what NGUI does for their alpha clip shaders (instead of hard clip).

Hey, do you have any more info on this topic? I am working on a winter game with a couple of snow particle systems, and I am using the default mobile particle/additive shader on most of them. I get the hang/reboot on HTC Thunderbolt, but the game works great on the HTC Rezound and better phones.

EDIT: Actually it is my trees, they are using hidden/nature/tree creator/…

what is this? an editor warning only?
any way to fix or supress?
i can replicate this with new scene, new ui panel, build for android
thanks