29 {0,
nullptr, 0,
nullptr,
nullptr},
35 .default_value({0.8f, 0.8f, 0.8f, 1.0f})
36 .structure_type(StructureType::Dynamic);
42 b.add_output<
decl::Color>(
"Image"_ustr).structure_type(StructureType::Dynamic);
49 node->id = id_cast<ID *>(scene->clip);
55 template_id(&layout,
C, ptr,
"clip",
nullptr,
"CLIP_OT_open",
nullptr);
80 if (this->
context().use_gpu()) {
121 texel, input.sample_bilinear_zero<Color>(distortion_grid.load_pixel<float2>(texel)));
146 ntype.
ui_name =
"Movie Distortion";
148 "Remove lens distortion from footage, using motion tracking camera lens settings";
#define NODE_CLASS_DISTORT
#define CMP_NODE_MOVIEDISTORTION
#define NOD_REGISTER_NODE(REGISTER_FUNC)
StaticCacheManager & cache_manager()
gpu::Shader * get_shader(const char *info_name, ResultPrecision precision)
Result & get(Context &context, MovieClip *movie_clip, Domain domain, DistortionType type, int frame_number)
NodeOperation(Context &context, const bNode &node)
const bNode & node() const
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
void share_data(const Result &source)
bool is_single_value() const
void allocate_texture(const Domain domain, const bool from_pool=true, const std::optional< ResultStorageType > storage_type=std::nullopt)
void unbind_as_texture() const
void bind_as_texture(gpu::Shader *shader, const char *texture_name) const
void unbind_as_image() const
void bind_as_image(gpu::Shader *shader, const char *image_name, bool read=false) const
DistortionGridContainer distortion_grids
NodeOperation(Context &context, const bNode &node)
DistortionType get_distortion_type()
MovieClip * get_movie_clip()
void execute_cpu(const Result &distortion_grid)
void execute_gpu(const Result &distortion_grid)
void node_register_type(bNodeType &ntype)
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)
static const EnumPropertyItem type_items[]
static void node_register()
static void node_init_api(const bContext *C, PointerRNA *node_ptr)
static NodeOperation * get_compositor_operation(Context &context, const bNode &node)
static void node_draw_buttons(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void node_declare(NodeDeclarationBuilder &b)
@ GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER
void GPU_texture_filter_mode(gpu::Texture *texture, bool use_filter)
void GPU_shader_bind(gpu::Shader *shader, const gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_texture_extend_mode(gpu::Texture *texture, GPUSamplerExtendMode extend_mode)
Scene * CTX_data_scene(const bContext *C)
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
void(*) initfunc_api(const bContext *C, PointerRNA *ptr)
NodeGetCompositorOperationFunction get_compositor_operation
const char * enum_name_legacy
NodeDeclareFunction declare