Search code examples
unity-game-enginescriptingrenderinggame-engine

Changing exposure doesn't change lighting on objects in unity


I used this method to change exposure of the scene

RenderSettings.skybox.SetFloat("_Exposure", 1.4);

However, my objects in the scene are still at the same lighting condition as with previous exposure value. How can i make unity re render lighting or re compute the lighting?

I am new to unity so apologies if this is a noob setting.


Solution

  • From Unity's documentation:

    If you change the skybox in playmode, you have to use the DynamicGI.UpdateEnvironment function call to update the ambient probe.

    Try adding it after your code:

    RenderSettings.skybox.SetFloat("_Exposure", 1.4);
    DynamicGI.UpdateEnvironment()