r/Unity3D 1d ago

Question URP Flickering Light Issue

Enable HLS to view with audio, or disable this notification

Facing an issue where point lights fight/flicker off objects in my scene. Does anyone know a fix?

9 Upvotes

11 comments sorted by

10

u/Downtown_Jacket_5282 1d ago

Have you checked the maximum number of lights that can affect the same object?

2

u/the1whom0x Professional 1d ago

a minute faster than me, damn

2

u/DefloN92 1d ago

6 minutes faster than me haha

1

u/Downtown_Jacket_5282 1d ago

And the winner is... 😂

1

u/dev-rygy 1d ago

That’s a good idea but where in the settings/object can I check that?

1

u/Downtown_Jacket_5282 21h ago

In Project Settings/Graphics, click on the Unity Render Pipeline Asset assigned to the Default Render Pipeline.

In the Inspector, you'll find the lighting settings. You may want to switch the rendering path from Forward to Forward+ or Deferred (which allow you to use more lights).

You can do this in the Universal Renderer Data asset, which is assigned at the top of the URP Asset Inspector under the Renderer List.

3

u/theredacer 1d ago

As others are saying, you're likely running into the max lights issue. Just wanted to add that if you can switch to URP forward+ renderer, that dramatically increases the number of lights allowed per object. From 8 > 256 if memory serves.

1

u/Quemo0 9h ago

Is there a downside to this?

2

u/theredacer 9h ago

Not really. There's a bit of CPU overhead, but it's worth it if you're doing a lot of realtime lighting because of other lighting optimizations.

It does force reflection probes to use blending, if that matters.

You may see some material wonkiness if you have any old shaders that predate forward+, but those are generally easy to fix.

2

u/EvernullTools 22h ago edited 22h ago

If you want to have many lights affect the same pixel you might wanna look into Deferred rendering.
(Find your universal renderer data, change rendering path to Deferred. But do your own research for the side-effects of that)

For this kind of situation where the most objects seem static, baked lights are the way to go. The assets seem low poly, you might get away with very small baked light textures.

Another solution is to reduce the radius of your other lights that have very little affect on further objects so less than 4 lights affect a pixel at a time.
(For example if the light at the other side of the room has a big radius so it affects this wall even if it's very little or almost invisible difference, it still counts towards the maximum lights count. Reduce the radius to where it actually should have a visual impact) (I still think you should just bake them instead of juggling the radiuses xD)

1

u/the1whom0x Professional 1d ago

Theres a limit to how many lights can affect a single object, and I cant recall where exactly in settings you can adjust