Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Surface Cache Global Illumination Volume Override reference for URP

Explore the properties that control the quality, cost, and extent of the real-time indirect diffuse lighting that Surface Cache Global Illumination produces.
Read time 8 minutesLast updated a day ago

Surface Cache Global Illumination (GI) produces real-time indirect diffuse lighting in URP, without baking or precomputation. Use the Surface Cache Global Illumination Volume Override to configure it for each scene, and to blend between settings in the same way as any other Volume effect.
To add the override, select a Volume, then in the
Inspector

?

window select Add Override > Lighting > Surface Cache Global Illumination. The override has no effect unless the Surface Cache Global Illumination Renderer Feature is also on the active Universal Renderer. The Renderer Feature has no settings of its own, so you configure the effect entirely through this override. To add the Renderer Feature, refer to Add a Renderer Feature to a URP Renderer.
Surface Cache GI replaces baked global illumination rather than adding to it. When Surface Cache GI is active, Unity stops applying indirect light from lightmaps and Adaptive Probe Volumes to opaque surfaces, and doesn't apply Surface Cache GI lighting to transparent surfaces at all. It also has the following requirements:
  • Disable
    Static Batching

    ?

    . Refer to Enable static batching.
  • Set Default Mesh Buffer Target to Raw. Refer to Graphics project settings reference.
  • The device must support compute shaders. Unity supports hardware ray tracing only on DirectX 12. On other graphics APIs, Surface Cache GI uses a compute shader fallback, which is slower.

Surface Cache Global Illumination Volume Override properties

The Surface Cache Global Illumination Volume Override contains the following properties.

Property

Description

StateEnables or disables Surface Cache GI for the cameras this Volume affects. The options are:
  • Enabled (default): Unity calculates indirect lighting even when Intensity is 0, and keeps the lighting data it has already accumulated.
  • Disabled: Unity stops all per-frame work and discards that data, so lighting takes time to build up again when you re-enable it.
IntensityScales the indirect lighting that Surface Cache GI contributes. At 0, it contributes no indirect lighting, but Unity keeps calculating and retains the accumulated data. To stop the calculation entirely, set State to Disabled. This property is available only if you open the More (⋮) menu and select Advanced Properties.
QualitySelects a preset that sets most of the other properties in this override. Selecting a preset overwrites the current value of every property it controls, including values you set yourself. The following options are available:
  • Low: Calculates a single light bounce, disables spatial filtering, and uses the coarsest patch grid. Applies the strongest temporal smoothing, so lighting is stable but slow to react.
  • Medium (default): Enables multi-bounce lighting and spatial filtering, and uses a finer patch grid than Low.
  • High: Increases sample counts and patch grid resolution further, and enables Distance Fallback so that surfaces beyond the volume still receive lighting.
  • Ultra: Uses the highest sample counts, the finest patch grid, and the most denoising passes. Applies the least temporal smoothing, so lighting reacts fastest to changes.
  • Custom: Lets you set each property individually. Unity selects this option automatically when you change a property that a preset controls.
Presets don't configure the volume for your scene, so set Size, Cascade Count, and Focus Target separately.

Volume

The Volume section defines the region of your scene that receives real-time indirect lighting, and how finely Unity divides that region into patches.

Property

Description

