Blender V5.3
blender::eevee::ShadowModule Class Reference

#include <eevee_shadow.hh>

Public Member Functions

 ~ShadowModule ()
void set_lights_data ()
template<typename PassType>
void bind_resources (PassType &pass)
const ShadowSceneData & get_data ()
float global_lod_bias () const
void reset ()

Public Attributes

ShadowTileMapPool tilemap_pool
Pool< ShadowPunctual > punctual_pool
Pool< ShadowDirectional > directional_pool

Shadow Module

 ShadowModule (Instance &inst, ShadowSceneData &data)
void init ()
void begin_sync ()
void sync_object (const ObjectHandle &ob_handle, bool is_alpha_blend_or_has_offset_shadow, bool has_transparent_shadows, bool has_time_dependent_shadows, bool has_offset_shadows)
void end_sync ()
void set_view (View &view, int2 extent)
void render (View &view, int2 extent)
void debug_end_sync ()
void debug_draw (View &view, gpu::FrameBuffer *view_fb)

Detailed Description

Definition at line 182 of file eevee_shadow.hh.

Constructor & Destructor Documentation

◆ ShadowModule()

blender::eevee::ShadowModule::ShadowModule ( Instance & inst,
ShadowSceneData & data )

Definition at line 563 of file eevee_shadow.cc.

References blender::data, and UNUSED_VARS.

◆ ~ShadowModule()

blender::eevee::ShadowModule::~ShadowModule ( )
inline

Definition at line 342 of file eevee_shadow.hh.

References GPU_BATCH_DISCARD_SAFE.

Member Function Documentation

◆ begin_sync()

◆ bind_resources()

template<typename PassType>
void blender::eevee::ShadowModule::bind_resources ( PassType & pass)
inline

◆ debug_draw()

◆ debug_end_sync()

◆ end_sync()

void blender::eevee::ShadowModule::end_sync ( )

Clear pages that need to be rendered.

Definition at line 793 of file eevee_shadow.cc.

References blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_image(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_resources(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::Manager::bounds_buf, blender::draw::StorageVectorBuffer< T, len >::clear(), blender::draw::detail::StorageCommon< T, len, device_only >::clear_to_zero(), debug_end_sync(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::math::divide_ceil(), blender::divide_ceil_u(), blender::draw::detail::PassBase< DrawCommandBufType >::draw(), blender::DRW_STATE_CULL_FRONT, blender::DRW_STATE_DEPTH_ALWAYS, blender::DRW_STATE_WRITE_COLOR, blender::DRW_STATE_WRITE_DEPTH, blender::eevee::ShadowTileMapPool::end_sync(), blender::draw::detail::PassBase< DrawCommandBufType >::framebuffer_set(), blender::GPU_BARRIER_SHADER_IMAGE_ACCESS, blender::GPU_BARRIER_SHADER_STORAGE, blender::GPU_BARRIER_TEXTURE_FETCH, blender::GPU_BARRIER_UNIFORM, blender::GPU_multi_viewport_support(), blender::GPU_storagebuf_clear(), blender::IndexRange::IndexRange(), blender::draw::detail::Pass< DrawCommandBufType >::init(), LIGHT_NO_SHADOW, blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::ResourceHandle::raw(), blender::eevee::ShadowObject::resource_handle, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), blender::eevee::SHADOW_CLIPMAP_CLEAR, blender::eevee::SHADOW_PAGE_ALLOCATE, blender::eevee::SHADOW_PAGE_CLEAR, blender::eevee::SHADOW_PAGE_DEFRAG, blender::eevee::SHADOW_PAGE_FREE, blender::eevee::SHADOW_PAGE_MASK, blender::eevee::SHADOW_TILEMAP_AMEND, blender::eevee::SHADOW_TILEMAP_BOUNDS, blender::eevee::SHADOW_TILEMAP_FINALIZE, blender::eevee::SHADOW_TILEMAP_INIT, blender::eevee::SHADOW_TILEMAP_RENDERMAP, blender::eevee::SHADOW_TILEMAP_TAG_UPDATE, blender::eevee::SHADOW_TILEMAP_TAG_UPDATE_PROPAGATE, blender::eevee::SHADOW_TILEMAP_TAG_USAGE_VOLUME, blender::draw::StorageArrayBuffer< T, len, device_only >::size(), blender::draw::StorageVectorBuffer< T, len >::size(), blender::draw::detail::PassBase< DrawCommandBufType >::state_set(), blender::draw::detail::PassBase< DrawCommandBufType >::sub(), tilemap_pool, blender::eevee::ShadowTileMapPool::tilemap_tx, blender::eevee::ShadowTileMapPool::tilemaps_clip, blender::eevee::ShadowTileMapPool::tilemaps_data, blender::eevee::ShadowTileMapPool::tilemaps_unused, blender::eevee::ShadowTileMapPool::tiles_data, blender::eevee::ShadowObject::used, and VOLUME_GROUP_SIZE.

Referenced by blender::eevee::Instance::end_sync().

◆ get_data()

const ShadowSceneData & blender::eevee::ShadowModule::get_data ( )
inline

Definition at line 377 of file eevee_shadow.hh.

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

◆ global_lod_bias()

float blender::eevee::ShadowModule::global_lod_bias ( ) const
inline

Definition at line 382 of file eevee_shadow.hh.

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

◆ init()

◆ render()

◆ reset()

void blender::eevee::ShadowModule::reset ( )
inline

Definition at line 388 of file eevee_shadow.hh.

◆ set_lights_data()

void blender::eevee::ShadowModule::set_lights_data ( )

◆ set_view()

void blender::eevee::ShadowModule::set_view ( View & view,
int2 extent )

Definition at line 1294 of file eevee_shadow.cc.

References blender::draw::View::screen_pixel_radius().

Referenced by set_lights_data().

◆ sync_object()

Member Data Documentation

◆ directional_pool

Pool<ShadowDirectional> blender::eevee::ShadowModule::directional_pool

◆ punctual_pool

Pool<ShadowPunctual> blender::eevee::ShadowModule::punctual_pool

◆ tilemap_pool

ShadowTileMapPool blender::eevee::ShadowModule::tilemap_pool

Need to be first because of destructor order.

Definition at line 190 of file eevee_shadow.hh.

Referenced by begin_sync(), bind_resources(), debug_end_sync(), and end_sync().


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