To change the shadow render distance in Unity, the method depends on the render pipeline your project is currently using: the Built-in Render Pipeline or the Universal Render Pipeline (URP).
Here's how to adjust this setting for each pipeline:
Changing Shadow Distance in the Built-in Render Pipeline
If your Unity project uses the Built-in Render Pipeline, you will find the setting for shadow distance within the project's quality configuration.
- Location: You change the shadow distance by navigating to your Project's Quality Settings.
- Property: In the Quality Settings, locate and set the Shadow Distance property. Adjusting this value controls how far away from the camera shadows are rendered. A higher value renders shadows further, potentially impacting performance.
Adjusting Shadow Distance in the Universal Render Pipeline (URP)
For projects utilizing the Universal Render Pipeline (URP), the shadow distance setting is managed directly within the URP Asset file.
- Location: If you are using the Universal Render Pipeline (URP), you need to set the Shadow Distance property directly within the Universal Render Pipeline Asset file that your project uses.
- Property: Find your URP Asset file in the Project window (it's typically named similarly to 'UniversalRenderPipelineAsset.asset' or a custom name you gave it), select it, and then modify the Shadow Distance value shown in the Inspector window. This setting controls the maximum distance at which shadows will be drawn when using this URP Asset.
By following these steps, you can control the maximum distance at which shadows are rendered in your Unity project, helping you balance visual fidelity and performance.