22 b.use_custom_socket_order();
23 b.allow_any_socket_order();
25 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
28 b.add_output<
decl::Color>(
"Image").structure_type(StructureType::Dynamic).align_with_previous();
36 "Specifies the threshold or sensitivity to edges. Lowering this value you will be able "
37 "to detect more edges at the expense of performance");
42 "If there is an neighbor edge that has a Contrast Limit times bigger contrast than "
43 "current edge, current edge will be discarded. This allows to eliminate spurious "
50 .description(
"Specifies how much sharp corners will be rounded");
79 return math::max(0.0f, this->
get_input(
"Contrast Limit").get_single_value_default(2.0f));
107 ntype.
ui_name =
"Anti-Aliasing";
111 ntype.
declare = file_ns::cmp_node_antialiasing_declare;
#define NODE_CLASS_OP_FILTER
#define CMP_NODE_ANTIALIASING
#define NOD_REGISTER_NODE(REGISTER_FUNC)
NodeOperation(Context &context, DNode node)
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
StructureType structure_type
float get_local_contrast_adaptation_factor()
int get_corner_rounding()
NodeOperation(Context &context, DNode node)
void node_type_size(bNodeType &ntype, int width, int minwidth, int maxwidth)
void node_register_type(bNodeType &ntype)
void smaa(Context &context, const Result &input, Result &output, const float threshold=0.1f, const float local_contrast_adaptation_factor=2.0f, const int corner_rounding=25)
T clamp(const T &a, const T &min, const T &max)
T max(const T &a, const T &b)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
static void cmp_node_antialiasing_declare(NodeDeclarationBuilder &b)
static void register_node_type_cmp_antialiasing()
void cmp_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGetCompositorOperationFunction get_compositor_operation
const char * enum_name_legacy
NodeDeclareFunction declare