i know from the docs that using Highlight layer could be expensive. In a scene with few meshes i didn’t found big issue, but when the meshes increase (hundreds) i can experience low performance.
This is an example of my project: a warehouse with selectable items that are highlighted.
In the picture you can see i use two layer (one for green selection and one for white) because with only one layer there are problem with different colors.
The solution i use is to clear all selections when the user click away or move the camera, but i wonder if there are some other best practice when working with higlight layer.
One would be to use the excluded meshes for anything which should not hide it so you limit at the min the number of elements you use inside it.
I think grouping the highlighted meshes might actually help here don’t quote me.
And what about using glow layer instead of highlight layer? Has it the same performance issue or could it be a better solution? The final result is obviously different, but i think it could be ok for my project.
Ok, i confirm that, for my particular application, is much better using glow layer. I get quite the same result without lack in performance.
Yup glow is a bit faster as it does not rely on stencil