# How to highlight backfaces

**URL:** <https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596>\
**Category:** Questions\
**Created:** [February 25, 2019, 12:44pm UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596 "2019-02-25T12:44:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zuzukidze](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zuzukidze/32/1469_2.png) [@Zuzukidze](https://forum.babylonjs.com/u/Zuzukidze)\
**Post date:** [February 25, 2019, 12:44pm UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596/1 "2019-02-25T12:44:36Z")

</div>

I want culled backfaces to be highlighted  
[https://playground.babylonjs.com/#M0XJR4](https://playground.babylonjs.com/#M0XJR4)

---

<div class="post-metadata">

**Author:** ![nogalo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nogalo/32/120_2.png) [@nogalo](https://forum.babylonjs.com/u/nogalo)\
**Post date:** [February 25, 2019, 1:43pm UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596/2 "2019-02-25T13:43:50Z")

</div>

Does something like this help you?

[https://playground.babylonjs.com/#M0XJR4#1](https://playground.babylonjs.com/#M0XJR4#1)

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

---

<div class="post-metadata">

**Author:** ![Zuzukidze](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zuzukidze/32/1469_2.png) [@Zuzukidze](https://forum.babylonjs.com/u/Zuzukidze)\
**Post date:** [February 26, 2019, 11:10am UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596/3 "2019-02-26T11:10:11Z")

</div>

Sorry, I need face to be invisible

---

<div class="post-metadata">

**Author:** ![nogalo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nogalo/32/120_2.png) [@nogalo](https://forum.babylonjs.com/u/nogalo)\
**Post date:** [February 26, 2019, 12:12pm UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596/4 "2019-02-26T12:12:52Z")

</div>

Oh. Maybe edgeRenderer can help you in that case.

[https://playground.babylonjs.com/#M0XJR4#2](https://playground.babylonjs.com/#M0XJR4#2) (lines 37-39)

But on more complex meshes this can cause unwanted results.

---

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [February 26, 2019, 2:42pm UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596/5 "2019-02-26T14:42:27Z")

</div>

Hi guys. I did a little goofing-around.

[https://playground.babylonjs.com/#M0XJR4#3](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.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 26, 2019, 2:52pm UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596/6 "2019-02-26T14:52:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zuzukidze](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zuzukidze/32/1469_2.png) [@Zuzukidze](https://forum.babylonjs.com/u/Zuzukidze)\
**Post date:** [March 3, 2019, 11:55am UTC](https://forum.babylonjs.com/t/how-to-highlight-backfaces/1596/7 "2019-03-03T11:55:21Z")

</div>

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