33 if (!is_socket_available(input)) {
46 if (!this->
context().is_valid_compositing_region()) {
72 if (this->
context().use_gpu()) {
76 parallel_for(domain.size, [&](
const int2 texel) { output.store_pixel(texel, color); });
82 if (this->
context().use_gpu()) {
105 output.bind_as_image(shader,
"output_img");
120 this->
context().get_compositing_region() :
123 const int2 output_texel = texel + bounds.min;
124 if (output_texel.x > bounds.max.x || output_texel.y > bounds.max.y) {
135 if (this->
context().use_context_bounds_for_input_output()) {
136 return Domain(this->
context().get_compositing_region_size());
167 row.
icon = ICON_ERROR;
168 row.
tooltip =
TIP_(
"Node group must have a Color output socket");
173 if (group_outputs[0]->type !=
SOCK_RGBA) {
176 row.
icon = ICON_ERROR;
177 row.
tooltip =
TIP_(
"Node group's first output must be a color output");
182 if (group_outputs.
size() > 1) {
185 row.
icon = ICON_WARNING_LARGE;
186 row.
tooltip =
TIP_(
"Only the first output is considered while the rest are ignored");
SpaceNode * CTX_wm_space_node(const bContext *C)
void GPU_shader_bind(blender::gpu::Shader *shader, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_shader_uniform_2iv(blender::gpu::Shader *sh, const char *name, const int data[2])
void GPU_texture_clear(blender::gpu::Texture *texture, eGPUDataFormat data_format, const void *data)
void append(const T &value)
constexpr int64_t size() const
constexpr bool is_empty() const
const DNode & node() const
NodeOperation(Context &context, DNode node)
Context & context() const
virtual Domain compute_domain()
void unbind_as_texture() const
void bind_as_texture(gpu::Shader *shader, const char *texture_name) const
T load_pixel(const int2 &texel) const
bool is_single_value() const
const T & get_single_value() const
GroupOutputOperation(Context &context, DNode node)
void execute_copy_cpu(const Result &image)
void execute_copy(const Result &image)
void execute_copy_gpu(const Result &image)
void execute_clear(const Result &image)
Domain compute_domain() override
void compute_dispatch_threads_at_least(gpu::Shader *shader, int2 threads_range, int2 local_size=int2(16))
void parallel_for(const int2 range, const Function &function)
compositor::NodeOperation * get_group_output_compositor_operation(compositor::Context &context, DNode node)
void get_compositor_group_output_extra_info(blender::nodes::NodeExtraInfoParams ¶meters)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
struct bNodeTree * edittree
struct bNodeTree * nodetree
static pxr::UsdShadeInput get_input(const pxr::UsdShadeShader &usd_shader, const pxr::TfToken &input_name)