Blender V4.3
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
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. */
26void 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
@ R_FILTER_GAUSS
void symmetric_separable_blur_variable_size(Context &context, Result &input, Result &output, Result &radius, int filter_type=R_FILTER_GAUSS, int weights_resolution=128)