Blender V4.3
BufferParams Class Reference

#include <buffers.h>

Inherits Node.

Public Member Functions

 BufferParams ()
 
 BufferParams (BufferParams &&other) noexcept=default
 
 BufferParams (const BufferParams &other)=default
 
BufferParamsoperator= (BufferParams &&other)=default
 
BufferParamsoperator= (const BufferParams &other)=default
 
 ~BufferParams ()=default
 
void update_passes ()
 
void update_passes (const vector< Pass * > &scene_passes)
 
int get_pass_offset (PassType type, PassMode mode=PassMode::NOISY) const
 
const BufferPassfind_pass (string_view name) const
 
const BufferPassfind_pass (PassType type, PassMode mode=PassMode::NOISY) const
 
const BufferPassget_actual_display_pass (PassType type, PassMode mode=PassMode::NOISY) const
 
const BufferPassget_actual_display_pass (const BufferPass *pass) const
 
void update_offset_stride ()
 
bool modified (const BufferParams &other) const
 
- Public Member Functions inherited from Node
 Node (const NodeType *type, ustring name=ustring())
 
virtual ~Node ()=0
 
void set (const SocketType &input, bool value)
 
void set (const SocketType &input, int value)
 
void set (const SocketType &input, uint value)
 
void set (const SocketType &input, uint64_t value)
 
void set (const SocketType &input, float value)
 
void set (const SocketType &input, float2 value)
 
void set (const SocketType &input, float3 value)
 
void set (const SocketType &input, const char *value)
 
void set (const SocketType &input, ustring value)
 
void set (const SocketType &input, const Transform &value)
 
void set (const SocketType &input, Node *value)
 
template<class ValueType , std::enable_if_t< std::is_enum_v< ValueType >, bool > = true>
void set (const SocketType &input, const ValueType &value)
 
void set (const SocketType &input, array< bool > &value)
 
void set (const SocketType &input, array< int > &value)
 
void set (const SocketType &input, array< float > &value)
 
void set (const SocketType &input, array< float2 > &value)
 
void set (const SocketType &input, array< float3 > &value)
 
void set (const SocketType &input, array< ustring > &value)
 
void set (const SocketType &input, array< Transform > &value)
 
void set (const SocketType &input, array< Node * > &value)
 
bool get_bool (const SocketType &input) const
 
int get_int (const SocketType &input) const
 
uint get_uint (const SocketType &input) const
 
uint64_t get_uint64 (const SocketType &input) const
 
float get_float (const SocketType &input) const
 
float2 get_float2 (const SocketType &input) const
 
float3 get_float3 (const SocketType &input) const
 
ustring get_string (const SocketType &input) const
 
Transform get_transform (const SocketType &input) const
 
Nodeget_node (const SocketType &input) const
 
const array< bool > & get_bool_array (const SocketType &input) const
 
const array< int > & get_int_array (const SocketType &input) const
 
const array< float > & get_float_array (const SocketType &input) const
 
const array< float2 > & get_float2_array (const SocketType &input) const
 
const array< float3 > & get_float3_array (const SocketType &input) const
 
const array< ustring > & get_string_array (const SocketType &input) const
 
const array< Transform > & get_transform_array (const SocketType &input) const
 
const array< Node * > & get_node_array (const SocketType &input) const
 
bool has_default_value (const SocketType &input) const
 
void set_default_value (const SocketType &input)
 
bool equals_value (const Node &other, const SocketType &input) const
 
void copy_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
void set_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
bool equals (const Node &other) const
 
void hash (MD5Hash &md5)
 
size_t get_total_size_in_bytes () const
 
bool is_a (const NodeType *type)
 
bool socket_is_modified (const SocketType &input) const
 
bool is_modified () const
 
void tag_modified ()
 
void clear_modified ()
 
void print_modified_sockets () const
 
const NodeOwnerget_owner () const
 
void set_owner (const NodeOwner *owner_)
 
int reference_count () const
 
