Welcome to mirror list, hosted at ThFree Co, Russian Federation.

compositor_morphological_distance_info.hh « infos « compositor « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fc960e119e5ad7a4fe7d02389fb18745d846be31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include "gpu_shader_create_info.hh"

GPU_SHADER_CREATE_INFO(compositor_morphological_distance_shared)
    .local_group_size(16, 16)
    .push_constant(Type::INT, "radius")
    .sampler(0, ImageType::FLOAT_2D, "input_tx")
    .image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
    .compute_source("compositor_morphological_distance.glsl");

GPU_SHADER_CREATE_INFO(compositor_morphological_distance_dilate)
    .additional_info("compositor_morphological_distance_shared")
    .define("OPERATOR(a, b)", "max(a, b)")
    .define("LIMIT", "FLT_MIN")
    .do_static_compilation(true);

GPU_SHADER_CREATE_INFO(compositor_morphological_distance_erode)
    .additional_info("compositor_morphological_distance_shared")
    .define("OPERATOR(a, b)", "min(a, b)")
    .define("LIMIT", "FLT_MAX")
    .do_static_compilation(true);