billboardModeAll breaks pick order for instances


while playing around with instances I noticed that I can’t pick a instancedMesh which is in front of a normal mesh if I use billboardMode. It’s working fine if a normal mesh is in front of a normal mesh but the instances have to be different here. Is there any way to fix this?



I tested it with bjs gui but there is the same problem. Pointer blocking is not working for instances with billboardmode = all:

The whole purpose is that I don’t want to create a separate mesh for each button. I was able to create node material that updates the color for the hovered instances only but I can’t get my instanced mesh to block pointer events.

Here’s a PR that will fix this problem: