Expand description
Generation of hierarchical Z buffers for occlusion culling.
Currently, this module only supports generation of hierarchical Z buffers for occlusion culling.
Structs§
- Depth
Pyramid Dummy Texture - Stores a placeholder texture that can be bound to a depth pyramid binding if no depth pyramid is needed.
- Downsample
Depth Pipeline - A single depth downsample pipeline.
- Downsample
Depth Pipeline Key - Uniquely identifies a configuration of the downsample depth shader.
- Downsample
Depth Pipelines - Stores all depth buffer downsampling pipelines.
- View
Depth Pyramid - Stores a hierarchical Z-buffer for a view, which is a series of mipmaps useful for efficient occlusion culling.
- View
Downsample Depth Bind Group - The bind group that we use to attach the depth buffer and depth pyramid for
a view to the
downsample_depth.wgslshader.
Constants§
- DEPTH_
PYRAMID_ MIP_ COUNT - The maximum number of mip levels that we can produce.
Functions§
- create_
depth_ pyramid_ dummy_ texture - Creates a placeholder texture that can be bound to a depth pyramid binding if no depth pyramid is needed.
- create_
downsample_ depth_ pipelines - Creates the
DownsampleDepthPipelinesif downsampling is supported on the current platform. - early_
downsample_ depth - Produces a hierarchical Z-buffer (depth pyramid) for occlusion culling.
- init_
depth_ pyramid_ dummy_ texture - late_
downsample_ depth - Produces a hierarchical Z-buffer (depth pyramid) for occlusion culling.
- prepare_
downsample_ depth_ view_ bind_ groups - Creates the
ViewDownsampleDepthBindGroups for all views with occlusion culling enabled. - prepare_
view_ depth_ pyramids - Creates depth pyramids for views that have occlusion culling enabled.