SizeSets the size of the region that Surface Cache GI covers, in world units. Unity doesn't create patches beyond this distance, so set it as small as possible while still covering your scene. You can change this value at runtime without causing a performance spike.
ResolutionSets the number of patches in each cascade. Higher values produce smaller patches and more spatial detail, and use more memory. Changing this value at runtime can cause a brief performance spike, because Unity reallocates internal buffers.
Cascade CountSets how Unity distributes patches inside the volume. A single cascade produces patches of a uniform size across the whole volume. More cascades produce higher resolution closer to the camera and extend the effective range of the volume, but usually increase the total number of patches. Changing this value at runtime can cause a brief performance spike, because Unity reallocates internal buffers.
Focus TargetSets the GameObject that the cascades center on, so that the highest-resolution lighting follows something other than the active camera. When you don't set a GameObject, the cascades follow the active camera. This property is available only when you edit a Volume in a scene, not when you edit a Volume Profile asset.
Distance FallbackApplies a real-time global probe that Unity calculates from the environment lighting, beyond the volume. Enable this property to reduce the number of patches Unity needs in a large scene, at the cost of less accurate lighting in the distance.
Patch WarpingApplies a small periodic warp to sample positions before they resolve to a patch, which reduces flickering on flat surfaces that line up with the voxel grid, such as a floor at a height of 0. When you disable this property, Unity applies no warping and skips the calculation. By default, this property is enabled. This property is available only if you open the More (⋮) menu and select Advanced Properties.

Light Transport

The Light Transport section controls how many rays Unity casts per patch to estimate indirect light. More rays reduce noise and increase GPU cost each frame.

Property

Description

Sample CountSets the number of samples Unity uses per patch each frame to estimate incoming light. Higher values reduce noise and increase GPU cost.
Warm-up Sample MultiplierMultiplies the number of samples Unity takes on newly revealed surfaces, so that the image stabilizes faster when geometry or the camera moves. Higher values reduce flickering on surfaces that have just come into view, and increase GPU cost.
Multi BounceAllows patches to query other patches when their rays hit geometry, which approximates light bouncing more than once. When you disable this property, Unity calculates a single bounce.
Bounce Patch AllocationAllows patches to create new patches wherever their rays hit, in addition to the patches Unity creates on surfaces the camera can see. Enable this property to make multi-bounce lighting more accurate, at a performance cost. Only patches the camera can see create other patches. By default, this property is disabled.
Rendering Layer MaskSets which renderers contribute to Surface Cache GI. Only renderers whose Rendering Layer Mask intersects this mask contribute. By default, all layers contribute. This property is available only if you open the More (⋮) menu and select Advanced Properties.
Defrag CountSets the number of patches Unity defragments each frame. Higher values reduce memory fragmentation, at a small per-frame cost. Increase this value if surfaces turn dark as the camera moves, which can happen when Unity can't allocate new patches. This property is available only if you open the More (⋮) menu and select Advanced Properties.

Patch Filtering

The Patch Filtering section controls how Unity filters patch lighting over time and across neighboring patches. These properties trade stability and smoothness against how quickly lighting responds to change, and how much light leaks between surfaces.

Property

Description

Temporal SmoothingSets how much Unity blends patch lighting with the results of previous frames. Higher values produce a more stable image but respond more slowly to lighting changes. Use higher values for slow-paced scenes, and lower values for scenes with fast-moving lights or objects.
Spatial FilteringBlurs lighting across neighboring patches, which reduces noise. This can also blur out fine detail and increase light leaking.
Spatial Sample CountSets the number of neighboring patches Unity samples for the spatial filter. Higher values improve quality and increase GPU cost. Unity uses this value only when you enable Spatial Filtering.
Spatial RadiusSets the radius of the spatial filter, in patch space. A value of 1 means Unity searches for patches one patch away. Larger values produce a wider blur, which hides more noise but can over-blur the result. Unity uses this value only when you enable Spatial Filtering.
Temporal Post FilteringReduces high-frequency noise, including noise that spatial filtering makes worse, by reusing data from previous frames. By default, this property is enabled. This property is available only if you open the More (⋮) menu and select Advanced Properties.

Screen Filtering

The Screen Filtering section controls how Unity resolves low-resolution patch lighting to full screen resolution. These properties affect the sharpness and noise of the final image.

Property

Description

Lookup Sample CountSets the number of patch queries Unity performs in the low-resolution screen-space step. Higher values reduce noise and increase GPU cost. A value of 0 performs no lookups, which makes the boundaries between patches visible.
Denoising Pass CountSets the number of denoising passes Unity applies when it upsamples the result to full resolution. More passes reduce noise, at a performance cost.

Additional resources