---
title: Initialize(int, int, FilterHint, OIDNDeviceType)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/rendering/denoising/openimagedenoiser/initialize
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/rendering/denoising/openimagedenoiser/initialize.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:58:20.578Z
locale: en-us
---

# Initialize(int, int, FilterHint, OIDNDeviceType)

> Initialize the denoiser for the given image size.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering.Denoising](/engine/7000.0/script-reference/unityengine/rendering/denoising.md)
* **Assembly:** [UnityEngine.OpenImageDenoiseModule](/engine/7000.0/script-reference/modules/unityengine-openimagedenoisemodule.md)

```csharp
public bool Initialize(int width, int height, FilterHint filterHint = FilterHint.Lightmap, OIDNDeviceType deviceType = OIDNDeviceType.Default)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Image width in pixels.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Image height in pixels.**** (\[FilterHint]\(/engine/7000.0/script-reference/unityengine/rendering/denoising/filterhint)): The kind of image being denoised; selects the OIDN filter.**** (\[OIDNDeviceType]\(/engine/7000.0/script-reference/unityengine/rendering/denoising/oidndevicetype)): The OIDN device to denoise on.

### Returns

| Type                                                          | Description                                                                                                     |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True when the device and filter were created; false when the requested device is not available on this machine. |
