Blender V5.0
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 ShadowSceneDataget_data ()
float global_lod_bias () const
void reset ()

Public Attributes

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

Static Public Attributes

static ShadowTechnique shadow_technique = ShadowTechnique::ATOMIC_RASTER

Shadow Module

 ShadowModule (Instance &inst, ShadowSceneData &data)
void init ()
void begin_sync ()
void sync_object (const Object *ob, const ObjectHandle &handle, const ResourceHandleRange &resource_handle, bool is_alpha_blend, bool has_transparent_shadows)
void end_sync ()
void set_view (View &view, int2 extent)
void debug_end_sync ()
void debug_draw (View &view, gpu::FrameBuffer *view_fb)
static float screen_pixel_radius (const float4x4 &wininv, bool is_perspective, const int2 &extent)

Detailed Description

Definition at line 196 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 data, i, and UNUSED_VARS.

◆ ~ShadowModule()

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

Definition at line 355 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

Definition at line 383 of file eevee_shadow.hh.

References SHADOW_ATLAS_TEX_SLOT, SHADOW_TILEMAPS_TEX_SLOT, and tilemap_pool.

◆ debug_draw()

◆ debug_end_sync()

◆ end_sync()

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

Clear pages that need to be rendered.

Definition at line 794 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, debug_end_sync(), blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::math::divide_ceil(), divide_ceil_u(), DRW_STATE_DEPTH_ALWAYS, DRW_STATE_WRITE_DEPTH, blender::draw::detail::PassBase< DrawCommandBufType >::framebuffer_set(), GPU_BARRIER_SHADER_IMAGE_ACCESS, GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_TEXTURE_FETCH, GPU_BARRIER_UNIFORM, GPU_storagebuf_clear(), i, blender::draw::detail::Pass< DrawCommandBufType >::init(), LIGHT_NO_SHADOW, blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::ResourceHandleRange::raw(), blender::eevee::ShadowObject::resource_handle, blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), SHADOW_BOUNDS_GROUP_SIZE, blender::eevee::SHADOW_CLIPMAP_CLEAR, SHADOW_CLIPMAP_GROUP_SIZE, SHADOW_MAX_PAGE, 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_page_pack(), SHADOW_PAGE_PER_COL, SHADOW_PAGE_PER_LAYER, SHADOW_PAGE_PER_ROW, shadow_technique, 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_USAGE_VOLUME, SHADOW_VIEW_MAX, blender::draw::detail::PassBase< DrawCommandBufType >::state_set(), blender::draw::detail::PassBase< DrawCommandBufType >::sub(), blender::eevee::TILE_COPY, tilemap_pool, blender::eevee::ShadowObject::used, and VOLUME_GROUP_SIZE.

◆ get_data()

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

Definition at line 389 of file eevee_shadow.hh.

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

◆ global_lod_bias()

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

Definition at line 394 of file eevee_shadow.hh.

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

◆ init()

◆ reset()

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

Definition at line 400 of file eevee_shadow.hh.

◆ screen_pixel_radius()

float blender::eevee::ShadowModule::screen_pixel_radius ( const float4x4 & wininv,
bool is_perspective,
const int2 & extent )
static

Compute approximate screen pixel space radius (as world space radius).

Definition at line 1152 of file eevee_shadow.cc.

References blender::math::distance(), float, min_ii(), and blender::math::project_point().

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

◆ set_lights_data()

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

References view.

◆ set_view()

◆ sync_object()

void blender::eevee::ShadowModule::sync_object ( const Object * ob,
const ObjectHandle & handle,
const ResourceHandleRange & resource_handle,
bool is_alpha_blend,
bool has_transparent_shadows )

Member Data Documentation

◆ directional_pool

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

◆ punctual_pool

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

◆ shadow_technique

◆ tilemap_pool

ShadowTileMapPool blender::eevee::ShadowModule::tilemap_pool

Need to be first because of destructor order.

Definition at line 207 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: