I haven’t tried my hand at shaders yet. Could a shader theoretically do the following?
-
It looks like a plain old glossy opaque object normally.
-
BUT when another object of the SAME shader passes behind it, you see a new color. LIke “seeing through to” the other object, only what you see is a color change.
Example:
Two solid yellow squares, one near, one far, move across the screen until their corners overlap. The area of the overlap makes the front square turn blue just in that area. So you are “seeing through” to the other yellow square’s shape, and that shape manifests as blue instead of any kind of real transparency. Meanwhile, both squares are opaque to the background (including other objects/shaders), with the “see through” effect ONLY affecting each other. (See attached mockup.)
Would a shader (or pair of shaders, or tags/layers) be able to do that?
It’s not anything important, just an exercise trying to re-create a 3D logo effect that I did with masks in Flash.