I have normal looking shadows from point and spot lights, but the main (only) directional light is not casting any shadows at all. The shadows are enabled for the light, the cascade distances don't seem to matter, none of the quality settings matter, the materials are shadow casters and receive shadows, and I've tried everything else I can think of.
I occasionally get an assert which is from some unity shadow rendering code. I suspect i have run into a bug in URP.
Is it possible to remove URP and re-add it to my project again, or do some other drastic reset to try and fix this?
#No directional light shadows in URP
18 messages · Page 1 of 1 (latest)
I have occasionally needed to delete the light data component on various point lights
they do become corrupted somehow, though it's rare
you should be able to re-add the URP package without problems, though I doubt that will help
your directional light may have a layer filter
Are you dealing with interior shadows?
If so, then maybe interior faces are confusing the light rays
By interior faces, I mean the faces of two mesh objects that overlap, existing inside each other
Nope, outdoor. And it has worked previously. Somethincs just broken in my project i think 😦
I made a test scene, just a cube on a plane. Point light casts shadows, directional light does not.
well, I have removed the urp package before, and reinstalled it without problems
though I did that on accident, haha
I doubt that'll fix your issue, but it's probably safe to try
I think i solved it. The near distance for the camera needs to be just a bit bigger. I had it at 0.1, no shadows, but i set it to 0.3, shadows. :/
It's maybe a shadow distance thing in your URP settings.
Usually both are linked, the camera range (far - near) and the shadow distance, but it's unclear to me what is exactly going between those two.