Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IntegrateIndirectRadiance(IDeviceContext, int, int, int, bool, BufferSlice<SphericalHarmonicsL2>)

Integrates indirect lighting contribution at probe positions using spherical sampling and path tracing.
Read time 1 minuteLast updated 12 days ago

Definition

public IProbeIntegrator.Result IntegrateIndirectRadiance(IDeviceContext context, int positionOffset, int positionCount, int sampleCount, bool ignoreEnvironment, BufferSlice<SphericalHarmonicsL2> radianceEstimateOut)

Parameters

The IDeviceContext to use for computation and memory operations.

positionOffset

Offset measured from the beginning of the probe position buffer.

positionCount

Number of probes to integrate.

sampleCount

The number of samples to take per probe.

ignoreEnvironment

If true, excludes environment lighting from the indirect contribution calculation.

Output BufferSlice that the indirect radiance estimate is written into, encoded as SphericalHarmonicsL2.

Returns

Type

Description

ResultReturn code.

Remarks

This method performs multi-bounce global illumination calculations by tracing rays from each probe position and accumulating light bounces through the scene. The number of bounces is controlled by the bounce count parameter set in RadeonRaysProbeIntegrator.Prepare. Higher sample counts and bounce counts significantly improve quality but increase computation time. Indirect radiance includes contribution from the following:
  • Light bounced off surfaces.
  • Light transmitted through transparent materials.
  • Illumination from emissive materials.
  • Multi-bounce environment lighting.