Search Unity

URP - Two suns with quality shadows?

Discussion in 'Universal Render Pipeline' started by bluebrain, Feb 26, 2021.

  1. bluebrain

    bluebrain

    Joined:
    Jun 18, 2014
    Posts:
    39
    We're building a sci-fi game with a scene lit by two suns on opposite sides of our ships. They both need to cast shadows. Since URP only supports shadows from one directional light, I've set the other sun as a spotlight, which is not ideal. What I'm finding is that with tweaking of the URP shadow settings, and each of the lights, I am able to get ALMOST acceptable results, but when we view inside our ships, there are light leaks. Even without the second sun, the directional light's shadows aren't perfect.

    Didn't have that problem with the build-in renderer - the two directional lights cast nice crisp shadows with no leaks.

    I think I've exhausted the settings that I can explore to try to resolve this. Any ideas? Can we expect support for shadows from more than one directional light to be added to URP? Can it be achieved with custom code?

    Thanks!