Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    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:
    130
    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:
    1
    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:
    130
    No, sorry.
     
  4. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,086
    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.