# Order-independent transparency + custom shader + needAlphaBlending = broken shader

**URL:** <https://forum.babylonjs.com/t/order-independent-transparency-custom-shader-needalphablending-broken-shader/49339>\
**Category:** Bugs\
**Created:** [April 4, 2024, 9:18am UTC](https://forum.babylonjs.com/t/order-independent-transparency-custom-shader-needalphablending-broken-shader/49339 "2024-04-04T09:18:03Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [April 7, 2024, 10:18pm UTC](https://forum.babylonjs.com/t/order-independent-transparency-custom-shader-needalphablending-broken-shader/49339/3 "2024-04-07T22:18:39Z")

</div>

It’s a bit complicated because you will have to implement the necessary code in your custom shader to support OIT. You should take example on the standard material and look for the `ORDER_INDEPENDENT_TRANSPARENCY` define. You will also have to add `#include<oitDeclaration>` and `#include<oitFragment>` in your shader. Again, look how it is done in the default material ( **shaders/default.vertex.fx** and **shaders/default.fragment.fx** ).

---

_[View the full topic](https://forum.babylonjs.com/t/order-independent-transparency-custom-shader-needalphablending-broken-shader/49339)._
