Version: Unity 6.4 (6000.4)
Language : English
2D lighting reference
Shadow Caster 2D component reference

Renderer 2D asset reference for URP

Explore the properties and settings you can use to change how 2D lights apply to 2D 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
in the Universal 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
(URP).

Filtering

Property Description
Layer MaskA value defining which layers to include or exclude from an operation, such as rendering, collision or your own code. More info
See in Glossary
Sets the layers that 2D GameObjects must be assigned to in order to be rendered. For more information, refer to Tags and layers.

General

Property Description
Transparency Sort Mode Sets the method Unity uses to calculate the depth of 2D GameObjects for sorting. This property has transparency in its name because Unity renders 2D objects during the transparent render pass. For more information, refer to Sort sprites.

The options are:
  • Default: Sorts using Perspective or Orthographic, depending on the Projection property of the camera.
  • Perspective: Calculates the depth of an object as the distance between the 2D object and the center point of the camera. Use this option for isometric games.
  • Orthographic: Calculates the depth of an object as the distance between the 2D object and the camera plane. Use this option for top-down games.
  • Custom Axis: Uses a custom axis to calculate depth.
Transparency Sort Axis Sets the axis Unity uses to calculate the depth of 2D GameObjects. For example, if you set the Y value to 1, Unity renders a GameObject behind another if it’s higher up the screen. This property is available only if you set Transparency Sort Mode to Custom Axis.
Default Material Type Sets the material Unity assigns to new sprites. The options are:
  • Lit: Assigns the 2D/Sprite-Lit-Default material. 2D lights affect this material.
  • Unlit: Assigns the 2D/Sprite-Unlit-Default material. 2D lights don’t affect this material.
  • Custom: Assigns a custom material.
Default Custom Material Sets the custom material Unity assigns to new 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
. This property is available only if you set Default Material Type to Custom.
Depth/Stencil BufferA memory store that holds an 8-bit per-pixel value. In Unity, you can use a stencil buffer to flag pixels, and then only render to pixels that pass the stencil operation. More info
See in Glossary
Enables Unity rendering to the depth/stencil buffer. Disabling this property can improve performance, especially on mobile platforms. Only disable this setting if you don’t use features that require the depth/stencil buffer, for example masking sprites.
HDRhigh dynamic range
See in Glossary
Emulation Scale
Sets the multiplier that Unity uses to emulate high-intensity lights on platforms that don’t support HDR. For more information, refer to HDR emulation scale.

Light Render Textures

The properties in this section let you control the textures Unity renders lights to before it renders 2D GameObjects. For more information, refer to Introduction to the 2D lighting system in URP.

Property Description
Render Scale Sets the resolution of light textures as a percentage of the screen resolution. The default is 0.5.
Max Light Render TexturesA 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
Sets the maximum number of light textures Unity creates and uses at one time. The default is 4. For more information, refer to Optimize 2D lights.
Max Shadow Render Textures Sets the maximum number of shadow textures Unity creates and uses at one time. The default is 1.

Light Blend Styles

The properties in this section let you customize the Blend Style property of a 2D light component. Each section corresponds to an option in the Blend Style property.

When you create a light, it automatically uses the first blend style.

Property Description
Name Sets the name of the blend style.
Mask Texture Channel Sets the channel of the mask map of the sprite that determines which areas receive light. The options are:
  • Red: Lights affect pixels if the red value in the mask map is greater than 0.
  • Green: Lights affect pixels if the green value in the mask map is greater than 0.
  • Blue: Lights affect pixels if the blue value in the mask map is greater than 0.
  • Alpha: Lights affect pixels if the alpha value in the mask map is greater than 0.
  • One Minus R: Lights have the opposite effect to Red.
  • One Minus G: Lights have the opposite effect to Green.
  • One Minus B: Lights have the opposite effect to Blue.
  • One Minus A: Lights have the opposite effect to Alpha.
For more information, refer to Add a normal map or a mask map to a sprite in URP.
Blend Mode Sets the blend mode that the blend style uses. The options are:
  • Additive: Adds the color of the light to the color of the background.
  • Multiply: Multiplies the color of the light with the color of the background.
  • Subtractive: Subtracts the color of the light from the color of the background.
For more information, refer to Blend Modes in 2D lighting.

Camera Sorting Layer Texture

The properties in this section let you capture 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
color buffer after Unity renders a certain number of sorting layers, so you can use it in a custom shaderA program that runs on the GPU. More info
See in Glossary
. For more information, refer to Sprites sorting order.

Property Description
Foremost Sorting Layer Sets the last sorting layer Unity includes when it captures the camera color buffer and stores it in a CameraSortingLayerTexture shader variable. Select Disabled to prevent Unity capturing the camera color buffer.
Downsampling method Reduces the resolution of the CameraSortingLayerTexture texture. The options are:
  • None: Doesn’t reduce the resolution.
  • 2x Bilinear: Reduces the resolution by half using bilinear filtering.
  • 4x Box: Reduces the resolution to a quarter using box filtering.
  • 4x Bilinear: Reduces the resolution to a quarter using bilinear filtering.

Post-processing

Property Description
Enabled Enables post-processingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocess
See in Glossary
effects in your 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
. If disabled, Unity excludes post-processing renderer passes, shaders, and textures from the build. For more information, refer to Post-processing in URP.

Additional resources

2D lighting reference
Shadow Caster 2D component reference