|
Blender V5.0
|
#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 |
Definition at line 27 of file eevee_hizbuffer.hh.
Definition at line 57 of file eevee_hizbuffer.hh.
References data.
| void blender::eevee::HiZBuffer::debug_draw | ( | View & | view, |
| gpu::FrameBuffer * | view_fb ) |
Definition at line 110 of file eevee_hizbuffer.cc.
References blender::eevee::DEBUG_HIZ_VALIDATION, GPU_framebuffer_bind(), and view.
|
inline |
Tag the front buffer for update if needed.
Definition at line 93 of file eevee_hizbuffer.hh.
Referenced by swap_layer().
|
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().
|
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().
| void blender::eevee::HiZBuffer::sync | ( | ) |
Definition at line 16 of file eevee_hizbuffer.cc.
References blender::draw::detail::PassBase< DrawCommandBufType >::barrier(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_image(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_ssbo(), blender::draw::detail::PassBase< DrawCommandBufType >::bind_texture(), blender::math::ceil_to_multiple(), blender::eevee::DEBUG_HIZ_VALIDATION, blender::draw::detail::PassBase< DrawCommandBufType >::dispatch(), blender::math::divide_ceil(), DRW_STATE_BLEND_CUSTOM, DRW_STATE_WRITE_COLOR, front, GPU_BARRIER_TEXTURE_FETCH, GPU_PRIM_TRIS, GPU_texture_mipmap_mode(), GPU_TEXTURE_USAGE_SHADER_READ, GPU_TEXTURE_USAGE_SHADER_WRITE, blender::eevee::HIZ_DEBUG, HIZ_GROUP_SIZE, HIZ_MIP_COUNT, blender::eevee::HIZ_UPDATE, blender::eevee::HIZ_UPDATE_LAYER, i, blender::draw::detail::Pass< DrawCommandBufType >::init(), blender::math::max(), blender::draw::detail::PassBase< DrawCommandBufType >::push_constant(), blender::draw::detail::PassBase< DrawCommandBufType >::shader_set(), and blender::draw::detail::PassBase< DrawCommandBufType >::specialize_constant().
| 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.
| struct { ... } blender::eevee::HiZBuffer::back |
Referenced by swap_layer().
| struct { ... } blender::eevee::HiZBuffer::front |
Referenced by blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), swap_layer(), and sync().
| 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.