Blender V4.5
blender::eevee::HiZBuffer Class Reference

#include <eevee_hizbuffer.hh>

Classes

struct  [struct].front
struct  [struct].back

Public Member Functions

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

Public Attributes

struct  front
struct  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,
GPUFrameBuffer * 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 ( GPUTexture ** 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 88 of file eevee_hizbuffer.cc.

References HIZ_MIP_COUNT, i, and blender::IndexRange::IndexRange().

Member Data Documentation

◆ back

struct blender::eevee::HiZBuffer::[struct].back blender::eevee::HiZBuffer::back

Referenced by swap_layer().

◆ front


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