Expand description
Downsampling of textures to produce mipmap levels.
Currently, this module only supports generation of hierarchical Z buffers for occlusion culling. It’s marked experimental because the shader is designed only for power-of-two texture sizes and is slightly incorrect for non-power-of-two depth buffer sizes.
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 Node - The nodes that produce a hierarchical Z-buffer, also known as a depth pyramid.
- 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.
- MipGeneration
Plugin - A plugin that allows Bevy to repeatedly downsample textures to create mipmaps.
- 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.wgsl
shader.
Constants§
- DEPTH_
PYRAMID_ MIP_ COUNT - The maximum number of mip levels that we can produce.
- DOWNSAMPLE_
DEPTH_ SHADER_ HANDLE - Identifies the
downsample_depth.wgsl
shader.
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.
- prepare_
view_ depth_ pyramids - Creates depth pyramids for views that have occlusion culling enabled.