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