|
Blender V4.5
|
#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 |
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, |
| GPUFrameBuffer * | view_fb ) |
Definition at line 109 of file eevee_hizbuffer.cc.
References blender::eevee::DEBUG_HIZ_VALIDATION, and GPU_framebuffer_bind().
|
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_R32F, 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::IndexRange::IndexRange(), 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().
Referenced by blender::eevee::Instance::begin_sync().
| 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().
| struct blender::eevee::HiZBuffer::[struct].back blender::eevee::HiZBuffer::back |
Referenced by swap_layer().
| struct blender::eevee::HiZBuffer::[struct].front blender::eevee::HiZBuffer::front |
Referenced by blender::eevee::DeferredLayerBase::gbuffer_pass_sync(), swap_layer(), and sync().