Version: Unity 6.6 (6000.6)
Language : English
Choose a light baking backend
Group GameObjects together in a lightmap with Baked Tags

Unity Compute Light Baker

The Unity Compute Light Baker is a light baking backend that produces lightmaps, Light Probes, and Adaptive Probe Volume data.

It’s built on the lighting tech stack in the Scriptable Render Pipelines (SRP) Core package, using Unity Compute shaders. The baker uses the Unified Ray Tracing API, which supports both compute-emulated and hardware-accelerated ray tracing.

The Unity Compute Light Baker is currently opt-in. Unity recommends it over the deprecated Progressive CPU Lightmapper. For an overview of all the available backends, refer to Choose a light baking backend.

Render pipeline support

The Unity Compute Light Baker is available in the Universal Render Pipeline (URP) and the High Definition Render Pipeline (HDRP). It isn’t available in the Built-In Render Pipeline.

Refer to render pipeline feature comparison for more information about support for light baking backends across render pipelines.

Enable the Unity Compute Light Baker

To use the Unity Compute Light Baker in your project, follow these steps:

  1. Go to Edit > Project Settings > Graphics.
  2. Navigate to Light Baker.
  3. Set Default Light Baker to Unity Compute Light Baker.

For more information, refer to Light Baker in the Graphics settings window reference.

Hardware ray tracing

The Unified Ray Tracing API supports hardware-accelerated ray tracing on select platforms. When hardware-accelerated ray tracing isn’t available for a platform, Unity emulates it in compute shaders.

To enable hardware ray tracing, go to the Lighting window (menu: Window > Rendering > Lighting) and enable Hardware Ray Tracing.

Differences that might require lighting adjustments

The Unity Compute Light Baker behaves differently from the Progressive Light Baker in the following ways. You might need to change lighting related settings to get the best results.

Direct sample count

The Unity Compute Light Baker doesn’t include an Environment Samples setting.

Direct environment sampling uses the direct sample count, and direct emissive sampling also uses the direct sample count. The direct sample count is the number of samples used to sample each light, and it needs to be high enough to sample these light types adequately.

Indirect emissive and indirect environment contributions use the indirect sample count, in the same way as other lights.

Unity samples both emissive and environment lights, which gives good quality with fewer samples. Environment lighting and emissive geometry with high variation in emission require more direct samples to produce a noise-free result.

Bounces

Bounces describe light reflections that happen between a light source and the camera:

  • A single bounce means direct light from a light is reflected into the camera through a lightmap or Light Probe. Direct light from the environment, emissive surfaces, and other light sources is visible in lightmaps and Light Probes.
  • Two or more bounces means the light is also diffusely interreflected one or more times through other surfaces, which adds soft diffuse lighting.

For performance reasons, Unity uses a Russian roulette process, which means the baker stops bouncing automatically when the effect of additional bounces becomes negligible.

Anti-aliasing samples

The Unity Compute Light Baker doesn’t include an Anti-aliasing Samples setting. It uses stochastic antialiasing, which means each sample taken in a texel uses a unique sample position.

LOD groups

The Unity Compute Light Baker supports the Global Illumination LOD setting on LOD Groups, which selects the LOD to use for global illumination calculation in the scene. This setting applies only when you use the Unity Compute Light Baker.

For more information, refer to LOD Group component reference.

Procedural terrain ray marching

To bake scenes that contain many large terrains, the baker ray marches the terrain procedurally using the heightfield data, instead of using a triangulated version of the terrain. This greatly reduces the memory footprint of terrains and increases performance when many large terrains are present.

To disable this behavior, from the menu, select Edit > Preferences > Editor Diagnostics > Editor and deselect GITerrainRayMarching.

Note: This setting applies to your machine across all projects, not to a single project.

Known issues

  • Performance with the Unity Compute Light Baker is lower than with the Progressive GPU Lightmapper when the baker uses compute-emulated ray tracing.
  • You can’t select which GPU to use when you bake with the Unity Compute Light Baker.
  • The Unity Compute Light Baker doesn’t support interactive lightmap preview. Unity uses the OpenCL based GPU lightmapper instead. Refer to Preview baked lighting.

Additional resources

Choose a light baking backend
Group GameObjects together in a lightmap with Baked Tags