Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

LWRP Visible Light Popping. Issue with Sorting?

Discussion in 'Graphics Experimental Previews' started by equalsequals, May 7, 2018.

  1. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    105
    I've noticed some light popping at odd points in LWRP. I am currently on the 2018.1-experimental branch on GitHub but I have seen this issue for a while and I'm curious if this is intended behaviour?

    For a test I am using the Viking Village demo with LWRP.

    I have the LW Asset set to 8 Pixel Lights, and Vertex Lighting is Disabled. In the background of my .gif you can see Gizmos for 5 other Point Lights, which are the only other active Lights in the Scene, with the exception of the Directional Light. All Lights are set to 'Realtime' and 'Auto', and an intensity of 200 for visibility purposes only.

    .gif link here
    .gifv link here

    The blinking is extremely sporadic which is making it hard to track down where the issue is. If I enabled Vertex Lighting, the Lights will pop between Pixel/Vertex in the same way that in this visual they appear to be culled.

    Is anyone else seeing this type of behaviour?
     
  2. Aze_

    Aze_

    Joined:
    Mar 1, 2015
    Posts:
    26
    Hi there,

    Yes, I'm having the same problem, with a different project. Even with 8 Pixel lights max, event just having 1 pixel light in the scene makes it pop between Vertex/Pixel light type. It seems like when the camera is very close to the light, it switches to a Pixel Light. Sometimes it's also simply popping off and looks like it's disabled.

    I have not yet found any solution, just wanted to share that it's also happening on my side ;)
    Thanks,
    Charles
     
  3. Danielsantalla

    Danielsantalla

    Joined:
    Jan 7, 2015
    Posts:
    22
    me too! did you find a solution?
     
  4. Aze_

    Aze_

    Joined:
    Mar 1, 2015
    Posts:
    26
    Well, it seems like it does not happen in final builds and only in Editor. Lighting with LWRP was broken in this way and had to only test in builds on device.

    To make it work normally in Editor, I had to temporarily set the concerned lights to Important.

    Hope this helps.
    Charles
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,838
    Lights are sorted by how many are close enough to a given mesh. So if your light limit is 4, and 5 are technically affecting a mesh, then Unity will pick the 4 closest lights, all things being equal.

    The light limit is per mesh, sorted by distance to that mesh.
     
  6. Aze_

    Aze_

    Joined:
    Mar 1, 2015
    Posts:
    26
    Thanks for your explanation; I'm aware of this but in LWRP even with a very high value of max pixel lights they are always rendered as Vertex lights in a simple scene until you get the editor camera at 0.1m - I think it's an editor bug, as it doesn't happen in builds even with max pixel lights set to a low value of 1 or 2 ;)

    It seems like this issue is fixed with more recent versions of URP