Blender V4.3
COM_JumpFloodingAlgorithm.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_array.hh"
9#include "BLI_span.hh"
10
11/* Exact copies of the functions in gpu_shader_compositor_jump_flooding_lib.glsl and
12 * COM_algorithm_jump_flooding.hh but adapted for CPU. See those files for more information. */
13
14#define JUMP_FLOODING_NON_FLOODED_VALUE int2(-1)
15
16namespace blender::compositor {
17
18int2 encode_jump_flooding_value(int2 closest_seed_texel, bool is_flooded);
19
20int2 initialize_jump_flooding_value(int2 texel, bool is_seed);
21
22Array<int2> jump_flooding(Span<int2> input, int2 size);
23
24} // namespace blender::compositor
Array< int2 > jump_flooding(Span< int2 > input, int2 size)
int2 initialize_jump_flooding_value(int2 texel, bool is_seed)
int2 encode_jump_flooding_value(int2 closest_seed_texel, bool is_flooded)