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

Bug URP additional Spotlight does not work in Pixel lit mode on Webgl

Discussion in 'WebGL' started by Zenithin, Oct 25, 2020.

  1. Zenithin

    Zenithin

    Joined:
    Jun 7, 2016
    Posts:
    35
    Hey so it seems to me that URP additional spotlights are not working in webgl if using pixel mode.
    It works fine in the editor and in windows build.

    Additionally if the mode is changed to vertex lit from pipeline settings then it works in webgl also.

    Anyone know how to get it working in pixel mode? Vertex lit is odd according to our game.
     
  2. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
    This is a limitation of the WebGL spec, as far as I know.
     
  3. Zenithin

    Zenithin

    Joined:
    Jun 7, 2016
    Posts:
    35
    I just checked even point lights are not working when they are pixel lit.

    So does that mean all additional lights have to be vertex lit?

    The vertex lit shows very rough lighting on the spheres and floor etc.
     
  4. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    940
    Does the limitation occur also if running against WebGL 2? (try disabling auto graphics API and only enabling WebGL 2 there, dropping WebGL 1)
     
  5. AlokMP28

    AlokMP28

    Joined:
    May 17, 2023
    Posts:
    1
    Yes, I am using Web GL 2 , but unfortunately, Lighting experience is too bad. Pont light and spot light is not working.
     
  6. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    370
    Jukka is not specifically talking to you... as this is a 3 years old thread.

    Can you explain what is not working? What version of Unity you are using? Which rendering pipeline?