I use 3 universal cameras for layers:
- Main camera. Layer mask = 0x0fffffff
- Secondary camera. Layer mask = 0x10000000
- GUI camera. Layer mask = 0x20000000
My scene has about 3600 instance meshes.
With each additional camera the fps gets lower and lower.
The performance profiler shows that my bottleneck is scene’s method _evaluateActiveMeshes.
I see that all active meshes are iterated.
Why is there no check for belonging to a mask layer? For example, why would my GUI camera run through all the active meshes when I only have 2 UI buttons?