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