# IntegrateValidity(IDeviceContext, int, int, int, BufferSlice<float>)

> Integrate validity.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.LightTransport](/engine/6000.5/script-reference/unityengine/lighttransport.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public IProbeIntegrator.Result IntegrateValidity(IDeviceContext context, int positionOffset, int positionCount, int sampleCount, BufferSlice<float> validityEstimateOut)
```

### Parameters

**** (\[IDeviceContext]\(/engine/6000.5/script-reference/unityengine/lighttransport/idevicecontext)): [IDeviceContext](/engine/6000.5/script-reference/unityengine/lighttransport/idevicecontext.md) for computation and memory operations.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Offset measured from the beginning of the probe position buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of probes to integrate.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Number of samples to take.**** (\[BufferSlice\<float>]\(/engine/6000.5/script-reference/unityengine/lighttransport/bufferslice1)): [BufferSlice](/engine/6000.5/script-reference/unityengine/lighttransport/bufferslice1.md) to write the validity estimate into.

### Returns

| Type                                                                                            | Description  |
| ----------------------------------------------------------------------------------------------- | ------------ |
| [Result](/engine/6000.5/script-reference/unityengine/lighttransport/iprobeintegrator/result.md) | Return code. |

### Remarks

The integrator does spherical sampling for each probe position. Validity is 1 if all rays hit front-facing triangles or the sky. Validity is 0 if all rays hit back-facing triangles.
