Blender V5.0
blender::eevee::HiZBuffer Class Reference

#include <eevee_hizbuffer.hh>

Public Member Functions

 HiZBuffer (Instance &inst, HiZData &data)
void set_source (gpu::Texture **texture, int layer=-1)
void swap_layer ()
void set_dirty ()
Hierarchical-Z buffer
void sync ()
void update ()
void debug_draw (View &view, gpu::FrameBuffer *view_fb)

Public Attributes

struct { 
   gpu::Texture *   ref_tx_ = nullptr 
front
struct { 
   gpu::Texture *   ref_tx_ = nullptr 
back

Detailed Description

Definition at line 27 of file eevee_hizbuffer.hh.

Constructor & Destructor Documentation

◆ HiZBuffer()

blender::eevee::HiZBuffer::HiZBuffer ( Instance & inst,
HiZData & data )
inline

Definition at line 57 of file eevee_hizbuffer.hh.

References data.

Member Function Documentation

◆ debug_draw()

void blender::eevee::HiZBuffer::debug_draw ( View & view,
gpu::FrameBuffer * view_fb )

◆ set_dirty()

void blender::eevee::HiZBuffer::set_dirty ( )
inline

Tag the front buffer for update if needed.

Definition at line 93 of file eevee_hizbuffer.hh.

Referenced by swap_layer().

◆ set_source()

void blender::eevee::HiZBuffer::set_source ( gpu::Texture ** texture,
int layer = -1 )
inline

Set source texture for the hiz down-sampling. Need to be called once at the start of a pipeline or view. Tag the buffer as dirty.

Definition at line 69 of file eevee_hizbuffer.hh.

References swap_layer(), and texture().

◆ swap_layer()

void blender::eevee::HiZBuffer::swap_layer ( )
inline

Swap front and back layer. Internally set front layer to be dirty. IMPORTANT: Before the second swap (and the second update) the content of the back hi-z buffer is undefined.

Definition at line 82 of file eevee_hizbuffer.hh.

References back, front, and set_dirty().

Referenced by set_source().

◆ sync()

◆ update()

void blender::eevee::HiZBuffer::update ( )

Update the content of the HiZ buffer with the source depth set by set_source(). Noop if the buffer has not been tagged as dirty. Should be called before each passes that needs to read the hiz buffer.

Definition at line 89 of file eevee_hizbuffer.cc.

References HIZ_MIP_COUNT, and i.

Member Data Documentation

◆ [struct]

struct { ... } blender::eevee::HiZBuffer::back

Referenced by swap_layer().

◆ [struct]

struct { ... } blender::eevee::HiZBuffer::front

◆ ref_tx_

gpu::Texture* blender::eevee::HiZBuffer::ref_tx_ = nullptr

References to the textures in the swap-chain.

Definition at line 110 of file eevee_hizbuffer.hh.


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