- Home /
How to make background transparent in Unity WebGL program using linear color space
Although the following solutions work well for a program using the Gamma color space, they don't work for a program using the Linear color space. How can I make background transparent?
https://answers.unity.com/questions/1069255/embed-webgl-in-webpage-with-transparent-background.html
https://forum.unity.com/threads/webgl-transparent-background.284699/
I tried to modify the jslib (https://forum.unity.com/threads/webgl-transparent-background.284699/#post-1880667), then I noticed that clearColor function (https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/clearColor) with an alpha value works in the Gamma color space, but doesn't work in the Linear color space. So, I think it's not a WebGL matter and it's a Unity matter.
Hello, We have exactly the same issue. Have you been able to resolve it?
Your answer
![](https://koobas.hobune.stream/wayback/20220612163804im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Change "Color Space" to linear problem 0 Answers
Chrome webgl not working / flashing 1 Answer
How can I make my scene brighter in Linear color space with GearVR in single-pass stereo? 0 Answers
What is linear color space intended for? 1 Answer
Why do my linear textures look different in the editor than in the mobile build? 0 Answers