# SSR does not support transparent background

**URL:** <https://forum.babylonjs.com/t/ssr-does-not-support-transparent-background/12432>\
**Category:** Bugs\
**Created:** [July 13, 2020, 7:30am UTC](https://forum.babylonjs.com/t/ssr-does-not-support-transparent-background/12432 "2020-07-13T07:30:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kesshi](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@Kesshi](https://forum.babylonjs.com/u/Kesshi)\
**Post date:** [July 13, 2020, 7:30am UTC](https://forum.babylonjs.com/t/ssr-does-not-support-transparent-background/12432/1 "2020-07-13T07:30:10Z")

</div>

We are using a transparent background (clearColor) to render the 3D scene on top of our website. This does not work with SSR. The backround is black if the clearcolor is transparent:  
[https://www.babylonjs-playground.com/#8L4MQ3](https://www.babylonjs-playground.com/#8L4MQ3)

If you disable line 54 the background will be red as it should be.

---

<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:** [July 13, 2020, 1:12pm UTC](https://forum.babylonjs.com/t/ssr-does-not-support-transparent-background/12432/2 "2020-07-13T13:12:47Z")

</div>

The SSR postprocess does not preserve the alpha component of the albedo texture.

I have updated the shader in this PG so that the alpha component of the albedo texture is used as the final alpha component:

[https://www.babylonjs-playground.com/#8L4MQ3#1](https://www.babylonjs-playground.com/#8L4MQ3#1)

I guess I could do a PR for this: @julien-moreau What do you think? Is there any side-effect of doing that?

---

<div class="post-metadata">

**Author:** ![julien-moreau](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/julien-moreau/32/12070_2.png) [@julien-moreau](https://forum.babylonjs.com/u/julien-moreau)\
**Post date:** [July 15, 2020, 9:02pm UTC](https://forum.babylonjs.com/t/ssr-does-not-support-transparent-background/12432/3 "2020-07-15T21:02:33Z")

</div>

Hey @Evgeni_Popov you rocks !!  
I don’t think this causes any issue as the reflection is mixed only with rgb here and doesn’t take care of the alpha.

Thanks for that fix! I let you create the PR ? =D

---

<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:** [July 16, 2020, 10:59am UTC](https://forum.babylonjs.com/t/ssr-does-not-support-transparent-background/12432/4 "2020-07-16T10:59:25Z")

</div>

No problem:

> <https://github.com/BabylonJS/Babylon.js/pull/8542>
