32 .description(
"Specifies the position of the split")
33 .compositor_expects_single_value();
54 if (this->
context().use_gpu()) {
107 const float split_pixel = (is_horizontal ? domain.
size.x : domain.
size.y) * split_ratio;
111 output_image.store_pixel(texel,
112 split_pixel <= texel.x ?
113 first_image.load_pixel<float4, true>(texel) :
114 second_image.load_pixel<float4, true>(texel));
119 output_image.store_pixel(texel,
120 split_pixel <= texel.y ?
121 first_image.load_pixel<float4, true>(texel) :
122 second_image.load_pixel<float4, true>(texel));
154 "Combine two images for side-by-side display. Typically used in combination with a Viewer "
158 ntype.
declare = file_ns::cmp_node_split_declare;
#define NODE_CLASS_CONVERTER
@ CMP_NODE_SPLIT_HORIZONTAL
void GPU_shader_uniform_1f(GPUShader *sh, const char *name, float value)
void GPU_shader_bind(GPUShader *shader, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
GPUShader * get_shader(const char *info_name, ResultPrecision precision)
const bNode & bnode() const
NodeOperation(Context &context, DNode node)
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
virtual Domain compute_domain()
void allocate_texture(Domain domain, bool from_pool=true)
void unbind_as_texture() const
void bind_as_texture(GPUShader *shader, const char *texture_name) const
void bind_as_image(GPUShader *shader, const char *image_name, bool read=false) const
void unbind_as_image() const
CMPNodeSplitAxis get_split_axis()
GPUShader * get_split_shader()
NodeOperation(Context &context, DNode node)
void node_register_type(bNodeType &ntype)
void compute_dispatch_threads_at_least(GPUShader *shader, int2 threads_range, int2 local_size=int2(16))
void parallel_for(const int2 range, const Function &function)
T clamp(const T &a, const T &min, const T &max)
static void node_composit_buts_split(uiLayout *layout, bContext *, PointerRNA *ptr)
static void cmp_node_split_declare(NodeDeclarationBuilder &b)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
VecBase< int32_t, 2 > int2
static void register_node_type_cmp_split()
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
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
uiLayout & row(bool align)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)