Version: 2019.4
Configuring shadows
Shadow Cascades

Shadow Distance

Use the Shadow Distance property to determine the distance from the CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
up to which Unity renders real-time shadows.

Shadows from GameObjectsThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
become less noticeable the farther the GameObjects are from the Camera. This is both because the shadows appear smaller on the screen, and because distant GameObjects are usually not the focus of attention. You can take advantage of this effect by disabling real-time shadow renderingThe process of drawing graphics to the screen (or to a render texture). By default, the main camera in Unity renders its view to the screen. More info
See in Glossary
for distant GameObjects. This saves on wasted rendering operations, and can improve runtime performance. Additionally, the SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
often looks better without distant shadows.

If the current Camera Far Plane is closer than the Shadow Distance, Unity uses the Camera Far Plane instead of the Shadow Distance.

To disguise missing shadows beyond the Shadow Distance, you can use visual effects such as fog.

Setting the Shadow Distance

In the Built-in Render Pipeline, set the Shadow Distance property in your Project’s Quality Settings.

In the Universal Render Pipeline (URP), set the Shadow Distance property in the Universal Render Pipeline Asset.

In the High Definition Render Pipeline (HDRP), set the Shadow Distance property for each Volume.

Shadow Distance and Shadowmask Lighting Mode

If your Scene uses the Shadowmask Lighting Mode, Unity renders shadows from Mixed LightsLight components whose Mode property is set to Mixed. Some calculations for Mixed Lights are performed in advance, and some calculations for Mixed Lights are performed at runtime. The behavior of all Mixed Lights in a Scene is determined by the Scene’s Lighting Mode. More info
See in Glossary
beyond the Shadow Distance, using either Light ProbesLight probes store information about how light passes through space in your scene. A collection of light probes arranged within a given space can improve lighting on moving objects and static LOD scenery within that space. More info
See in Glossary
or a shadow mask Texture. You can configure how Unity renders shadows beyond the Shadow Distance.

Configuring shadows
Shadow Cascades
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961