34 .structure_type(StructureType::Dynamic);
38 "Convert from display to scene linear instead. Not all view transforms can be inverted "
39 "exactly, and the result may not match the original scene linear image");
86 layout.
prop(&display_ptr,
"display_device",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
87 layout.
prop(&view_ptr,
"view_transform",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
110 if (this->
context().use_gpu()) {
162 output_image.store_pixel(texel, input_image.load_pixel<Color>(texel));
199 ntype.
ui_name =
"Convert to Display";
201 "Convert from scene linear to display color space, with a view transform and look for tone "
#define NODE_CLASS_CONVERTER
#define NODE_STORAGE_FUNCS(StorageT)
#define CMP_NODE_CONVERT_TO_DISPLAY
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static ColormanageProcessor display_processor_new(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, ColorManagedDisplaySpace display_space=DISPLAY_SPACE_DRAW, bool inverse=false, const char *from_colorspace=nullptr)
void apply(float *buffer, int width, int height, int channels, bool predivide) const
void apply_pixel(float *pixel, int channels) const
StaticCacheManager & cache_manager()
NodeOperation(Context &context, const bNode &node)
const bNode & node() const
OCIOToDisplayShader & get(Context &context, const ColorManagedDisplaySettings &display_settings, const ColorManagedViewSettings &view_settings, const bool inverse)
const char * input_sampler_name()
const char * output_image_name()
void unbind_shader_and_resources()
gpu::Shader * bind_shader_and_resources()
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
void allocate_texture(const Domain domain, const bool from_pool=true, const std::optional< ResultStorageType > storage_type=std::nullopt)
void unbind_as_texture() const
int64_t channels_count() const
void set_single_value(const T &value)
GMutableSpan cpu_data_for_write()
void bind_as_texture(gpu::Shader *shader, const char *texture_name) const
T get_single_value_default() const
void unbind_as_image() const
void allocate_single_value()
void bind_as_image(gpu::Shader *shader, const char *image_name, bool read=false) const
const T & get_single_value() const
OCIOToDisplayShaderContainer ocio_to_display_shaders
StructureType structure_type
ColorGeometry4f default_value
NodeOperation(Context &context, const bNode &node)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
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_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void node_copy(bNodeTree *, bNode *dest_node, const bNode *src_node)
static void node_blend_read(bNodeTree &, bNode &node, BlendDataReader &reader)
static void node_free(bNode *node)
static void node_blend_write(const bNodeTree &, const bNode &node, BlendWriter &writer)
static NodeOperation * get_compositor_operation(Context &context, const bNode &node)
static void node_draw_buttons(ui::Layout &layout, bContext *, PointerRNA *ptr)
@ COLORMANAGE_VIEW_ONLY_VIEW_LOOK
void BKE_color_managed_view_settings_init(ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const char *view_transform)
void BKE_color_managed_display_settings_init(ColorManagedDisplaySettings *settings)
void BKE_color_managed_view_settings_blend_read_data(BlendDataReader *reader, ColorManagedViewSettings *settings)
void BKE_color_managed_view_settings_copy(ColorManagedViewSettings *new_settings, const ColorManagedViewSettings *settings)
void BKE_color_managed_display_settings_copy(ColorManagedDisplaySettings *new_settings, const ColorManagedDisplaySettings *settings)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
void BKE_color_managed_view_settings_free(ColorManagedViewSettings *settings)
void BKE_color_managed_view_settings_blend_write(BlendWriter *writer, const ColorManagedViewSettings *settings)
@ DISPLAY_SPACE_VIDEO_OUTPUT
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
eColorManageView_Flag flag
ColorManagedDisplaySettings display_settings
ColorManagedViewSettings view_settings
static constexpr int _160
static constexpr int _240
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
NodeBlendWriteFunction blend_write_storage_content
std::string ui_description
NodeBlendDataReadFunction blend_data_read_storage_content
NodeGetCompositorOperationFunction get_compositor_operation
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)