How to highlight backfaces

I want culled backfaces to be highlighted

Does something like this help you?

You need to create material with the backFaceCulling set as false which enables you to get that result.

Sorry, I need face to be invisible

Oh. Maybe edgeRenderer can help you in that case. (lines 37-39)

But on more complex meshes this can cause unwanted results.

1 Like

Hi guys. I did a little goofing-around.

Used MeshBuilder plane for ground… with sideOrientation = both-sides. (Which kills backfaceCulling so… it sucks).

I set a light.groundColor that sort-of matches scene.clearColor… to light the bottom of the ground plane.

Nothing useful learned/found, so far. :slight_smile: Just having some fun.

Let’s ping @sebavan to see if he might know of a “work-around” for this. Otherwise… hmm. Might require some serious hacking of highlightLayer code… IF this is possible at all. HighlightLayer and GlowLayer have some strict rules… which are necessary to make them function.

It is unfortunately not possible as the stencil and depth need to be filled so the pixels needs to be written :frowning: I am not seeing any easy hack on this one.

1 Like

Thanks a lot!! That’s definitely what I needed

1 Like