|
Blender V5.3
|
Classes | |
| struct | Update |
Functions | |
| void | update_main (Update &srt, const uint3 local_id, const uint3 group_id) |
Shader that down-sample depth buffer, creating a Hierarchical-Z buffer. Saves max value of each 2x2 texel in the mipmap above the one we are rendering to. Adapted from http://rastergrid.com/blog/2010/10/hierarchical-z-map-based-occlusion-culling/
Major simplification has been made since we pad the buffer to always be bigger than input to avoid mipmapping misalignment.
Start by copying the base level by quad loading the depth. Then each thread compute it's local depth for level 1. After that we use shared variables to do inter thread communication and downsample to max level.
Definition at line 67 of file eevee_hiz_update.bsl.hh.
References all(), atomicAdd(), barrier(), divide_ceil(), imageLoadFast, imageSize(), imageStoreFast, lessThan, local_invocation_id, min, reverse_z::read(), reduce_max(), resource_table, static_branch, textureGather(), textureSize(), update_main(), float4::w, work_group_id, float4::x, int2::x, uint2::x, x, float4::y, int2::y, uint2::y, y, and float4::z.
Referenced by update_main().