Hey Guys,
I'm working on an iPad app and I wrote a simple shader to produce an emissive (glow) effect on the mesh based on an alpha map. When I apply it in the Editor, it works perfectly as it is supposed to, in either graphics emulation GLES 1.1 or 2.0. When I put the build on the iPad, however, it's not working at all (looks like it falls back to a plain diffuse). Can anyone shed some light on the situation? Below is my shader code:
Shader "FX/Highlight" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_EmissiveMap ("Emissive Map", 2D) = "white" {}
_GlowColor ("Glow Color", Color) = (1,1,1,1)
_GlowStrength ("Glow Strength", Range(0,1)) = 0
}
SubShader {
Lighting On
Material
{
Diffuse (1,1,1,1)
Ambient (1,1,1,1)
Emission [_GlowColor]
}
Pass {
SetTexture[_MainTex] { combine texture }
SetTexture[_EmissiveMap] { combine primary lerp(texture) previous }
SetTexture[_MainTex] { ConstantColor(1,1,1,[_GlowStrength]) combine texture lerp(constant) previous }
}
}
}
I can't understand what you're trying to do here, at all. Does the shader look like you want when you build for OpenGL ES 1.1?
– JessyThe shader doesn't look like anything on either build. We tried GLES 1.1 and 2.0 and it falls back to straight diffuse.
– anon82646189