# Transparent box flicker problem

**URL:** <https://forum.babylonjs.com/t/transparent-box-flicker-problem/21104>\
**Category:** Questions\
**Tags:** material\
**Created:** [May 25, 2021, 9:46am UTC](https://forum.babylonjs.com/t/transparent-box-flicker-problem/21104 "2021-05-25T09:46:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhang](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zhang](https://forum.babylonjs.com/u/zhang)\
**Post date:** [May 25, 2021, 9:46am UTC](https://forum.babylonjs.com/t/transparent-box-flicker-problem/21104/1 "2021-05-25T09:46:53Z")

</div>

[Alpha | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#1PLV5Z#62)  
Is there a good way to solve this problem？

---

<div class="post-metadata">

**Author:** ![zhang](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zhang](https://forum.babylonjs.com/u/zhang)\
**Post date:** [May 25, 2021, 10:18am UTC](https://forum.babylonjs.com/t/transparent-box-flicker-problem/21104/2 "2021-05-25T10:18:18Z")

</div>

Use alphamode = 1; Yes, but the color of the box is wrong；  
[Alpha | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#1PLV5Z#61)

---

<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:** [May 25, 2021, 11:06am UTC](https://forum.babylonjs.com/t/transparent-box-flicker-problem/21104/3 "2021-05-25T11:06:54Z")

</div>

See [this doc](https://doc.babylonjs.com/divingDeeper/materials/advanced/transparent_rendering) regarding problems when rendering transparent objects.

But even facet data sorting won’t work in your case:  
[https://playground.babylonjs.com/#1PLV5Z#64](https://playground.babylonjs.com/#1PLV5Z#64)

OIT should be able to render this scene correctly:

> <https://github.com/BabylonJS/Babylon.js/issues/10187>
>
> As discussed on the forum \[#1\](https://forum.babylonjs.com/t/order-independent-t…ransparency/14262), \[#2\](https://forum.babylonjs.com/t/transparent-material-clipping-or-how-is-this-called/7353/6), \[order-independent transparency\](https://en.wikipedia.org/wiki/Order-independent\_transparency) could be a nice feature to add, helping people to handle some alpha issues.
> 
> Here a webGL implementation example: \[WebGL 2 Example: Weighted, Blended Order-independent Transparency\](https://tsherif.github.io/webgl2examples/oit.html), and some usecases \[about why it is useful\](https://docs.aws.amazon.com/lumberyard/latest/userguide/graphics-rendering-order-independent-transparency.html).
