# Covex versus concave edges

**URL:** <https://forum.babylonjs.com/t/covex-versus-concave-edges/34488>\
**Category:** Questions\
**Tags:** rendering\
**Created:** [October 4, 2022, 6:17pm UTC](https://forum.babylonjs.com/t/covex-versus-concave-edges/34488 "2022-10-04T18:17:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/anton/32/4310_2.png) [@Anton](https://forum.babylonjs.com/u/Anton)\
**Post date:** [October 4, 2022, 6:17pm UTC](https://forum.babylonjs.com/t/covex-versus-concave-edges/34488/1 "2022-10-04T18:17:45Z")

</div>

Hi everyone,

By now I know that edge rendering is a separate step from mesh rendering.  
Here is an issue that I am seeing:

> **[Babylon.js Playground](https://playground.babylonjs.com/#AJJ8U5%2350)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Looking at the “shoulder” it can be seen that convex edges show up, but the concave one doesn’t:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/a/daa72abbd94b08329ea87b1c65f37b27bffc61a9.png)

Yet the edge is there if the draggable clipping plane is lowered enough:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/1/518ef123ee0c2e0bb493d7f8c52fb0d29600c6d3.jpeg)

So the edge gets drawn, but seemingly before the mesh gets drawn, so that it’s not visible when the mesh is there.

Is there a way I can play with the rendering order of mesh and edges to see both convex and concave edges and still preserve depth rendering order (e.g. not see edges that are behind the mesh)?

Thank you,  
Anton.

---

<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:** [October 4, 2022, 7:55pm UTC](https://forum.babylonjs.com/t/covex-versus-concave-edges/34488/2 "2022-10-04T19:55:41Z")

</div>

Unfortunately the only way would be to move the mesh ☹ as the edges draw outside so in the mesh which is hidding it.
