WebGL lightning very bright vs Preview

Greetings and good day to everyone, you have to excuse my terrible English but it’s not my native language so bare with me on this one :). I’m kinda new to Unity and i’m having a problem when i build my project to WebGL. So it goes like this , i’m currently building a scene , when i run it in the unity enviroment everything is fine , but when i build it for WebGL , my lightning is very bright and it ruins my entire scene… I’ve built in Unity Player and it’s flawless like the preview… Is it a WebGL thing? Can anyone help me, cause it’s driving me crazy these last few days :face_with_spiral_eyes:.

What have you done so far to attempt to fix the problem?
Additional information about your lighting, reflections, shaders would also be helpful.

Hey thanks for the reply . I have Realtime GI disabled , and Baked GI enabled , for perfomance… My Scene has a reflection probe and all my light sources are baked… And my Materials have Legacy shaders , cause Unity’s Standard Shader tends not work properly on WebGL illiminating all the normal and bump maps i have in the scene. I kinda figured it out, i turned my intensity of the directional light down to 0.5 , and although its kinda dark in the preview, on WebGL it looks normal.

http://postimg.org/image/l67mbztgj/ Lightning Settings

1 Like

Check if your standalone settings are set for Linear Color Space, as I have found that when baking Webgl (which requires Gamma Space) the Lightmapper will get it’s color space from stand alone and bake the lightmaps in Linear Space.

So try set player settings for Standalone to Gamma Space and rebake the textures, then try do your WebGL build.

Let me know if it doesn’t work, and I’ll double check all my settings.

** Side note, your settings you have Directional Lightmaps baking. They don’t work with WebGL as it uses GLES 2.0 you should just bake Non-directional lightmaps for Webgl to save on space **

1 Like

Fixed by upgrading to Unity 2021.2.19f