Blender V4.3
blender::eevee::ShadowTileMapPool Struct Reference

#include <eevee_shadow.hh>

Public Member Functions

Tile map pool
 ShadowTileMapPool ()
 
ShadowTileMapacquire ()
 
void release (Span< ShadowTileMap * > free_list)
 
void end_sync (ShadowModule &module)
 

Public Attributes

Vector< uintfree_indices
 
Pool< ShadowTileMaptilemap_pool
 
ShadowTileMapDataBuf tilemaps_data = {"tilemaps_data"}
 
ShadowTileMapDataBuf tilemaps_unused = {"tilemaps_unused"}
 
ShadowTileDataBuf tiles_data = {"tiles_data"}
 
ShadowTileMapClipBuf tilemaps_clip = {"tilemaps_clip"}
 
Texture tilemap_tx = {"tilemap_tx"}
 
int64_t last_free_len = 0
 

Static Public Attributes

static constexpr int64_t maps_per_row = SHADOW_TILEMAP_PER_ROW
 

Detailed Description

The tile-maps are managed on CPU and associated with each light shadow object.

The number of tile-maps & tiles is unbounded (to the limit of SSBOs), but the actual number used for rendering is caped to 4096. This is to simplify tile-maps management on CPU.

At sync end, all tile-maps are grouped by light inside the ShadowTileMapDataBuf so that each light has a contiguous range of tile-maps to refer to.

Definition at line 128 of file eevee_shadow.hh.

Constructor & Destructor Documentation

◆ ShadowTileMapPool()

Member Function Documentation

◆ acquire()

◆ end_sync()

◆ release()

Member Data Documentation

◆ free_indices

Vector<uint> blender::eevee::ShadowTileMapPool::free_indices

Vector containing available offset to tile range in the ShadowTileDataBuf.

Definition at line 134 of file eevee_shadow.hh.

Referenced by acquire(), end_sync(), release(), and ShadowTileMapPool().

◆ last_free_len

int64_t blender::eevee::ShadowTileMapPool::last_free_len = 0

Number of free tile-maps at the end of the previous sync.

Definition at line 148 of file eevee_shadow.hh.

Referenced by end_sync().

◆ maps_per_row

int64_t blender::eevee::ShadowTileMapPool::maps_per_row = SHADOW_TILEMAP_PER_ROW
staticconstexpr

Limit the width of the texture.

Definition at line 131 of file eevee_shadow.hh.

Referenced by ShadowTileMapPool().

◆ tilemap_pool

Pool<ShadowTileMap> blender::eevee::ShadowTileMapPool::tilemap_pool

Pool containing shadow tile structure on CPU.

Definition at line 136 of file eevee_shadow.hh.

Referenced by acquire(), end_sync(), and release().

◆ tilemap_tx

Texture blender::eevee::ShadowTileMapPool::tilemap_tx = {"tilemap_tx"}

Texture equivalent of ShadowTileDataBuf but grouped by light.

Definition at line 146 of file eevee_shadow.hh.

Referenced by blender::eevee::ShadowModule::bind_resources(), blender::eevee::ShadowModule::end_sync(), and ShadowTileMapPool().

◆ tilemaps_clip

ShadowTileMapClipBuf blender::eevee::ShadowTileMapPool::tilemaps_clip = {"tilemaps_clip"}

Clip range for directional shadows. Updated on GPU. Persistent.

Definition at line 144 of file eevee_shadow.hh.

Referenced by blender::eevee::ShadowModule::end_sync(), and end_sync().

◆ tilemaps_data

ShadowTileMapDataBuf blender::eevee::ShadowTileMapPool::tilemaps_data = {"tilemaps_data"}

◆ tilemaps_unused

ShadowTileMapDataBuf blender::eevee::ShadowTileMapPool::tilemaps_unused = {"tilemaps_unused"}

Previously used tile-maps that needs to release their tiles/pages. Updated each frame.

Definition at line 140 of file eevee_shadow.hh.

Referenced by blender::eevee::ShadowModule::end_sync(), and end_sync().

◆ tiles_data

ShadowTileDataBuf blender::eevee::ShadowTileMapPool::tiles_data = {"tiles_data"}

All possible tiles. A range of tiles tile is referenced by a tile-map.

Definition at line 142 of file eevee_shadow.hh.

Referenced by blender::eevee::ShadowModule::begin_sync(), blender::eevee::ShadowModule::debug_end_sync(), blender::eevee::ShadowModule::end_sync(), and end_sync().


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