Version: 2021.2
Editor
Package Manager

Graphics

Use the Graphics settings (main menu: Edit > Project Settings, then select the Graphics category) to apply global settings for Graphics.

Graphics settings
Graphics settings

This section provides documentation on the following groups of properties:

Scriptable Render Pipeline Settings

Allows you to set the default render pipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
that Unity uses to render your project. To set a render pipeline based on the Scriptable Render Pipeline, assign the desired Render Pipeline Asset here.

For more information, see How to get, set, and configure the active render pipeline.

Camera Settings

These properties control various rendering settings.

Property Function
Transparency Sort Mode Define the order for rendering objects by their distance along a specific axis. Renderers in Unity are sorted by several criteria, such as their layer number or their 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
. This is generally only useful in 2D development: for example, sorting SpritesA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
by height or along the Y-axis.
Default Sort objects based on the Camera mode.
Perspective Sort objects based on perspective view.
Orthographic Sort objects based on orthographic view.
Custom Axis Sort objects based on the sort mode defined with the Transparency Sort Axis.
Transparency Sort Axis Define a custom Transparency Sort Mode.

Tier Settings

Tier Settings as displayed in the Player settings
Tier Settings as displayed in the Player settings

In the Built-in Render Pipeline, you can use Tier settings to change rendering and shader compilation settings for different types of hardware. For more information, see Graphics tiers.

Property Function
Standard Shader Quality Set the quality of the Standard Shader to High, Medium, or Low.
Reflection Probes Box Projection Enable projection for reflection UV mappings on Reflection ProbesA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info
See in Glossary
.
Reflection Probes Blending Enable blending on Reflection Probes.
Detail Normal Map Enable Detail Normal Map sampling, if assigned.
Enable Semitransparent Shadows Enable Semitransparent Shadows.
This adds or removes the UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS shader compiler define.
Enable Light Probe Proxy Volume Enable rendering a 3D grid of interpolated 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
.
Cascaded Shadows Enable using cascaded shadow maps.
This adds or removes the UNITY_NO_SCREENSPACE_SHADOWS shader compiler define.
Prefer 32 bit shadow maps Enable 32-bit float shadow map when you are targeting PS4 or platforms using DX11 or DX12.
Most platforms have a fixed shadow map format that you can’t adjust. These vary in format, and can be 16-bit, 24-bit, or 32-bit, and can also be either float- or integer-based. 32-bit shadow maps give higher quality shadows than 16-bit, but use increased memory and bandwidth on the GPU.
Note: To use 32-bit shadow maps, make sure the depth buffer is also set to 32-bit.
Use HDR Enable High Dynamic Range rendering for this tier.
HDR Mode Select the format to use for the HDR buffer when HDRhigh dynamic range
See in Glossary
is enabled for the current Graphics Tier. By default, this is set to FP16.
FP16 Color render textureA special type of Texture that is created and updated at runtime. To use them, first create a new Render Texture and designate one of your Cameras to render into it. Then you can use the Render Texture in a Material just like a regular Texture. More info
See in Glossary
format, 16-bit floating point per channel.
R11G11B10 Color render texture formatA file format for handling textures during real-time rendering by 3D graphics hardware, such as a graphics card or mobile device. More info
See in Glossary
. R and G channels are 11-bit floating point, B channel is 10-bit floating point.
Rendering PathThe technique that a render pipeline uses to render graphics. Choosing a different rendering path affects how lighting and shading are calculated. Some rendering paths are more suited to different platforms and hardware than others. More info
See in Glossary
Choose how Unity should render graphics. Different rendering paths affect the performance of your game, and how lighting and shading are calculated. Some paths are more suited to different platforms and hardware than others.
Deferred rendering is not supported when using Orthographic projection. If the camera’s projection mode is set to Orthographic, these values are overridden, and the camera always uses Forward rendering. For more information, see Rendering Paths.
Forward The traditional rendering path. This supports all the typical Unity graphics features (normal maps, per-pixel lights, shadows etc.). However under default settings, only a small number of the brightest lights are rendered in per-pixel lighting mode. The rest of the lights are calculated at object vertices or per-object.
Deferred Deferred shadingA rendering path in the Built-in Render Pipeline that places no limit on the number of Lights that can affect a GameObject. All Lights are evaluated per-pixel, which means that they all interact correctly with normal maps and so on. Additionally, all Lights can have cookies and shadows. More info
See in Glossary
has the most lighting and shadow fidelity, and is best suited if you have many real-time lights. It requires a certain level of hardware support.
Legacy Vertex Lit Legacy Vertex Lit is the rendering path with the lowest lighting fidelity and no support for real-time shadows. It is a subset of Forward rendering path.
Legacy Deferred (light prepass) Legacy Deferred is similar to Deferred Shading, just using a different technique with different trade-offs. It does not support the Unity 5 physically-based standard shader.
Realtime Global Illumination CPU Usage The CPU budget you allow Enlighten Realtime Global Illumination to use for lighting calculations at runtime. Increasing this makes the system react faster to changes in lighting at a cost of using more CPU time.
Note: Some platforms allow all CPUs to be occupied by worker threads whereas some enforce maximums. For example, some gaming consoles allow a maximum of 4 CPU cores. For Android devices, if it is a bigLittle architecture, only the little CPUs are used; otherwise the maximum is one less than the total number of CPUs.
Low 25% of the allowed CPU threads are used as worker threads.
Medium 50% of the allowed CPU threads are used as worker threads.
High 75% of the allowed CPU threads are used as worker threads.
Unlimited 100% of the allowed CPU threads are used as worker threads.

