I have a blue sphere and read plane on the origin. Here are the shaders:
Shader "Custom/Sphere" {
SubShader {
Tags {Queue=Transparent}
Color(0,0,0.5, 0.25)
Pass { }
}
}
Shader "Custom/Plane" {
SubShader {
Blend one one
ZWrite Off
Tags {Queue=Overlay}
Color(0.5,0,0, 0.25)
Pass { }
}
}
This is the output:
If that image doesn’t show, it is a picture of a blue hemisphere sitting on a red plane. the bottom half of the sphere can be made out through the plane. however, the top half is coming out at 0,0,127 – there is no red component. The plane is simply not contributing to these pixels. Why?
I’m setting the plane to render in the ’ overlay ’ queue, so therefore surely it should get rendered AFTER the sphere.
I’m turning off the Z buffer check, so it should definitely write the pixel. I’m also specifying additive blend mode. These upper half sphere pixels should be coming out 127,0,127. What’s going wrong?