void reference ()
 
void dereference ()
 
void clear_reference_count ()
 

Public Attributes

NODE_DECLARE int width = 0
 
int height = 0
 
int window_x = 0
 
int window_y = 0
 
int window_width = 0
 
int window_height = 0
 
int full_x = 0
 
int full_y = 0
 
int full_width = 0
 
int full_height = 0
 
int offset = -1
 
int stride = -1
 
int pass_stride = -1
 
vector< BufferPasspasses
 
ustring layer
 
ustring view
 
int samples = 0
 
float exposure = 1.0f
 
bool use_approximate_shadow_catcher = false
 
bool use_transparent_background = false
 
- Public Attributes inherited from Node
ustring name
 
const NodeTypetype
 
InternalNode internal
 
LeafNode leaf
 

Protected Member Functions

void reset_pass_offset ()
 
- Protected Member Functions inherited from Node
template<typename T >
void set_if_different (const SocketType &input, T value)
 
void set_if_different (const SocketType &input, Node *value)
 
template<typename T >
void set_if_different (const SocketType &input, array< T > &value)
 
void set_if_different (const SocketType &input, array< Node * > &value)
 
void dereference_all_used_nodes ()
 

Protected Attributes

int pass_offset_ [kNumPassOffsets]
 
- Protected Attributes inherited from Node
const NodeOwnerowner
 
int ref_count {0}
 
SocketModifiedFlags socket_modified
 

Static Protected Attributes

static constexpr int kNumPassOffsets = PASS_NUM * 2
 

Additional Inherited Members

- Static Protected Member Functions inherited from Node
template<typename T >
static Tget_socket_value (const Node *node, const SocketType &socket)
 

Detailed Description

Definition at line 67 of file buffers.h.

Constructor & Destructor Documentation

◆ BufferParams() [1/3]

BufferParams::BufferParams ( )

Definition at line 115 of file buffers.cpp.

References reset_pass_offset().

◆ BufferParams() [2/3]

BufferParams::BufferParams ( BufferParams && other)
defaultnoexcept

◆ BufferParams() [3/3]

BufferParams::BufferParams ( const BufferParams & other)
default

◆ ~BufferParams()

BufferParams::~BufferParams ( )
default

Member Function Documentation

◆ find_pass() [1/2]

const BufferPass * BufferParams::find_pass ( PassType type,
PassMode mode = PassMode::NOISY ) const

Definition at line 188 of file buffers.cpp.

References passes.

◆ find_pass() [2/2]

const BufferPass * BufferParams::find_pass ( string_view name) const

◆ get_actual_display_pass() [1/2]

const BufferPass * BufferParams::get_actual_display_pass ( const BufferPass * pass) const

Definition at line 205 of file buffers.cpp.

References find_pass(), PASS_COMBINED, and PASS_SHADOW_CATCHER_MATTE.

◆ get_actual_display_pass() [2/2]

const BufferPass * BufferParams::get_actual_display_pass ( PassType type,
PassMode mode = PassMode::NOISY ) const

Definition at line 199 of file buffers.cpp.

References find_pass(), and get_actual_display_pass().

Referenced by get_actual_display_pass(), and PathTraceTile::get_pass_pixels().

◆ get_pass_offset()

◆ modified()

bool BufferParams::modified ( const BufferParams & other) const

◆ operator=() [1/2]

BufferParams & BufferParams::operator= ( BufferParams && other)
default

◆ operator=() [2/2]

BufferParams & BufferParams::operator= ( const BufferParams & other)
default

◆ reset_pass_offset()

void BufferParams::reset_pass_offset ( )
protected

Definition at line 160 of file buffers.cpp.

References kNumPassOffsets, pass_offset_, and PASS_UNUSED.

Referenced by BufferParams(), and update_passes().

◆ update_offset_stride()

void BufferParams::update_offset_stride ( )

◆ update_passes() [1/2]

◆ update_passes() [2/2]

