Blender
V4.3
source
blender
compositor
realtime_compositor
algorithms
COM_algorithm_symmetric_separable_blur_variable_size.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
DNA_scene_types.h
"
8
9
#include "
COM_context.hh
"
10
#include "
COM_result.hh
"
11
12
namespace
blender::realtime_compositor
{
13
14
/* Blur the input using a horizontal and a vertical separable blur passes given the filter type
15
* using SymmetricSeparableBlurWeights, where the number of weights is equal to weights_resolution.
16
* Since the radius can be variable, the number of weights can be less than or more than the number
17
* of pixels actually getting accumulated during blurring, so the weights are interpolated in the
18
* shader as needed, the resolution is typically set to the maximum possible radius if known. The
19
* radius of the blur can be variable and is defined using the given radius float image. The output
20
* is written to the given output result, which will be allocated internally and is thus expected
21
* not to be previously allocated.
22
*
23
* Technically, variable size blur can't be computed separably, however, assuming a sufficiently
24
* smooth radius field, the results can be visually pleasing, so this can be used a more performant
25
* variable size blur if the quality is satisfactory. */
26
void
symmetric_separable_blur_variable_size
(Context &context,
27
Result &input,
28
Result &output,
29
Result &radius,
30
int
filter_type =
R_FILTER_GAUSS
,
31
int
weights_resolution = 128);
32
33
}
// namespace blender::realtime_compositor
COM_context.hh
COM_result.hh
DNA_scene_types.h
R_FILTER_GAUSS
@ R_FILTER_GAUSS
Definition
DNA_scene_types.h:2188
blender::realtime_compositor
Definition
BKE_node.hh:80
blender::realtime_compositor::symmetric_separable_blur_variable_size
void symmetric_separable_blur_variable_size(Context &context, Result &input, Result &output, Result &radius, int filter_type=R_FILTER_GAUSS, int weights_resolution=128)
Definition
symmetric_separable_blur_variable_size.cc:125
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0