-
Easy way to do a “visibility status”-check on a 2d/3d-point?
I’m sure someone has done this before. I just can’t seem to get my wording right when I do google-searches and on this site.
I want to know if there’s an easy way to do a “visibility check”.
I mean. If I have a point, 2d or 3d. I want to be able to determine if that point is obscured by pixels of another layer. And as a bonus, maybe even know the sum-total of the alpha-channel change that the other layers are adding to the target-points pixel. The icing on the cake would be to get whatever color is being added to the point before its fully obscured.
The common example: I have a lens flare that’s supposed to follow something in space. But at the same time I want stuff to obscure it. I could just put it in a layer beneath, but that would obscure all parts of the flare with all the opaque pixels in front. I want it so that it only reacts to when the target-point (the light-emitter) is obscured. Like in real life.
I’m sure people have been using functions like this in some way. I just want to know how…