Version: Unity 6 Preview (6000.0)
Language : English
Lighting Mode: Shadowmask
The Light Explorer window

Lighting Mode: Subtractive

This page describes the behavior of all 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
in a 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
, when that Scene uses a Lighting Settings Asset with its Lighting Mode property set to Subtractive.

In Subtractive Lighting Mode, all Mixed Lights in your Scene provide baked direct and indirect lighting. Unity bakes shadows cast by static 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
into the lightmapsA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary
. In addition to the baked shadows, one Directional Light, known as the Main Directional Light, provides real-time shadows for dynamic GameObjects.

Because shadows are baked into the lightmaps, Unity doesn’t have the information it needs to accurately combine baked and real-time shadows at runtime. Instead, Unity provides a Realtime Shadow Color for reducing the contribution from the lightmap to create the illusion of a correct blend between baked and real-time shadows. You can also tweak the color to achieve a certain artistic style.

Subtractive Lighting Mode is useful on low-end hardware where performance is a concern, and where you need only one real-time shadow casting light. It doesn’t provide particularly realistic lighting effects, and is more suitable for stylized aesthetics, such as cel shading.

Render pipeline support

See render pipeline feature comparison for more information about support for Subtractive Lighting Mode across render pipelinesA 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
.

Mixed Light behavior

When you set a Scene’s Lighting Mode to Subtractive, Mixed Lights behave as follows.

  • Dynamic GameObjects lit by Mixed Lights receive:
    • real-time direct lighting
    • baked indirect lighting, using Light Probes
    • real-time shadows from dynamic GameObjects that are lit by the Main Directional Light, using the shadow map, up to the Shadow Distance
    • shadows from static GameObjects, using Light Probes
  • Static GameObjects lit by Mixed Lights receive:
    • baked direct lighting, using lightmaps
    • baked indirect lighting, using lightmaps
    • baked shadows from static GameObjects, using lightmaps
    • real-time shadows from dynamic GameObjects that are lit by the Main Directional Light, using the shadow map, up to the Shadow Distance

Setting your Scene’s Lighting Mode to Subtractive

  1. Select the Lighting Settings Asset for the Scene.
  2. In the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
    See in Glossary
    , navigate to Mixed Lighting..
  3. Use the drop-down menu to set the Lighting Mode to Subtractive.

Changing the shadow color

When you set a Scene’s Lighting Mode to Subtractive, Unity displays the Realtime Shadow Color property in the Lighting window. Unity uses this color when it combines real-time shadows with baked shadows. Change this value to approximate the color of the indirect lighting in your Scene, to better match the real-time shadows with the baked shadows.

The Main Directional Light

Unity automatically chooses the Directional Light in your Scene with the highest intensity value to be the Main Directional Light.

Lighting Mode: Shadowmask
The Light Explorer window