- Home /
Shader help (Animating Alpha values does not work on it!)
I am not so good in shaders. how can i modify this ios based transparency shader, so i can animate the alpha value in the animation editor?
Shader "iOS/Unlit Transparent Vertex Colored" { Properties { _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} }
Category { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} ZWrite Off Alphatest Greater 0 Blend SrcAlpha OneMinusSrcAlpha SubShader { Pass { BindChannels { Bind "Vertex", vertex Bind "texcoord", texcoord Bind "Color", color }
Lighting Off SetTexture [_MainTex] { Combine texture primary, texture primary } } } } }
Answer by SOIL · Dec 15, 2010 at 12:03 PM
I found out what causes the alpha problem. on some parts i get a better view in shader stuff.
here my form of a optimized IOS transparency vertexLit shader with animatable alpha values for the animaton window:
Shader "USED/Transparent_VertexLit_modified" { Properties { _Color ("Main Color", Color) = (1,1,1,1) _Emission ("Emissive Color", Color) = (0,0,0,0) _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} }
// 1 texture stage GPUs SubShader { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} LOD 100
Alphatest Greater 0
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Pass {
Material {
Diffuse [_Color]
Ambient [_Color]
Emission [_Emission]
}
Lighting On
SetTexture [_MainTex] {
Combine texture * primary DOUBLE, texture * primary
}
}
} }
i don't know how fast this shader really is. xD but it seems to be slightly for IOS games.