38 b.add_input<
decl::Float>(
"Mask").default_value(0.0f).min(0.0f).max(1.0f);
103 horizontal_pass_result.
release();
126 const int2 transposed_domain =
int2(domain.size.y, domain.size.x);
138 return horizontal_pass_result;
168 return "compositor_morphological_step_dilate";
170 return "compositor_morphological_step_erode";
217 output.steal_data(output_mask);
237 node_storage(
bnode()).falloff);
247 if (input.is_single_value()) {
292 ntype.
draw_buttons = file_ns::node_composit_buts_dilateerode;
293 ntype.
declare = file_ns::cmp_node_dilate_declare;
294 ntype.
initfunc = file_ns::node_composit_init_dilateerode;
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_OP_FILTER
#define BLI_assert_unreachable()
@ CMP_NODE_DILATE_ERODE_STEP
@ CMP_NODE_DILATE_ERODE_DISTANCE_FEATHER
@ CMP_NODE_DILATE_ERODE_DISTANCE_THRESHOLD
@ CMP_NODE_DILATE_ERODE_DISTANCE
void GPU_shader_uniform_1i(GPUShader *sh, const char *name, int value)
void GPU_shader_uniform_1f(GPUShader *sh, const char *name, float value)
void GPU_shader_bind(GPUShader *shader)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
struct GPUShader GPUShader
CMPNodeDilateErodeMethod get_method()
void execute_step_vertical_pass(Result &horizontal_pass_result)
const char * get_morphological_step_shader_name()
void execute_distance_threshold()
Result execute_step_horizontal_pass()
void execute_distance_feather()
int get_morphological_distance_threshold_radius()
GPUShader * get_shader(const char *info_name, ResultPrecision precision)
Result create_result(ResultType type, ResultPrecision precision)
NodeOperation(Context &context, DNode node)
const bNode & bnode() const
Result & get_input(StringRef identifier) const
Result & get_result(StringRef identifier)
Context & context() const
virtual Domain compute_domain()
void bind_as_image(GPUShader *shader, const char *image_name, bool read=false) const
void pass_through(Result &target)
void unbind_as_texture() const
void unbind_as_image() const
void allocate_texture(Domain domain, bool from_pool=true)
void bind_as_texture(GPUShader *shader, const char *texture_name) const
local_group_size(16, 16) .push_constant(Type b
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_register_type(bNodeType *ntype)
static void cmp_node_dilate_declare(NodeDeclarationBuilder &b)
static void node_composit_init_dilateerode(bNodeTree *, bNode *node)
static void node_composit_buts_dilateerode(uiLayout *layout, bContext *, PointerRNA *ptr)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
void morphological_distance(Context &context, Result &input, Result &output, int distance)
void smaa(Context &context, Result &input, Result &output, float threshold=0.1f, float local_contrast_adaptation_factor=2.0f, int corner_rounding=25)
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
void register_node_type_cmp_dilateerode()
void cmp_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
int RNA_enum_get(PointerRNA *ptr, const char *name)
NodeGetCompositorOperationFunction get_compositor_operation
void(* initfunc)(bNodeTree *ntree, bNode *node)
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare