# Issue with custom shapes rendering

**URL:** <https://forum.babylonjs.com/t/issue-with-custom-shapes-rendering/8580>\
**Category:** Bugs\
**Created:** [February 14, 2020, 2:39pm UTC](https://forum.babylonjs.com/t/issue-with-custom-shapes-rendering/8580 "2020-02-14T14:39:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 14, 2020, 3:41pm UTC](https://forum.babylonjs.com/t/issue-with-custom-shapes-rendering/8580/2 "2020-02-14T15:41:26Z")

</div>

That’s the same problem than here: [Have only certain meshes visibile through transparency?](https://forum.babylonjs.com/t/have-only-certain-meshes-visibile-through-transparency/8551)

Why not using a material without alpha for the pieces that don’t need transparency?

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

Alternatively, instead of enduring the penalty for `needDepthPrePass = true` you can simply set `mat1.forceDepthWrite = true`:

[https://playground.babylonjs.com/#NXRT8H#2](https://playground.babylonjs.com/#NXRT8H#2)

---

_[View the full topic](https://forum.babylonjs.com/t/issue-with-custom-shapes-rendering/8580)._
