29 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
30 .compositor_domain_priority(0);
116 const float translation_amount = diagonal_length * node_storage(
bnode()).distance;
139 return float2(node_storage(
bnode()).center_x, node_storage(
bnode()).center_y) * input_size;
147 const int iterations = 2 << (node_storage(
bnode()).iter - 1);
149 return math::min(iterations, upper_limit);
157 if (input.is_single_value()) {
162 if (node_storage(
bnode()).distance != 0.0f) {
166 if (node_storage(
bnode()).
spin != 0.0f) {
170 if (node_storage(
bnode()).zoom != 0.0f) {
192 ntype.
declare = file_ns::cmp_node_directional_blur_declare;
194 ntype.
initfunc = file_ns::node_composit_init_dblur;
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_OP_FILTER
void GPU_shader_uniform_2fv(GPUShader *sh, const char *name, const float data[2])
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 GPU_texture_extend_mode(GPUTexture *texture, GPUSamplerExtendMode extend_mode)
@ GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER
void GPU_texture_filter_mode(GPUTexture *texture, bool use_filter)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemS(uiLayout *layout)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
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
GPUShader * get_shader(const char *info_name, 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
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)
T cos(const AngleRadianBase< T > &a)
T length(const VecBase< T, Size > &a)
T min(const T &a, const T &b)
T sin(const AngleRadianBase< T > &a)
MatT from_rotation(const RotationT &rotation)
static void node_composit_init_dblur(bNodeTree *, bNode *node)
static void node_composit_buts_dblur(uiLayout *layout, bContext *, PointerRNA *ptr)
static void cmp_node_directional_blur_declare(NodeDeclarationBuilder &b)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
void compute_dispatch_threads_at_least(GPUShader *shader, int2 threads_range, int2 local_size=int2(16))
VecBase< float, 2 > float2
void register_node_type_cmp_dblur()
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)
NodeGetCompositorOperationFunction get_compositor_operation
void(* initfunc)(bNodeTree *ntree, bNode *node)
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare