IntegrateOcclusion(IDeviceContext, int, int, int, int, BufferSlice<int>, BufferSlice<float>)
Integrate occlusion.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEngine.LightTransport
- Assembly: UnityEditor.CoreModule
public IProbeIntegrator.Result IntegrateOcclusion(IDeviceContext context, int positionOffset, int positionCount, int sampleCount, int maxLightsPerProbe, BufferSlice<int> perProbeLightIndices, BufferSlice<float> probeOcclusionEstimateOut)
Parameters
The IDeviceContext to use for computation and memory operations.
Offset measured from the beginning of the probe position buffer.
Number of probes to integrate.
Number of samples to take.
Maximum number of lights per probe. The value must be 4.
The BufferSlice containing the per probe light indices.
The BufferSlice to write the probe occlusion estimate into. The size of the buffer in bytes should be maxLightsPerProbe * sizeof(float).
Returns
Type | Description |
|---|---|
| Result | Return code. |
Remarks
The integrator does spherical sampling for each probe position. Occlusion is 1 if all rays hit front-facing triangles or the sky. Occlusion is 0 if all rays hit back-facing triangles.
Additional Resources: ComputeOcclusionLightIndicesFromBakeInput.