OK so I have this fairly simple shader (from 2d-toolkit gui)…
I added a second pass to add a glow texture on top, (plus I scroll the material offset so it looks like a shimmer)
The material is also copied/instanced when it is used.
It works great in unity set to graphical emulation 2.0 (even in shader model 1.0 emulation)
but on device(iPad3), there is no second layer texture… looks almost like its adding a grey or white flat color to my base texture.
There are no errors, and it doesn’t show up magenta.
It still seems to be correctly using the alpha of the base texture to clip the second layer, but there is no sign of the actual second layer texture…
Something is going wrong… but no idea what or why.
Any thoughts ?
Help appreciated. thanks.
Shader “tk2d/BlendVertexColorShimmer”
{
Properties
{
_MainTex (“Base (RGB) Trans (A)”, 2D) = “white” {}
_ShimmerTex (“Base (RGB) Trans (A)”, 2D) = “white” {}
}
SubShader
{
Tags {“Queue”=“Transparent” “IgnoreProjector”=“True” “RenderType”=“Transparent”}
LOD 100
ZWrite Off
ZTest Off
Cull Off
Blend SrcAlpha OneMinusSrcAlpha
BindChannels
{
Bind “Vertex”, vertex
Bind “TexCoord”, texcoord
Bind “Color”, color
}
Pass
{
Lighting Off
SetTexture [_MainTex] { combine texture * primary } //regular tk2d texture
}
Blend SrcAlpha One //color addition
Pass
{
Lighting Off
SetTexture [_MainTex] { combine texture * primary }
SetTexture [_ShimmerTex] { combine texture*previous }
}
}
fallback “tk2d/BlendVertexColor”
}