Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

lighting differences from editor to webgl

Discussion in 'WebGL' started by dansav, Sep 19, 2022.

  1. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    499
    I just started using Unity 2022 and the WebGL build looks very different from the editor. Is there any reason for this?
    I've attached the photos below
    The lighter photo is the editor which is what I want.
    The darker photo is the WebGL version

    The Quality setting is on Beautiful.

    Why are these different and how to I get these to match?
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,048
    WebGL is pretty much a low end renderer with limited functionality and performance. Specifically lighting is very limited, and likewise shaders and postprocessing effects. Question is, what did you do to light up the surface and which renderer (legacy, urp) are you using? Is it WebGL 1 or 2?

    FYI: https://docs.unity3d.com/Manual/webgl-graphics.html
     
  3. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    499
    Legacy, 2,directional light, defaults on camera and light.
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,048
    For WebGL I'd strongly recommend URP. It's just that much faster.
    As for lighting, does it get brighter in webgl when you increase light intensity? If so the simple solution would be to figure out how much brighter, and then apply that factor to lights when running in webgl via script.