Built-in shader settings

Use these settings to specify which shader to use for each of the listed features in the Built-in Render Pipeline.

Rendering path Shader to use
Deferred Use with Deferred shading.
Deferred Reflection Use with Reflection Probes along deferred lighting.
Screen Space shadows Use with cascaded shadow maps for directional lights on PC/console platforms.
Legacy deferred Use with Legacy Deferred lighting.
Motion vectors Use for object-based motion vector calculations.
Lens FlareA component that simulates the effect of lights refracting inside a camera lens. Use a Lens Flare to represent very bright lights or add atmosphere to your scene. More info
See in Glossary
Use with Lens Flares.
Light Halo Use with Light Halos.

For each of these features, you can choose which type of Shader to use:

  • No Support disables this calculation. Use this setting if you are not using deferred shading or lighting. This will save some space in the built game data files.
  • Built-in Shader uses Unity’s built-in Shaders to do the calculation. This is the default.
  • Custom Shader uses your own compatible Shader to do the calculation. This enables you to do deep customization of deferred rendering.

When you choose Custom shader, a ShaderA program that runs on the GPU. More info
See in Glossary
reference property appears below the feature property where you can set a reference to the Shader you want to use.

Always Included Shaders

This is a list of shaders for which Unity includes all possible variants in every build. This can be useful if you want to use shaders or variants at runtime that would not otherwise be included in the build; for example, if you use AssetBundles or Addressables that rely on those shaders or variants, or if you use shader keywords to change variants at runtime.

Warning: This feature is not recommended for shaders that have a large number of variants, such as the Standard Shader; it can lead to significant runtime and build time performance problems. You should instead create shader variant collections that contain only the variants you need, and include those in your build.

Note: This setting overrides shader keyword declaration settings. For each shader in the list, Unity includes all sets of all keywords, even if you use the “shader feature” declaration type.

To add a shader to the list, increase the value in the Size property. To remove the last shader in the list, decrease the Size property. To remove a shader which is not the last one in the list, you can set the value to None.

Shader stripping

These properties allow you to configure shader variant stripping in your build.

By default, Unity examines the scenesA 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
in the build and automatically strips shader variantsA verion of a shader program that Unity generates according to a specific combination of shader keywords and their status. A Shader object can contain multiple shader variants. More info
See in Glossary
that are not used in those scenes. However, this can cause problems if you want to use shaders or variants at runtime that would not otherwise be included in the build; for example, if you use AssetBundles or Addressables that rely on those shaders or variants, or if you use shader keywords to change variants at runtime.

Property Function
Lightmap Modes Determine the shader variant stripping behavior for lightmap-related shaders.
Automatic Unity examines the scenes in the build and automatically strips variants that are not used in those scenes. This is the default setting.
Custom Choose to manually include or exclude variants for the following lightmap modes:

* Baked Non-Directional
* Baked Directional
* Realtime Non-Directional
* Realtime Directional
* Baked Shadowmask
* Baked Subtractive
Fog Modes Determine the shader variant stripping behavior for shaders that relate to Unity’s built-in fog effect.
Automatic Unity examines the scenes in the build and automatically strips variants that are not used in those scenes. This is the default setting.
Custom Choose to manually include or exclude variants for the following fog modes:

* Linear
* Exponential
* Exponential Squared
Instancing Variants Determine the shader variant stripping behavior for shaders that relate to GPU instancing.
Strip Unused Unity only includes variants for GPU instancing for a given shader if at least one material that uses that shader has Enable instancing enabled. This is the default setting.
Strip All Strip all variants for GPU instancing, even if they are being used.
Keep All Include all variants for GPU instancing, even if they are being used.

Shader loading

These properties allow you to configure how Unity “prewarms” shader variant collections in your application.

For information on prewarming, including important information about graphics API support, see Shader loading: Prewarming shader variants.

Property Function
Preloaded shaders The shader variant collections to prewarm on application start.
Preload shaders after showing first scene When Unity prewarms the shader variants specified in Preloaded shaders.

If enabled, Unity loads and prewarms them after the first scene has fully loaded. Otherwise, Unity loads and prewarms them before showing the first scene.
Preloaded shaders How Unity prewarms the shader variants specified in Preloaded shaders, if Preload shaders after showing first scene is enabled.

If the value is 0, Unity preloads all shader variants on the next frame after it shows the first scene.

Otherwise, Unity preloads new shader variants over multiple frames after it shows the first scene. In a given frame, it prewarms shader variants until it reaches that time limit set here. After that, it does not begin prewarming new shader variants until the next frame.

Tracked shader variants

The Unity Editor can track which shader variants your application uses when it runs. You can use this information to build shader variant collections.

Control Function
Create asset Creates a new shader variant collection asset using the currently tracked shader variants.
Clear Clear tracked shader variants.
Editor
Package Manager
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961