To the right person with shader knowledge this should be obvious and easy but it has eluded me for months. I have tried fiddling with every setting possible and nothing seems to work. (ztest/blend/ignoreProjector… etc)
The scenario:
There is a wall. In the the wall is a door (a quad with a camera render image on it). In the room is a semi-transparent quad (with my shader attatched). If i am in the same room as the quad the shader works perfectly. If I look at the quad through the door it blends in the wall infront of it (because of the alpha). Standard Sprite shader doesnt have this issue.
Currently using:
Blend SrcAlpha OneMinusSrcAlpha
Shader code is pretty much 2 lines:
col1 = tex2D(_MainTex, q.uv1);
col1 = lerp(col1, _OutTint, _OutAmount);
Any help would be greatly appreciated.