|
Blender V4.3
|
#include <eevee_shadow.hh>
Inherits blender::NonCopyable, and blender::NonMovable.
Public Member Functions | |
| ShadowDirectional (ShadowModule &module) | |
| ShadowDirectional (ShadowDirectional &&other) | |
| ~ShadowDirectional () | |
Public Member Functions inherited from blender::NonCopyable | |
| NonCopyable (const NonCopyable &other)=delete | |
| NonCopyable & | operator= (const NonCopyable &other)=delete |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable &&other)=default | |
| NonCopyable & | operator= (NonCopyable &&other)=default |
Static Public Member Functions | |
| static float | coverage_get (int lvl) |
| static float | tile_size_get (int lvl) |
Directional Shadow Maps | |
In order to improve shadow map density, we switch between two tile-map distribution mode. One is beater suited for large FOV (clip-map), the other for really small FOV or Orthographic projections (cascade). Clip-map distribution centers a number of log2 sized tile-maps around the view position. https://developer.nvidia.com/gpugems/gpugems2/part-i-geometric-complexity/chapter-2-terrain-rendering-using-gpu-based-geometry Cascade distribution puts tile-maps along the frustum projection to the light space. https://developer.nvidia.com/gpugems/gpugems3/part-ii-light-and-shadows/chapter-10-parallel-split-shadow-maps-programmable-gpus We choose to distribute cascades linearly to achieve uniform density and simplify lookup. Using clip-map instead of cascades for perspective view also allows for better caching. | |
| void | release_excess_tilemaps (const Light &light, const Camera &camera) |
| void | end_sync (Light &light, const Camera &camera) |
Definition at line 441 of file eevee_shadow.hh.
|
inline |
Definition at line 450 of file eevee_shadow.hh.
|
inline |
Definition at line 451 of file eevee_shadow.hh.
|
inline |
Definition at line 454 of file eevee_shadow.hh.
References blender::eevee::ShadowTileMapPool::release(), and blender::eevee::ShadowModule::tilemap_pool.
Definition at line 470 of file eevee_shadow.hh.
Referenced by blender::eevee::ShadowTileMap::sync_orthographic(), and tile_size_get().
Allocate shadow tile-maps and setup views for rendering.
Definition at line 511 of file eevee_shadow.cc.
References blender::eevee::ShadowTileMapPool::acquire(), int, blender::IndexRange::intersect(), blender::IndexRange::one_after_last(), blender::eevee::SHADOW_PROJECTION_CASCADE, blender::draw::StorageVectorBuffer< T, len >::size(), blender::IndexRange::start(), blender::eevee::ShadowModule::tilemap_pool, and blender::eevee::ShadowTileMapPool::tilemaps_data.
| void blender::eevee::ShadowDirectional::release_excess_tilemaps | ( | const Light & | light, |
| const Camera & | camera ) |
Release the tile-maps that will not be used in the current frame.
Definition at line 489 of file eevee_shadow.cc.
References blender::IndexRange::intersect(), blender::IndexRange::one_after_last(), blender::eevee::ShadowTileMapPool::release(), blender::eevee::SHADOW_PROJECTION_CASCADE, blender::IndexRange::shift(), blender::IndexRange::start(), and blender::eevee::ShadowModule::tilemap_pool.
Definition at line 478 of file eevee_shadow.hh.
References coverage_get(), and SHADOW_TILEMAP_RES.
Referenced by blender::eevee::ShadowModule::begin_sync(), and blender::eevee::ShadowTileMap::sync_orthographic().