Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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:
    154
    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. Haze-Games

    Haze-Games

    Joined:
    Mar 1, 2015
    Posts:
    189
    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:
    75
    me too! did you find a solution?
     
  4. Haze-Games

    Haze-Games

    Joined:
    Mar 1, 2015
    Posts:
    189
    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

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    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. Haze-Games

    Haze-Games

    Joined:
    Mar 1, 2015
    Posts:
    189
    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