HDRP Box artifact with many lights

I see these artifacts when I have many lights (more than 24) in my scene or rather when many lights light up the same areas. I disabled all shadows but that didn’t change anything.

Weirdly, when I move some lights away in the editor and then undo, then the artifact disappears and everything is lit. Once I then start the game or disable and enable some light sources the artifacts come back.

So is this a bug or will there be a limit of light sources per pixel? I know this is some hybrid deferred/forward rendering but I don’t know the details.
This is 2019.2.0f1 and I used the HDRP example project as a starting point.

4827467--463121--light issues.jpg

You just encountered the hard limit of 24 lights per tile. I suggest that you think again how you did light up your scene and try to optimize it.

1 Like

Alright, I currently do tests to find these limits to see if the pipeline suits my needs.
Here I have cars with two light sources and they have a long-range (60). But I can already think of some improvements for further away and higher number of cars like using only one light source with cookies and reducing their range.
I just have to figure out if I need a true deferred renderer (default pipeline) or not.

Sooo this limitation also applies to the Deferred?

This doesn’t make much sense. In cases where most of the light sources are baked, this just prevents visibility of what’s going on in the editor / scene view.

How big the tile is anyways?

Any future changes to this?

Yes, it is the same limitation in deferred (tile) and forward (cluster). Tiles as 8x8 px iirc, and clusters 16x16x"whatever it makes them a cube in view space".

I don’t see your point with the baked lights, those will not be in those counts, as they are not realtime.

We don’t plan to change this, but if you absolutely need it, it’s possible to disable the limitation in the frame settings by disabling the “Deferred Tile” toggle in the “Light Loop Debug” section, with the cost of decreased performances.
5649340--587437--upload_2020-3-30_19-11-11.png

Other option is to edit the renderloop code yourself to increase the limit.

1 Like

I’ve been having the same problem because in my scene there are 400 plus realtime lights in a single room and its impossible to avoid overlaps without compromising on lighting accuracy, which is key for the project. I’m using the HDRP and I am interested in significantly increasing the 24 lights per tile limit. Are there any suggestions on how I could edit the renderloop code to change that limit?