Is it possible to use gpu picking and layers together?
Any reference, please
Unfortunately, it’s not. Layers are evaluated when 3D objects are prepared for rendering of the current frame. GPU picking happens afterwards based on a render target.
And what if i need to hide some objects? what about visibility, will it work with gpu picking?
Are you referring to
Object3D.visible? If so, it’s the same like when using layers.
So there is no way i can use gpu picking for objects that are hidden/shown during some sceen?(
Some screen yes, but not some scene. You would have to enable the layer when rendering to the pick target. However you do not need to render those objects you want hidden when you actually render your main frame. The scene, even if it’s the same instance, would have two different states for these two calls.