Blender V4.3
denoise.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7#include "device/memory.h"
8#include "graph/node.h"
9#include "session/buffers.h"
10
12
21
22/* COnstruct human-readable string which denotes the denoiser type. */
24
25typedef int DenoiserTypeMask;
26
28 /* Best quality of the result without extra processing time, but requires guiding passes to be
29 * noise-free. */
31
32 /* Denoise color and guiding passes together.
33 * Improves quality when guiding passes are noisy using least amount of extra processing time. */
35
36 /* Prefilter noisy guiding passes before denoising color.
37 * Improves quality when guiding passes are noisy using extra processing time. */
39
41};
42
49
50/* NOTE: Is not a real scene node. Using Node API for ease of (de)serialization.
51 * The default values here do not really matter as they are always initialized from the
52 * Integrator node. */
53class DenoiseParams : public Node {
54 public:
56
57 /* Apply denoiser to image. */
58 bool use = false;
59
60 /* Denoiser type. */
62
63 /* Viewport start sample. */
64 int start_sample = 0;
65
66 /* Auxiliary passes. */
67 bool use_pass_albedo = true;
68 bool use_pass_normal = true;
69
70 /* Configure the denoiser to use motion vectors, previous image and a temporally stable model. */
71 bool temporally_stable = false;
72
73 /* If true, then allow, if supported, OpenImageDenoise to use GPU device.
74 * If false, then OpenImageDenoise will always use CPU regardless of GPU device presence. */
75 bool use_gpu = true;
76
79
80 static const NodeEnum *get_type_enum();
81 static const NodeEnum *get_prefilter_enum();
82 static const NodeEnum *get_quality_enum();
83
85};
86
static const NodeEnum * get_quality_enum()
Definition denoise.cpp:51
bool temporally_stable
Definition denoise.h:71
DenoiserQuality quality
Definition denoise.h:78
static const NodeEnum * get_prefilter_enum()
Definition denoise.cpp:38
static const NodeEnum * get_type_enum()
Definition denoise.cpp:26
bool use_gpu
Definition denoise.h:75
int start_sample
Definition denoise.h:64
DenoiserPrefilter prefilter
Definition denoise.h:77
bool use_pass_normal
Definition denoise.h:68
bool use_pass_albedo
Definition denoise.h:67
DenoiserQuality
Definition denoise.h:43
@ DENOISER_QUALITY_FAST
Definition denoise.h:46
@ DENOISER_QUALITY_NUM
Definition denoise.h:47
@ DENOISER_QUALITY_BALANCED
Definition denoise.h:45
@ DENOISER_QUALITY_HIGH
Definition denoise.h:44
const char * denoiserTypeToHumanReadable(DenoiserType type)
Definition denoise.cpp:9
DenoiserPrefilter
Definition denoise.h:27
@ DENOISER_PREFILTER_FAST
Definition denoise.h:34
@ DENOISER_PREFILTER_NONE
Definition denoise.h:30
@ DENOISER_PREFILTER_NUM
Definition denoise.h:40
@ DENOISER_PREFILTER_ACCURATE
Definition denoise.h:38
int DenoiserTypeMask
Definition denoise.h:25
DenoiserType
Definition denoise.h:13
@ DENOISER_NONE
Definition denoise.h:18
@ DENOISER_OPTIX
Definition denoise.h:14
@ DENOISER_OPENIMAGEDENOISE
Definition denoise.h:15
@ DENOISER_ALL
Definition denoise.h:19
@ DENOISER_NUM
Definition denoise.h:16
#define CCL_NAMESPACE_END
#define NODE_DECLARE
Definition node_type.h:142