#URP Forward Point lights inherit directionality

1 messages · Page 1 of 1 (latest)

muted lichen
#

Hello friends! I have a URP Renderer, Forward+
Running Unity 6000.0

The light limit is set to "5 Per object limit". Main light is Per Pixel and casts shadows. Additional lights are Per Pixel and cast shadows.

In my scene i have a single Directional Light, which works.
I also have two other active lights: a spotlight and a pointlight.

No matter what settings i change in the renderer i can only get one of these two to affect the world at any given time. If I disable the spotlight, the pointlight affects the world. If I disable the point light, the spotlight comes in effect. But i want both!

I've read the limit of lights per object in URP is 8 lights or so, and these are only two lights, so what is the issue here?

In deferred it works, but I need Forward+ for other reasons.
It used to be that you could tick an [X] Important checkbox on a pointlight in Unity to force a light to be considered for rendering, but I can't find it anymore.

How can I solve this issue? 🙂
Thank you

muted lichen
#

After two hours of head scratching it looks to me like Forward+ rendering path is all glitched to hell and back... ☹️
GetAdditionalLights() returns the correct number of light except it only iterates 2 times over the same one (i gave them all different colors and modified the shader to check lightIndex and only take the light color if index matched)
With an orange and a green light, GetAdditionalLights return two, except both lights obtained with GetAdditionalLight are orange!

#

Whether I pick Per Pixel or Per Vertex here it changes nothing.
My surface shader is seeing that i should be impacted by the correct number of lights, except no matter which index I supply to GetAdditionalLight it returns the same thing!

#

With GetAdditionalPerObjectLight it works and returns the correct light index (why ?) but the distance attenuation seems heavily impacted by the number of lights present, which sounds completely bonkers

#

Point lights have......directionality in urp? what is going on here

#

Well i'd love to see a rendering expert explain this one to me. Why does my point light (green here) have an offset and apparently some amount of directionality ?

#

This occurs on a default material too (Lit), is this a normal behaviour for URP point lights?

#

It's not just this light, they all seem to do this in forward+

#

In deferred the light position appears correct

#

Point lights have the directionality of the nearest spotlight ??

#

And only in play mode... i can reproduce this issue 100%. mon dieu

#

Spent three hours investigating why my point light was not affecting my surface and it turns out Spotlights give directionality to point lights... 😵‍💫

#

Is this normal/expected?

#

URP Forward Point lights inherit directionality

pure forum
#

Are you testing on the default URP/Lit shader or a custom one?

muted lichen
#

This is the default URP lit shader!

#

In edit mode it works great. Then you press play

#

You can try a similar setup as me if you want, or i can send you the scene. Everything here is default

pure forum
#

Then sounds like a bug, I'd probably try a different unity version

muted lichen
#

Are the URP changelogs somewhere / could I ask somebody to confirm to me this bug is fixed? Changing version on this project might not be easy and I'm a solo developer so I'd like to avoid doing it multiple times 👉 👈

#

Im supposed to be frozen on 6000.X in fact so I hope it's not gonna be a major change

#

But if I can 100% attest this to be fixed in a precise version of unity then I could afford to migrate

#

If you got a more recent version of Unity and would like to try it ton your end quickly, that'll give me an idea of which version i can target 🙇‍♀️ but if you dont have time its okay i'll try to install several versions

muted lichen
#

I can reproduce the issue on 6000.3.21

#

Shader Precision Model: Unified causes this problem. Platform default fixes it... no idea why