Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Realtime and baked light completely different in Unity editor and WebGL build

Discussion in 'Global Illumination' started by F-R-O-S-T-Y, Jan 12, 2018.

  1. F-R-O-S-T-Y

    F-R-O-S-T-Y

    Joined:
    Mar 22, 2013
    Posts:
    146
    Hey,

    I encountered an issue where the lighting is completely different in Unity's editor and WebGL build. Windows build shows the same result as the Unity editor (so this is correct).

    Unity editor and windows:

    WebGL build:

    I also noticed that right before the light bake finishes in the editor, the game screen promptly (half a second) looks like the WebGL build, but then corrects itself. This also happens when opening the .exe windows build. As long as the game window stays unfocused, the lighting looks off. Focusing the window (clicking on it) fixes the issue.
    This can be seen in the following video:

    Using Unity 2017.2.0f3. The same problem occurs with Enlighten and Progressive. Does not matter if lights are realtime or baked. All lights are set to Important. No light or reflection probes are used. All lights used are point lights (no directional).

    Picture of light settings:

    EDIT 1: The bug exists when building on android as well. Will test iOS soon.

    Any helps is much appreciated!

    Thank you!
     
    Last edited: Jan 12, 2018
  2. jspivack

    jspivack

    Joined:
    Feb 21, 2018
    Posts:
    2
    Old thread, but did you ever figure out what was happening?
     
  3. F-R-O-S-T-Y

    F-R-O-S-T-Y

    Joined:
    Mar 22, 2013
    Posts:
    146
    No, sorry.
     
  4. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,140
    Those platforms don't support Realtime Global Illumination. You have to turn it off.

    Most of those platforms aren't powerful enough to run it, or lack some feature to support it. WebGL is powerful, but often lacks a single crucial feature in the API.

    The only way is to bake the indirect, and have realtime/mixed lights on top.