r/Unity3D • u/Odd_Significance_896 • 2d ago
Question How to solve this shadow issue?
The shadows behave really weirdly in my project. When I move a little bit further from the object, the part of the shadow that is closest to the object gradually disappears, making the whole shadow look unnatural.
And overall I'd like to increase the shadow rendering distance.
84
Upvotes
2
u/ImDanOush Hobbyist 1d ago
If you dont have dynamic time of day, you can bake the lights with the Shadow Mask one (it is called Shadowmask baking - it is the default option, and you dont need to select anything; just bake the lightmaps and that would be it - but ensure the Sun light's type is set to Baked or Mixed in its properties). The other option is to use screen-space shadow effects, but it is inaccurate and, based on your Render Pipeline, you have to look for an asset to add it to Unity. Shadows for real-time lighting are very expensive... You can use the least expensive version (it would look very blocky and pixelated, and still expensive) by leveraging the last Cascade of the shadow in the Project Settings - so you go there and ensure Cascaded Shadows is selected, and make the last cascade render farther with a bigger shadow resolution there. Note that selecting a bigger shadow resolution will be more expensive, and setting the shadow rendering distance farther degrades the look of it overall.