Class Denoiser
The Denoiser class exposes a public API for denoising images that are stored in a NativeArray.
Inherited Members
Namespace: UnityEngine.Rendering.Denoising
Assembly: Unity.Rendering.Denoising.Runtime.dll
Syntax
public class Denoiser : DenoiserBase
Methods
DenoiseRequest(string, NativeArray<Vector4>)
Create a denoise request using a native array texture as input.
Declaration
public DenoiserBase.State DenoiseRequest(string type, NativeArray<Vector4> src)
Parameters
| Type | Name | Description |
|---|---|---|
| string | type | The type of data passed in the native array. Supported options are color, albedo, normal, or flow. |
| NativeArray<Vector4> | src | The input data used for the denoising. |
Returns
| Type | Description |
|---|---|
| DenoiserBase.State | Returns the state of the operation, whether Success or Failure. |
GetResults(NativeArray<Vector4>)
Retrieve the results of a denoise request.
Declaration
public DenoiserBase.State GetResults(NativeArray<Vector4> dst)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeArray<Vector4> | dst | The destination texture that receives the denoise results. |
Returns
| Type | Description |
|---|---|
| DenoiserBase.State | Returns the state of the operation, whether Success or Failure. |
Init(DenoiserType, int, int, int, int, FilterHint)
Create a new denoiser.
Declaration
public DenoiserBase.State Init(DenoiserType type, int width, int height, int tileX = 0, int tileY = 0, DenoiserBase.FilterHint filterHint = FilterHint.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| DenoiserType | type | The type of denoiser backend to create. |
| int | width | The width of the image buffer to be denoised. |
| int | height | The height of the image buffer to be denoised. |
| int | tileX | Determines the width of tiles in pixels. 0 disables tiling. Use this parameter to divide the image buffer into tiles that match the amount of memory available on your GPU. |
| int | tileY | Determines the height of tiles in pixels. 0 disables tiling. Use this parameter to divide the image buffer into tiles that match the amount of memory available on your GPU. |
| DenoiserBase.FilterHint | filterHint | The type of filter to use in the denoising operations (default or lightmap) |
Returns
| Type | Description |
|---|---|
| DenoiserBase.State | Returns the state of the operation, whether Success or Failure. |