Shadows & Translucency

intermediate concepts

Volumetric Lights 2 (Built-in) · Core Concepts

Shadows & Translucency

Volumetric Lights 2 supports per-light shadow occlusion and translucent colored shadows. This page explains how to configure both features.

Shadow Occlusion

Enable Shadow Occlusion in the Volumetric Light inspector to have objects block the volumetric light rays, creating realistic shadow shafts.

SettingRecommendation
Shadow ResolutionStart at 256. Only increase if you see noticeable blocky shadows.
Shadow Culling MaskInclude only layers with objects that should cast shadows. Fewer layers = better performance.
Shadow Bake IntervalUse OnStart for static scenes. Use EveryFrame when shadow casters move.
Pro tip: For point lights, Half-sphere bake mode is significantly faster than Cubemap. Use cubemap only when you need 360-degree shadow coverage.

Direct Light Cast

Direct light cast effect

The Direct Light Cast option projects the volumetric light onto opaque surfaces, making them visible as if lit by a regular light. This feature requires the deferred rendering path.

To enable deferred rendering, go to your Camera settings and switch the rendering path to Deferred.

Camera deferred rendering settings

SettingDescription
Additive ModeAdds light intensity to surfaces. Works in both forward and deferred paths.
Blend ModeUses alpha blending for surface lighting. Requires deferred rendering path. Slightly slower than additive.
Note: Only opaque objects can be lit using Direct Light Cast. You can combine this option with translucency.

Translucent Shadow Maps

Translucent shadow maps

Enable Translucency in the Shadow Occlusion section to capture colors from semi-transparent objects (stained glass, colored panels, etc.).

Translucency settings in inspector

Setup

  1. Enable Shadow Occlusion on the Volumetric Light component.
  2. Enable the Translucency option within the Shadow Occlusion section.
  3. Add the Volumetric Lights Translucency script to each transparent object that should cast colored shadows.

Translucency script on object

You can customize the intensity and blending factors of the captured colors over the regular scattering effect.

Next Steps

Was this page helpful?