Cyanilux / URP_ShaderGraphCustomLighting

Some custom lighting functions/sub-graphs for Shader Graph, Universal Render Pipeline
MIT License
558 stars 63 forks source link

Additional light not working on Android build target #9

Open MThogersen opened 2 years ago

MThogersen commented 2 years ago

In a clean unity 2021.3.9f (LTS) install using URP 12.1.7, additional lights seem to be broken when setting the build target to Android. Here's a screen shot with Windows as build target:

image

And here's the exact same scene, just with android as build target:

image

Details:

Thanks for your work - just thought I would report it for anyone battling with this problem. I don't know if this may be related to the light indexing problem described here: https://forum.unity.com/threads/additional-lighting-issue-when-switch-to-android-platform.1191736/ With a unity case (though it is marked as fixed): https://issuetracker.unity3d.com/issues/mobile-urp-all-lights-are-emitting-light-from-one-light-spot-when-the-platform-is-set-to-android-or-ios


Update: The problem doesn't seem to be in the light indexing, but rather in calculating the ToonAttenuation. Tried applying a standard lighting model for the additional lights, which worked as expected.