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.
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.
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
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.
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.
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