Here is what I have so far (many thanks to the playground examples for mirrors and occlusion queries): https://www.babylonjs-playground.com/#1YAIO7#109
The background turns green when
occludee.isOccluded is true, and blue when it is false.
occludee (the red box) is visible, the background is blue as expected:
isOccluded becomes true when the box in the mirror is off-screen, even when the original isn’t:
It doesn’t get occluded by the original blue box:
But does get occluded by the reflected box (note that the z position of the red box is changed here):
Effectively, everything in the original scene is ignored for the occlusion queries. If the mirror isn’t set to reflect the red box, the occlusion queries work correctly, but I would like to detect if the original or its reflection is visible on-screen. Is this doable?