void BufferParams::update_passes ( const vector< Pass * > & scene_passes)

Definition at line 138 of file buffers.cpp.

References BufferPass::offset, pass_stride, PASS_UNUSED, and update_passes().

Member Data Documentation

◆ exposure

float BufferParams::exposure = 1.0f

◆ full_height

◆ full_width

◆ full_x

◆ full_y

◆ height

int BufferParams::height = 0

◆ kNumPassOffsets

int BufferParams::kNumPassOffsets = PASS_NUM * 2
staticconstexprprotected

Definition at line 144 of file buffers.h.

Referenced by reset_pass_offset().

◆ layer

ustring BufferParams::layer

Definition at line 98 of file buffers.h.

Referenced by BlenderSession::bake(), and BlenderSession::render().

◆ offset

◆ pass_offset_

int BufferParams::pass_offset_[kNumPassOffsets]
protected

Definition at line 149 of file buffers.h.

Referenced by get_pass_offset(), reset_pass_offset(), and update_passes().

◆ pass_stride

◆ passes

◆ samples

int BufferParams::samples = 0

Definition at line 100 of file buffers.h.

Referenced by Session::do_delayed_reset().

◆ stride

◆ use_approximate_shadow_catcher

bool BufferParams::use_approximate_shadow_catcher = false

Definition at line 102 of file buffers.h.

Referenced by Session::do_delayed_reset(), PathTraceTile::get_pass_pixels(), and modified().

◆ use_transparent_background

bool BufferParams::use_transparent_background = false

Definition at line 103 of file buffers.h.

Referenced by Session::do_delayed_reset(), PathTraceTile::get_pass_pixels(), and modified().

◆ view

ustring BufferParams::view

Definition at line 99 of file buffers.h.

Referenced by BlenderSession::render().

◆ width

NODE_DECLARE int BufferParams::width = 0

Definition at line 72 of file buffers.h.

Referenced by PathTraceWorkCPU::adaptive_sampling_converge_filter_count_active(), PathTraceWorkGPU::adaptive_sampling_convergence_check_count_active(), BlenderSession::bake(), configure_image_spec_from_buffer(), PathTraceWork::copy_from_denoised_render_buffers(), RenderBuffers::copy_from_device(), PathTraceWork::copy_from_render_buffers(), PathTraceWork::copy_to_render_buffers(), PathTraceWorkCPU::cryptomatte_postproces(), PathTraceWorkGPU::cryptomatte_postproces(), DenoiserGPU::denoise_color_read(), DenoiserGPU::denoise_filter_color_postprocess(), DenoiserGPU::denoise_filter_color_preprocess(), DenoiserGPU::denoise_filter_guiding_preprocess(), DenoiserGPU::denoise_filter_guiding_set_fake_albedo(), DenoiserGPU::DenoiseContext::DenoiseContext(), Session::do_delayed_reset(), PathTraceWorkGPU::enqueue_adaptive_sampling_filter_x(), PathTraceWorkGPU::enqueue_adaptive_sampling_filter_y(), RenderScheduler::full_report(), Session::get_effective_tile_size(), PathTraceWork::get_render_tile_pixels(), TileManager::get_size(), TileManager::get_tile_for_index(), PathTraceWork::has_multiple_works(), DenoiseTask::load(), modified(), pad_pixels(), render_buffers_host_copy_denoised(), PathTraceWorkCPU::render_samples(), RenderBuffers::reset(), WorkTileScheduler::reset(), PassAccessorCPU::run_get_pass_kernel_processor_half_rgba(), Session::run_update_for_next_iteration(), scale_buffer_params(), session_buffer_params(), PassAccessor::set_render_tile_pixels(), PathTraceWork::set_render_tile_pixels(), PathTrace::update_display(), update_offset_stride(), RenderScheduler::update_start_resolution_divider(), and TileManager::write_tile().

◆ window_height

◆ window_width

◆ window_x

◆ window_y


The documentation for this class was generated from the following files: