18 b.use_custom_socket_order();
19 b.allow_any_socket_order();
21 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
25 .structure_type(StructureType::Dynamic)
26 .align_with_previous();
28 b.add_input<
decl::Bool>(
"Flip X"_ustr).default_value(
false);
29 b.add_input<
decl::Bool>(
"Flip Y"_ustr).default_value(
false);
41 if (input.
is_single_value() || (!this->get_flip_x() && !this->get_flip_y())) {
47 if (this->
context().use_gpu()) {
68 result.allocate_texture(domain);
87 output.allocate_texture(domain);
91 int2 flipped_texel = texel;
93 flipped_texel.x = size.x - texel.x - 1;
96 flipped_texel.y = size.y - texel.y - 1;
104 return this->
get_input(
"Flip X").get_single_value_default<
bool>();
109 return this->
get_input(
"Flip Y").get_single_value_default<
bool>();
#define NODE_CLASS_DISTORT
#define NOD_REGISTER_NODE(REGISTER_FUNC)
gpu::Shader * get_shader(const char *info_name, ResultPrecision precision)
NodeOperation(Context &context, const bNode &node)
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
virtual Domain compute_domain()
bool is_single_value() const
void unbind_as_texture() const
void bind_as_texture(gpu::Shader *shader, const char *texture_name) const
T load_pixel(const int2 &texel) const
StructureType structure_type
NodeOperation(Context &context, const bNode &node)
void node_register_type(bNodeType &ntype)
void compute_dispatch_threads_at_least(gpu::Shader *shader, int2 threads_range, int2 local_size=int2(16))
ColorSceneLinear4f< eAlpha::Premultiplied > Color
void parallel_for(const int2 range, const Function &function)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static NodeOperation * get_compositor_operation(Context &context, const bNode &node)
void GPU_shader_uniform_1b(gpu::Shader *sh, const char *name, bool value)
void GPU_shader_bind(gpu::Shader *shader, const gpu::shader::SpecializationConstants *constants_state=nullptr)
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGetCompositorOperationFunction get_compositor_operation
const char * enum_name_legacy
NodeDeclareFunction declare