Lighting looks darker on build

Hello. I am using 2021.2.14f with URP 12.1.5. I tune my lighting in the editor but standalone player produces noticeably darker lighting like so:

The scene contains 1 mixed directional light. Lightmaps are up to date on the build as well. Heres my lighting settings:

Does somebody know why would this happen? I initially thought it was because of lightmap compression but it’s not. Settings->Player->Lightmap Encoding is also set to High Quality as with lighting settings. Please help.

1 Like

Make sure to reimport your lightmaps if you recently changed the lightmap encoding

Thanks, I already did a clean rebake since then(clear all + bake again) and that didnt fix it

1 Like

Am having the same issue
What’s fixed it was enabling Screen Space Ambient Occlusion
Although the solution works, I still need other suggestions because SSAO can be too much for mobile

1 Like

Elsewhere in this forum, it was suggested that disabling post-process shader stripping in URP global settings would solve the darkening effect. It didn’t do it for us, but maybe you’ll have better luck?

I was also having the same issue. I was using URP and I migrated my project from Unity 2020.3 LTS to 2021.3 LTS and suddenly my builds were coming out with darker lighting.

I just managed to fix this issue. In my universal renderer data, which is assigned to URP asset’s renderer list I had Screen Space Ambient Occlusion added as a renderer feature. Now the thing is that it was disabled as I wasn’t using it at all but somehow that was causing this issue in the build. The moment I removed it altogether from my renderer data and created build, the lights were fixed.

I hope this helps someone.

8 Likes

I can confirm that this change worked for us too. I posted a similar observation in the other thread but forgot to update this one.

appreciate this solution! totally had my SSAO added but it was inactive, thus causing dark lighting in my build.

Thank you for this. This is what solves my dark scene build too. when SSAO was removed from the renderer feature everything worked flawlessly.

1 Like

I have the same problem, even though SSAO has not been added to my renderer:

So any other suggestions?

if you don’t have SSAO and it still appears try creating new renderer and assigning it instead of the old one

I was experiencing this issue as well but I noticed that some of my scenes didn’t have this problem. I realized that I had to use the lighting settings of the working scenes or create new lighting settings.

Window → Rendering → Lighting to bring up the tab.

The default settings worked for me. i.e Lighting became okay in builds.

2 Likes

Thank you kindly! This was blocking me from updating to 2021 for literally months.

1 Like

Removing unused SSAO worked for me too, tyvm!

Apparently it’s not just disabled SSAO. For me it was caused by a disabled decal renderer! Looks like you shouldn’t have any disabled components in the render pipeline asset!

I also experience this issue, only without having disabled renderpipeline features. Adding/removing the SSAO feature also doesn’t change anything.
other workarounds are appreciated.

Edit: It’s triggered when the camera has PostProcessing enabled. Even with no volume or not effects in the scene, if it’s enabled, the scene becomes darker.In my case, disabling PostFX is not a practical workaround as some effects are necessary.

Edit 2: when i try to compensate the darkness by increasing gamma for example in the post effect, it just gets immensely darker again to the point where the image is almost black.

Edit 3: interestingly it then stays that way (extremely dark) even when the postfx volume is deleted. Only disabling ‘Post-Processing’ on the camera helps. Edit4: But even then the image is still slightly darker, it’s only fully normal if all post processing is disabled.

Hey Hey,

I had the same problem with Webgl build, and the idea of removing unused post processing data solved it, I had both Motion blur and panini projection added but disabled, removing them fixed the issue for me.

Very weird.

None of that helped me with my visually similar problem of things looking too dark, but

DynamicGI.UpdateEnvironment();

does. The intended purpose of this function ( Unity - Scripting API: DynamicGI.UpdateEnvironment ) suggests that unity was not applying the the skybox or has an “invalid” cached result which is why my shadows are too dark. Maybe won’t help anybody but since it’s a single line fix I figured I would share.

I have tried everything from removing post processing, removing SSAO, removing Volume from the scene. Nothing works. I was using Unity 2021.3.44f with URP 12.x

Then I have found this post about lightmap compression and not resolved Unity issue.

What works for me is manual change of lightmaps to one from list below:

  • ARGB 16 bit
  • RGB 16 bit
  • RGBA Compressed ASTC HDR
  • RGB HDR Compressed BC6H
    It is a pain because you have to do it manually each time after light baking.

Lightmaps colors are correct now but they are a little bigger comparing to DXT5 or ASTC. As a bonus I could bring back post processing and global volume to the scene.