I want to show semi-transparent circular areas in my unity3d project. I use a projector for this. My problem is that when the areas overlap, the colour is intensified. I want to have the same colour over the entire area.
The shader that I use looks like this:
Shader "Projector/Additive Tinted" {
Properties {
_Color ("Main Color", Color) = (1,0.5,0.5,1)
_ShadowTex ("Cookie", 2D) = "" { TexGen ObjectLinear }
_FalloffTex ("FallOff", 2D) = "" { TexGen ObjectLinear }
}
Subshader {
Pass {
ZWrite off
Fog { Color (1, 1, 1) }
Color [_Color]
ColorMask RGB
Blend One One
Offset -1, -1
SetTexture [_ShadowTex] {
constantColor [_Color]
combine texture * constant, ONE - texture
Matrix [_Projector]
}
SetTexture [_FalloffTex] {
constantColor (0,0,0,0)
combine previous lerp (texture) constant
Matrix [_ProjectorClip]
}
}
}
}
Can this be solved with a different shader, or can ite be done some other way?