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 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.
Inspector
?
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 . Refer to Enable static batching.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 |
|---|---|
| State | Enables or disables Surface Cache GI for the cameras this Volume affects. The options are:
|
| Intensity | Scales 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. |
| Quality | Selects 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:
|
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 |
|---|---|
| Size | Sets 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. |
| Resolution | Sets 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 Count | Sets 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 Target | Sets 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 Fallback | Applies 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 Warping | Applies 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 Count | Sets 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 Multiplier | Multiplies 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 Bounce | Allows 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 Allocation | Allows 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 Mask | Sets 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 Count | Sets 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 Smoothing | Sets 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 Filtering | Blurs lighting across neighboring patches, which reduces noise. This can also blur out fine detail and increase light leaking. |
| Spatial Sample Count | Sets 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 Radius | Sets 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 Filtering | Reduces 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 Count | Sets 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 Count | Sets the number of denoising passes Unity applies when it upsamples the result to full resolution. More passes reduce noise, at a performance cost. |