30 .default_value({0.8f, 0.8f, 0.8f, 1.0f})
31 .compositor_domain_priority(0);
33 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
51 node->custom4 = 16.0f;
168 const int max_size =
math::max(image_size.x, image_size.y);
175 return size * (max_size / 100.0f);
181 if (input.is_single_value()) {
229 ntype.
declare = file_ns::cmp_node_bokehblur_declare;
230 ntype.
draw_buttons = file_ns::node_composit_buts_bokehblur;
231 ntype.
initfunc = file_ns::node_composit_init_bokehblur;
#define NODE_CLASS_OP_FILTER
@ CMP_NODEFLAG_BLUR_VARIABLE_SIZE
@ CMP_NODEFLAG_BLUR_EXTEND_BOUNDS
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_shader_uniform_1b(GPUShader *sh, const char *name, bool value)
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
int compositor_domain_priority() const
void execute_constant_size()
float compute_blur_radius()
int compute_variable_size_search_radius()
void execute_variable_size()
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()
float get_float_value() const
void bind_as_image(GPUShader *shader, const char *image_name, bool read=false) const
void pass_through(Result &target)
void unbind_as_texture() const
const Domain & domain() const
void unbind_as_image() const
bool is_single_value() 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_register_type(bNodeType *ntype)
T clamp(const T &a, const T &min, const T &max)
T max(const T &a, const T &b)
static void node_composit_init_bokehblur(bNodeTree *, bNode *node)
static void cmp_node_bokehblur_declare(NodeDeclarationBuilder &b)
static void node_composit_buts_bokehblur(uiLayout *layout, bContext *, PointerRNA *ptr)
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))
float maximum_float(Context &context, GPUTexture *texture)
VecBase< int32_t, 2 > int2
void register_node_type_cmp_bokehblur()
void cmp_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
NodeGetCompositorOperationFunction get_compositor_operation
void(* initfunc)(bNodeTree *ntree, bNode *node)
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare