Blender V4.3
blender::eevee::Film Class Reference

#include <eevee_film.hh>

Public Member Functions

 Film (Instance &inst, FilmData &data)
 
 ~Film ()
 
const FilmDataget_data ()
 
int2 render_extent_get () const
 
int2 film_extent_get () const
 
int2 film_offset_get () const
 
int2 display_extent_get () const
 
int render_overscan_get () const
 
int scaling_factor_get () const
 
float background_opacity_get () const
 
int pass_id_get (eViewLayerEEVEEPassType pass_type) const
 

Static Public Member Functions

static int overscan_pixels_get (float overscan, int2 extent)
 
static ePassStorageType pass_storage_type (eViewLayerEEVEEPassType pass_type)
 
static bool pass_is_float3 (eViewLayerEEVEEPassType pass_type)
 
static const Vector< std::string > pass_to_render_pass_names (eViewLayerEEVEEPassType pass_type, const ViewLayer *view_layer)
 

Public Attributes

AOVsInfoDataBuf aovs_info
 

Static Public Attributes

static constexpr bool use_box_filter = false
 

Film

void init (const int2 &full_extent, const rcti *output_rect)
 
void sync ()
 
void end_sync ()
 
void accumulate (View &view, GPUTexture *combined_final_tx)
 
void cryptomatte_sort ()
 
void display ()
 
floatread_pass (eViewLayerEEVEEPassType pass_type, int layer_offset)
 
GPUTexture * get_pass_texture (eViewLayerEEVEEPassType pass_type, int layer_offset)
 
void write_viewport_compositor_passes ()
 
bool is_viewport_compositor_enabled () const
 
float2 pixel_jitter_get () const
 
eViewLayerEEVEEPassType enabled_passes_get () const
 
int cryptomatte_layer_max_get () const
 
int cryptomatte_layer_len_get () const
 

Arbitrary Output Variables

floatread_aov (ViewLayerAOV *aov)
 
GPUTexture * get_aov_texture (ViewLayerAOV *aov)
 

Detailed Description

Definition at line 50 of file eevee_film.hh.

Constructor & Destructor Documentation

◆ Film()

blender::eevee::Film::Film ( Instance & inst,
FilmData & data )
inline

Definition at line 96 of file eevee_film.hh.

◆ ~Film()

blender::eevee::Film::~Film ( )
inline

Definition at line 97 of file eevee_film.hh.

Member Function Documentation

◆ accumulate()

◆ background_opacity_get()

float blender::eevee::Film::background_opacity_get ( ) const
inline

Definition at line 169 of file eevee_film.hh.

Referenced by blender::eevee::World::sync().

◆ cryptomatte_layer_len_get()

◆ cryptomatte_layer_max_get()

◆ cryptomatte_sort()

void Film::cryptomatte_sort ( )

Sort and normalize cryptomatte samples.

Definition at line 825 of file eevee_film.cc.

References DRW_manager_get(), and blender::draw::Manager::submit().

Referenced by write_viewport_compositor_passes().

◆ display()

◆ display_extent_get()

int2 blender::eevee::Film::display_extent_get ( ) const
inline

Size of the whole viewport or the render, disregarding the render region.

Definition at line 145 of file eevee_film.hh.

Referenced by blender::eevee::Camera::sync(), and blender::eevee::LookdevModule::sync().

◆ enabled_passes_get()

◆ end_sync()

◆ film_extent_get()

int2 blender::eevee::Film::film_extent_get ( ) const
inline

Size and offset of the film (taking into account render region).

Definition at line 135 of file eevee_film.hh.

Referenced by blender::eevee::Camera::sync().

◆ film_offset_get()

int2 blender::eevee::Film::film_offset_get ( ) const
inline

Definition at line 139 of file eevee_film.hh.

Referenced by blender::eevee::Camera::sync().

◆ get_aov_texture()

◆ get_data()

const FilmData & blender::eevee::Film::get_data ( )
inline

Definition at line 104 of file eevee_film.hh.

◆ get_pass_texture()

◆ init()

void Film::init ( const int2 & full_extent,
const rcti * output_rect )

Definition at line 264 of file eevee_film.cc.

References blender::eevee::FilmData::ambient_occlusion_id, blender::eevee::FilmData::aov_color_id, blender::eevee::FilmData::aov_color_len, blender::eevee::FilmData::aov_value_id, blender::eevee::FilmData::aov_value_len, aovs_info, blender::eevee::FilmData::background_opacity, BKE_render_preview_pixel_size(), BLI_rcti_init(), BLI_rcti_is_empty(), BLI_rcti_size_x(), BLI_rcti_size_y(), blender::eevee::Instance::camera, clamp_f(), blender::draw::Texture::clear(), blender::eevee::AOVsInfoData::color_len, blender::eevee::FilmData::color_len, blender::eevee::FilmData::combined_id, blender::eevee::FilmData::cryptomatte_asset_id, cryptomatte_layer_len_get(), ViewLayer::cryptomatte_levels, blender::eevee::FilmData::cryptomatte_material_id, blender::eevee::FilmData::cryptomatte_object_id, blender::eevee::FilmData::cryptomatte_samples_len, blender::eevee::FilmData::depth_id, blender::eevee::FilmData::diffuse_color_id, blender::eevee::FilmData::diffuse_light_id, blender::eevee::AOVsInfoData::display_id, blender::eevee::FilmData::display_id, blender::eevee::AOVsInfoData::display_is_value, blender::eevee::FilmData::display_storage_type, blender::math::divide_ceil(), divide_ceil_u(), EEVEE_RENDER_PASS_AO, EEVEE_RENDER_PASS_COMBINED, EEVEE_RENDER_PASS_CRYPTOMATTE_ASSET, EEVEE_RENDER_PASS_CRYPTOMATTE_MATERIAL, EEVEE_RENDER_PASS_CRYPTOMATTE_OBJECT, EEVEE_RENDER_PASS_DIFFUSE_COLOR, EEVEE_RENDER_PASS_DIFFUSE_LIGHT, EEVEE_RENDER_PASS_EMIT, EEVEE_RENDER_PASS_ENVIRONMENT, EEVEE_RENDER_PASS_MIST, EEVEE_RENDER_PASS_NORMAL, EEVEE_RENDER_PASS_POSITION, EEVEE_RENDER_PASS_SHADOW, EEVEE_RENDER_PASS_SPECULAR_COLOR, EEVEE_RENDER_PASS_SPECULAR_LIGHT, EEVEE_RENDER_PASS_TRANSPARENT, EEVEE_RENDER_PASS_UNUSED_14, EEVEE_RENDER_PASS_UNUSED_8, EEVEE_RENDER_PASS_VECTOR, EEVEE_RENDER_PASS_VOLUME_LIGHT, EEVEE_RENDER_PASS_Z, blender::eevee::FilmData::emission_id, blender::eevee::enabled_passes(), blender::draw::Texture::ensure_2d(), blender::draw::Texture::ensure_2d_array(), blender::eevee::FilmData::environment_id, blender::eevee::FilmData::exposure_scale, blender::eevee::FilmData::extent, blender::eevee::FilmData::extent_inv, blender::eevee::FilmData::filter_radius, blender::bke::compositor::get_used_passes(), blender::eevee::get_viewport_compositor_enabled_passes(), blender::eevee::Instance::gpencil_engine_enabled(), GPU_R16F, GPU_R32F, GPU_RGBA16F, GPU_RGBA32F, blender::eevee::Camera::is_panoramic(), blender::eevee::Instance::is_viewport(), is_viewport_compositor_enabled(), blender::eevee::FilmData::mist_id, blender::eevee::FilmData::normal_id, blender::eevee::FilmData::offset, blender::eevee::Instance::overlays_enabled(), blender::eevee::Camera::overscan(), blender::eevee::FilmData::overscan, overscan_pixels_get(), blender::eevee::PASS_CATEGORY_COLOR_1, blender::eevee::PASS_CATEGORY_COLOR_2, blender::eevee::PASS_CATEGORY_COLOR_3, blender::eevee::PASS_CATEGORY_CRYPTOMATTE, blender::eevee::PASS_CATEGORY_DATA, blender::eevee::PASS_STORAGE_COLOR, blender::eevee::PASS_STORAGE_CRYPTOMATTE, pass_storage_type(), blender::eevee::PASS_STORAGE_VALUE, blender::eevee::FilmData::position_id, pow2f(), Scene::r, R_ALPHAPREMUL, R_MBLUR, blender::eevee::FilmData::render_extent, View3DShading::render_pass, reset(), blender::eevee::Instance::sampling, blender::eevee::FilmData::scaling_factor, blender::eevee::Instance::scene, View3D::shading, blender::eevee::FilmData::shadow_id, blender::eevee::FilmData::specular_color_id, blender::eevee::FilmData::specular_light_id, View3DShading::studiolight_background, blender::eevee::FilmData::texture_lod_bias, blender::eevee::FilmData::transparent_id, blender::eevee::FilmData::use_history, blender::eevee::Instance::v3d, blender::eevee::AOVsInfoData::value_len, blender::eevee::FilmData::value_len, blender::eevee::FilmData::vector_id, blender::eevee::Instance::view_layer, blender::eevee::FilmData::volume_light_id, rcti::xmin, and rcti::ymin.

◆ is_viewport_compositor_enabled()

bool Film::is_viewport_compositor_enabled ( ) const

Definition at line 870 of file eevee_film.cc.

References DRW_is_viewport_compositor_enabled(), and blender::eevee::Instance::is_viewport().

Referenced by init(), and sync().

◆ overscan_pixels_get()

static int blender::eevee::Film::overscan_pixels_get ( float overscan,
int2 extent )
inlinestatic

Returns number of overscan pixels for the given parameters.

Definition at line 157 of file eevee_film.hh.

References blender::math::ceil(), max_ff(), and blender::math::reduce_max().

Referenced by init(), and blender::eevee::Camera::sync().

◆ pass_id_get()

◆ pass_is_float3()

static bool blender::eevee::Film::pass_is_float3 ( eViewLayerEEVEEPassType pass_type)
inlinestatic

◆ pass_storage_type()

◆ pass_to_render_pass_names()

static const Vector< std::string > blender::eevee::Film::pass_to_render_pass_names ( eViewLayerEEVEEPassType pass_type,
const ViewLayer * view_layer )
inlinestatic

◆ pixel_jitter_get()

◆ read_aov()

◆ read_pass()

◆ render_extent_get()

◆ render_overscan_get()

int blender::eevee::Film::render_overscan_get ( ) const
inline

Number of padding pixels around the render target. Included inside render_extent_get.

Definition at line 151 of file eevee_film.hh.

◆ scaling_factor_get()

int blender::eevee::Film::scaling_factor_get ( ) const
inline

Definition at line 162 of file eevee_film.hh.

Referenced by blender::eevee::Sampling::step().

◆ sync()

◆ write_viewport_compositor_passes()

Member Data Documentation

◆ aovs_info

AOVsInfoDataBuf blender::eevee::Film::aovs_info

Stores indirection table of AOVs based on their name hash and their type.

Definition at line 53 of file eevee_film.hh.

Referenced by blender::eevee::DeferredLayer::end_sync(), end_sync(), get_aov_texture(), init(), blender::eevee::RenderBuffers::init(), and blender::eevee::WorldPipeline::sync().

◆ use_box_filter

bool blender::eevee::Film::use_box_filter = false
staticconstexpr

For debugging purpose but could be a user option in the future.

Definition at line 55 of file eevee_film.hh.

Referenced by pixel_jitter_get().


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