22 return "compositor_morphological_distance_feather_dilate";
24 return "compositor_morphological_distance_feather_erode";
35 context.cache_manager().morphological_distance_feather_weights.get(
52 output.allocate_texture(transposed_domain);
53 output.bind_as_image(shader,
"output_img");
68 Result &horizontal_pass_result,
79 context.cache_manager().morphological_distance_feather_weights.get(
85 output.allocate_texture(domain);
86 output.bind_as_image(shader,
"output_img");
104 horizontal_pass_result.
release();
void GPU_shader_bind(GPUShader *shader)
struct GPUShader GPUShader
void unbind_distance_falloffs_as_texture() const
void bind_distance_falloffs_as_texture(GPUShader *shader, const char *texture_name) const
void unbind_weights_as_texture() const
void bind_weights_as_texture(GPUShader *shader, const char *texture_name) const
void unbind_as_texture() const
const Domain & domain() const
void bind_as_texture(GPUShader *shader, const char *texture_name) const
static const char * get_shader_name(int distance)
static void vertical_pass(Context &context, Result &original_input, Result &horizontal_pass_result, Result &output, int distance, int falloff_type)
static Result horizontal_pass(Context &context, Result &input, int distance, int falloff_type)
void compute_dispatch_threads_at_least(GPUShader *shader, int2 threads_range, int2 local_size=int2(16))
void morphological_distance_feather(Context &context, Result &input, Result &output, int distance, int falloff_type=PROP_SMOOTH)
VecBase< int32_t, 2 > int2
float distance(float a, float b)