RenderingGroupId on edges

Hello everyone, I hope u all good!
I’ve got a small question. I am using mesh.enableEdgesRendering() to enable edges for mesh.
Is it possible or could be possible to change edges renderingGroupId separately from mesh renderingGroupId.

So e.q. in this playground. only edges could be visible through the sphere.

I was thinking about creating two the same boxes. One invisible with edges and the second one visible without edges (with renderingGroupId like the sphere or lower) so I’ll have the desired effect but I think maybe it could be done better :slight_smile:

This is the effect I’m talking about:
I’m just wondering if it could be done without duplicating the mesh.

I’m afraid it’s not possible and won’t be because the edge renderer is really tied to the same rendering group than the mesh.

A solution other than duplicating the box would be to override the edge renderer render method to disable depth testing when rendering the edges of the cube:

1 Like

It works great thank you. I had some problems with implementing this in angular (typescript). It occurs that adding @ts-ignore solved my problem

// @ts-ignore
EdgesRenderer.prototype._render = EdgesRenderer.prototype.render;