Highlightlayer covering whole mesh

Hey guys,
I’ve got a problem with the highlight layer. The following picture shows a custom mesh which are rectangles put together in one mesh and then highlighted using the highlight layer. When I try to use highlight.innerGlow = false, nothing changes. When I use highlight.outerGlow = false, all the highlight goes away. Can anyone help me figure out the problem?

Thank you very much!

And I’ve got another question if anyone can answer. I’ve got multiple custom meshes on top of each other. when one of the meshes in the middle is highlighted, it goes on top of every mesh infront of it. How can i make it so that it’s at the ‘right’ place?

thanks

Hello, did you make sure to turn on stencil buffer?
https://doc.babylonjs.com/how_to/highlight_layer#how-to-use

Thanks, I forgot about that. it’s better now but some problem still presists.

with outerglow = false:
front:

back:

with innerglow = false:
front:
innerglowFalseFront

back:

the innerglow=false seems to have a “shadow” that highlights the previous mesh.

Pinging @sebavan

Could you repro in the playground ? This sounds tough to fix without a repro