#[repr(C)]pub struct CullParams {
pub planes: [[f32; 4]; 6],
pub cam_pos: [f32; 3],
pub object_count: u32,
pub prev_view_proj: [[f32; 4]; 4],
pub hiz_size: [f32; 2],
pub hiz_mip_count: u32,
pub hiz_enabled: u32,
pub bucket_count: u32,
pub bucket_stride: u32,
pub _pad: [u32; 2],
}Expand description
The GPU-cull CullParams cbuffer (b0, 208 bytes): six already-normalised
frustum planes, the camera position sharing its row with the object count, the
previous frame’s view-projection, the Hi-Z metadata (dims, mip count, enable
flag), then the shader-bucket routing. DirectX fuses the cull + Hi-Z uniforms
into one cbuffer.
Fields§
§planes: [[f32; 4]; 6]Frustum planes, each (normal.xyz, d).
cam_pos: [f32; 3]World-space camera position.
object_count: u32Draw records the kernel iterates.
prev_view_proj: [[f32; 4]; 4]The previous frame’s view-projection, for velocity and Hi-Z reprojection.
hiz_size: [f32; 2]Hi-Z pyramid base size in pixels.
hiz_mip_count: u32Mip levels in the Hi-Z pyramid.
hiz_enabled: u32Non-zero when the Hi-Z occlusion test runs.
bucket_count: u32Shader-bucket command regions in the indirect buffer. The kernel writes
every record’s slot in all bucket_count regions (a draw in the record’s
own bucket, a no-op everywhere else); region b starts at command
b * bucket_stride. bucket_count = 1 degenerates to a single region.
bucket_stride: u32u32 slots one bucket occupies in the output list.
_pad: [u32; 2]Padding so the field layout matches the shader-side struct.
Trait Implementations§
Source§impl Clone for CullParams
impl Clone for CullParams
Source§fn clone(&self) -> CullParams
fn clone(&self) -> CullParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more