# 1. Realtime, Mixed, and Baked Lights Part of [[Lighting and Baking]]. Targets Unity **6000.5+** URP (Quest notes in [[6.Mobile and Meta Quest Considerations]] use **6.3 LTS**). Next: [[2.GPU Lightmapper Workflow]]. Every `Light` component has a **Mode**: **Realtime**, **Mixed**, or **Baked**. That Mode decides whether the light contributes every frame, participates in a bake, or both. Separately, the scene's **Lighting Mode** (on the Lighting Settings asset) decides how *all Mixed lights* behave together. Official: [Set the Mode of a Light](https://docs.unity3d.com/6000.0/Documentation/Manual/LightModes.html) · [Lighting Mode](https://docs.unity3d.com/6000.0/Documentation/Manual/lighting-mode.html) ## 1.1 The three Modes | Mode | Direct light | Indirect (GI) | Typical use | |---|---|---|---| | **Realtime** | Every frame | Not baked into lightmaps (unless you also use a realtime GI path — URP does not ship Enlighten Realtime GI the way Built-in/HDRP historically did; treat Realtime as "no baked contribution") | Player flashlight, flickering props, fully dynamic day cycles *(realtime GI availability across pipelines is easy to misremember — verify against your pipeline feature comparison if you need dynamic GI)* | | **Mixed** | Depends on Lighting Mode (usually realtime for dynamic receivers) | Baked into lightmaps / probes | Key sun + fill that must cast realtime shadows on the player while still bouncing light into the room | | **Baked** | Stored in lightmaps (and probes) | Stored in lightmaps / probes | Static lamps, ceiling cans, emissive panels, anything that never moves | **Rule of thumb for URP production:** bake what you can; keep Mixed for the few lights that must shadow a moving character; keep Realtime only for gameplay-critical dynamic lights within your additional-light budget. ## 1.2 Lighting Mode (Mixed lights only) Set **Lighting Mode** on the **Lighting Settings** asset (Lighting window). Unity documents four options, ranked by visual fidelity / cost: 1. **Distance Shadowmask** — highest fidelity at distance; most expensive. Open worlds on mid/high-end. 2. **Shadowmask** — baked static shadows in a shadow-mask texture (up to four overlapping Mixed lights per texel in RGBA); realtime shadows from dynamic objects within Shadow Distance. 3. **Baked Indirect** — realtime direct + shadows; baked indirect only. Clean blending of realtime and baked; common default for desktop URP. 4. **Subtractive** — simplest / cheapest. Static objects get baked direct+indirect in lightmaps; dynamic objects get realtime lighting; only the strongest directional casts realtime shadows. Good for low-end, stylized, or cel-shaded looks. How Unity calculates Mixed lighting (from the [Lighting Mode](https://docs.unity3d.com/6000.0/Documentation/Manual/lighting-mode.html) table): | Contribution | Baked Indirect | Shadowmask | Distance Shadowmask | Subtractive | |---|---|---|---|---| | Direct | Realtime | Realtime | Realtime | Realtime for dynamic; baked for static | | Indirect | Baked | Baked | Baked | Baked | | Specular | Realtime | Realtime | Realtime | Dynamic only | | Shadows (dynamic, ≤ Shadow Distance) | Realtime | Realtime | Realtime | Realtime from single strongest Directional only | | Shadows (static, ≤ Shadow Distance) | Realtime | Baked (≤4 lights/object) | Realtime | Baked | | Shadows (static, beyond Shadow Distance) | None | Baked | Baked | Baked | **Where data lives:** Light Probes / APV store indirect for dynamic objects; lightmaps store indirect (and in Subtractive, also direct) for static objects; Shadowmask / Distance Shadowmask also create **shadow mask textures** sharing the lightmap UV layout. > [!tip] URP feature support > Confirm which Lighting Modes your URP/HDRP version supports via Unity's [Render pipeline feature comparison](https://docs.unity3d.com/6000.1/Documentation/Manual/render-pipelines-feature-comparison.html). Do not assume every Built-in mode exists identically in URP. ## 1.3 Contribute Global Illumination and static flags For a Mesh Renderer to receive a lightmap: 1. Enable **Contribute Global Illumination** (Mesh Renderer > Lighting), or mark the object **Contribute GI** via Static flags — Unity's UI has shifted wording across versions; the Lighting section on the Mesh Renderer is the reliable place. 2. Set **Receive Global Illumination** to **Lightmaps** (static) or **Light Probes** (dynamic / probe-lit). For a Light to affect the bake: Mode must be **Mixed** or **Baked**. Realtime lights are ignored by the Progressive Lightmapper's baked paths. ## 1.4 Directional Mode (lightmap encoding) In Lightmapping Settings, **Directional Mode** is **Directional** (default) or **Non-directional**: - **Directional** generates a second texture storing dominant light direction so normal-mapped diffuse responds to baked light. ~2× lightmap memory; shaders sample both textures. - **Non-directional** is a single texture — less memory, faster decode, lower quality. Official: [Store light direction with Directional Mode](https://docs.unity3d.com/6000.0/Documentation/Manual/LightmappingDirectional.html) For Quest / mobile, **Non-directional** is often the right trade (see part 6). Scenes loaded additively must share the same Directional Mode. ## 1.5 HDRP differences (brief) HDRP uses physical light units, Exposure, and a different probe / volumetric stack. Adaptive Probe Volumes originated in HDRP and are available in URP in Unity 6, but HDRP still has deeper volumetric fog, denser shadow options, and different Mixed lighting packaging. **Do not duplicate HDRP setup here.** For HDRP lighting, volumes, exposure, and custom passes, use [[HDRP Essentials]]. This series stays on **URP**. ## 1.6 Practical Mode choices (URP) | Scenario | Suggested setup | |---|---| | Architectural interior, mostly static | Baked lights + Baked Indirect or Shadowmask; probes/APV for characters | | Third-person outdoor with one sun | One Mixed Directional, Lighting Mode **Baked Indirect** or **Shadowmask**; fill lights Baked | | Stylized / low-end / Quest | Prefer **Baked** + Subtractive or heavy baking; minimize Mixed/Realtime additional lights | | Horror flashlight | Realtime spot for the flashlight only; bake everything else | Next: [[2.GPU Lightmapper Workflow]].