Blender
V4.3
intern
cycles
integrator
integrator/adaptive_sampling.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
CCL_NAMESPACE_BEGIN
8
9
class
AdaptiveSampling
{
10
public
:
11
AdaptiveSampling
();
12
13
/* Align number of samples so that they align with the adaptive filtering.
14
*
15
* Returns the new value for the `num_samples` so that after rendering so many samples on top
16
* of `start_sample` filtering is required.
17
*
18
* The alignment happens in a way that allows to render as many samples as possible without
19
* missing any filtering point. This means that the result is "clamped" by the nearest sample
20
* at which filtering is needed. This is part of mechanism which ensures that all devices will
21
* perform same exact filtering and adaptive sampling, regardless of their performance.
22
*
23
* `start_sample` is the 0-based index of sample.
24
*
25
* NOTE: The start sample is included into the number of samples to render. This means that
26
* if the number of samples is 1, then the path tracer will render samples [align_samples],
27
* if the number of samples is 2, then the path tracer will render samples [align_samples,
28
* align_samples + 1] and so on. */
29
int
align_samples
(
int
start_sample,
int
num_samples)
const
;
30
31
/* Check whether adaptive sampling filter should happen at this sample.
32
* Returns false if the adaptive sampling is not use.
33
*
34
* `sample` is the 0-based index of sample. */
35
bool
need_filter
(
int
sample
)
const
;
36
37
bool
use =
false
;
38
int
adaptive_step
= 0;
39
int
min_samples
= 0;
40
float
threshold
= 0.0f;
41
};
42
43
CCL_NAMESPACE_END
AdaptiveSampling
Definition
integrator/adaptive_sampling.h:9
AdaptiveSampling::adaptive_step
int adaptive_step
Definition
integrator/adaptive_sampling.h:38
AdaptiveSampling::AdaptiveSampling
AdaptiveSampling()
Definition
adaptive_sampling.cpp:11
AdaptiveSampling::threshold
float threshold
Definition
integrator/adaptive_sampling.h:40
AdaptiveSampling::need_filter
bool need_filter(int sample) const
Definition
adaptive_sampling.cpp:44
AdaptiveSampling::min_samples
int min_samples
Definition
integrator/adaptive_sampling.h:39
AdaptiveSampling::align_samples
int align_samples(int start_sample, int num_samples) const
Definition
adaptive_sampling.cpp:13
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
sample
uint sample
Definition
kernel/device/gpu/kernel.h:97
CCL_NAMESPACE_BEGIN
Definition
python.cpp:44
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0