Scenario
I'm trying to get meshes to inherit color from other meshes that are in physically in front
example:
Mesh A Mesh B Camera
(white) (red)
+---+ |\
[] | | << | ]
+---+ |/
I don't want Mesh B to be visible at all BUT I want Mesh A to be red where Mesh B would be blocking the view of Mesh A. All I can think of is that this is a kind of color overlay.
Prototype
I made a three.js prototype where two planes are partially blocking the view of a white sphere. I want to be able to turn the plans into a color overlay so that the sphere shows red, white, and blue (accidental usa flag colors)
Question
Is there a way to do this with THREE? I'm not fixed to this way of doing things but it seems possible, I just haven't come across the right documentation yet.