Version: Unity 6.5 Beta (6000.5)
Language : English
Create a custom 2D light type
Blend Modes in 2D lighting

Light 2D component reference for URP

Explore the properties and options you can use to customize the appearance and behavior of 2D lights 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).

For more information about types of 2D light, refer to Prepare your project for 2D lighting.

Property Description
Light Type Sets the type of the 2D light. The options are:
  • Spot (): Emits light from a point in a specific direction with a cone-shaped area of effect.
  • Freeform (): Emits light as a custom polygon shape that you can edit.
  • Sprite (): Emits light in the shape of a sprite.
  • Global (): Lights all 2D GameObjects equally with no attenuation. You can only use one global light per blend style and sorting layer.
If you create a custom 2D light type, the custom light type also appears in the list.
Color Sets the color of the light. To select a color, select the swatch or the dropper.
Intensity Set the brightness of the light. The default value is 1. If you set the value above 1, lights with a Blend Style of Multiply or Multiply with Mask (R) will brighten 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
beyond their original color. For more information, refer to Configure a 2D light.
Target sorting layers Sets the sorting layers that this light affects. For more information, refer to 2D renderer sorting.

Spot

These properties are available only if you set Light Type to Spot.

Property Sub-property Description
Radius N/A Sets the boundaries of the spot light.
N/A Inner Sets the radius inside which the light has maximum intensity.
N/A Outer Sets the radius where the light stops. The light intensity decreases between the inner and outer radius.
Inner / Outer Spot Angle N/A Set the angles of the light. Light within the inner and outer angles has the intensity specified by the Radius values.
Falloff Strength N/A Adjusts how quickly the light intensity decreases from the inner angle to the outer angle.

Freeform

These properties are available only if you set Light Type to Freeform.

Property Description
Falloff Sets the falloff area of this light. The higher the falloff value, the larger area the falloff spans.
Falloff Strength Sets how quickly the light intensity decreases. The higher the falloff strength, the softer the edge of the light.
Edit Shape Edits the shape of the light in 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
view.
Position Sets the position of the selected point in the Scene viewAn interactive view into the world you are creating. You use the Scene View to select and position scenery, characters, cameras, lights, and all other types of Game Object. More info
See in Glossary
. This property is only available when you select a point in the Scene view while in Edit Shape mode.

In Edit Shape mode, do the following:

  • To move a point, select and drag it.
  • To add a point, click on an edge.
  • To delete a point, select the point then press the Delete key.
  • To exit the editing mode, select Edit Shape again.

Sprite

These properties are available only if you set Light Type to Sprite.

Property Description
Sprite Selects the sprite asset that defines the shape of the light.

Blending

Property Description
Blend Style Sets the method Unity uses to blend the light with the background. The default options are:
  • Multiply: Multiplies the light with the background, which results in a darker color.
  • Additive: Adds the light to the background, which results in a brighter color.
  • Multiply with Mask (R): Multiplies the light with the background, but only where the red value of the mask map of the sprite is greater than 0.
  • Additive with Mask (R): Adds the light to the background, but only in areas where the red value of the mask map of the sprite is greater than 0.
To customize the blend styles, refer to 2D Renderer asset component reference.

For more information, refer to Blend Modes and Add a mask map or normal map to a sprite.
Light Order Sets the order Unity renders this light relative to other lights on the same sorting layer. Unity renders lights in numerical order. You can use negative values. This has the most effect on the appearance of blended Lights when you set Overlap Operation to Alpha Blend. This property has no effect if you set Light Type to Global.
Overlap Operation Selects the method Unity uses to blend this light with other lights when they overlap. The options are:
  • Additive: Adds the colors together so the lights blend. This is the default.
  • Alpha Blend: Uses the alpha value of the Color property to control the blending amount. If you set the alpha value to 0, Unity doesn’t blend the lights, so one completely overlaps the other.
For more information, refer to Configure a 2D light.

Shadows

These properties aren’t available if you set Light Type to Global.

To enable the properties in this section, enable the Shadows checkbox.

Property Description
Strength Sets the amount of light that 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
with Shadow Caster 2D components block. The value ranges from 0 to 1, where 0 means no light is blocked and 1 means all light is blocked.
Softness Sets the softness of the edge of the shadow.
Falloff Strength Sets how quickly the shadow intensity decreases. The higher the value, the softer the edge of the shadow.

Volumetric

These properties aren’t available if you set Light Type to Global.

To enable the properties in this section, enable the Volumetric checkbox.

Property Description
Volumetric Intensity Sets the strength of the light in empty space. The value ranges from 0 to 1, where 0 means the light is invisible in empty space and 1 means the light is fully visible in empty space.
Volumetric Shadow Strength Sets the amount of volumetric light that GameObjects with Shadow Caster 2D components block. The value ranges from 0 to 1, where 0 means no volumetric light is blocked and 1 means all volumetric light is blocked.

Normal Maps

These properties aren’t available if you set Light Type to Global.

Property Description
Normal Map Quality Sets how accurately Unity calculates light when you use a normal map. The options are:
  • Disabled: Unity doesn’t use the normal map to calculate lighting.
  • Accurate: Unity uses the normal map to calculate lighting with high accuracy. This option can reduce performance compared to Fast.
  • Fast: Unity uses the normal map to calculate lighting with lower accuracy than Accurate, which results in faster performance but can produce artefacts.
Smaller lights and larger distance values will reduce the difference between Fast and Accurate. For more information, refer to Add a normal map or a mask map to a sprite.
Normal MapA type of Bump Map texture that allows you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.
See in Glossary
Distance
Sets the distance between the light and the lit sprite, without moving the light or changing its intensity. For more information, refer to Add a normal map or a mask map to a sprite.

Additional resources

Create a custom 2D light type
Blend Modes in 2D lighting