I want culled backfaces to be highlighted
https://playground.babylonjs.com/#M0XJR4
Does something like this help you?
https://playground.babylonjs.com/#M0XJR4#1
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.
https://playground.babylonjs.com/#M0XJR4#2 (lines 37-39)
But on more complex meshes this can cause unwanted results.
Hi guys. I did a little goofing-around.
https://playground.babylonjs.com/#M0XJR4#3
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. 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 I am not seeing any easy hack on this one.
Thanks a lot!! That’s definitely what I needed