24 b.add_input<
decl::Color>(
"Image").default_value({1.0f, 1.0f, 1.0f, 1.0f});
46 if (this->
context().use_gpu()) {
63 input.bind_as_texture(shader,
"input_tx");
67 result.allocate_texture(domain);
68 result.bind_as_image(shader,
"output_img");
72 input.unbind_as_texture();
86 output.allocate_texture(domain);
90 int2 flipped_texel = texel;
92 flipped_texel.x = size.x - texel.x - 1;
95 flipped_texel.y =
size.y - texel.y - 1;
103 return this->
get_input(
"Flip X").get_single_value_default(
false);
108 return this->
get_input(
"Flip Y").get_single_value_default(
false);
130 ntype.
declare = file_ns::cmp_node_flip_declare;
#define NODE_CLASS_DISTORT
void GPU_shader_bind(GPUShader *shader, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_shader_uniform_1b(GPUShader *sh, const char *name, bool value)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
GPUShader * get_shader(const char *info_name, ResultPrecision precision)
NodeOperation(Context &context, DNode node)
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
virtual Domain compute_domain()
void share_data(const Result &source)
bool is_single_value() const
bool compositor_expects_single_value() const
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)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
static void cmp_node_flip_declare(NodeDeclarationBuilder &b)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
static void register_node_type_cmp_flip()
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
NodeDeclareFunction declare
static pxr::UsdShadeInput get_input(const pxr::UsdShadeShader &usd_shader, const pxr::TfToken &input_name)