pub struct GpuFramePacket3D { /* private fields */ }Expand description
Zero-readback GPU 3D frame submission packet packing camera uniforms, Principled materials, 4-cascade CSM, IBL SH9, bone palettes, and sorted instanced batches.
Implementations§
Source§impl GpuFramePacket3D
GPU instanced draw packet construction with zero steady-state heap allocations for GpuFramePacket3D.
impl GpuFramePacket3D
GPU instanced draw packet construction with zero steady-state heap allocations for GpuFramePacket3D.
Sourcepub fn build_from_world_into(
&mut self,
world: &World3D,
viewport_width: u32,
viewport_height: u32,
quality: &RenderQualityConfig,
prev_view_projection: Mat4,
scratch: &mut GpuFramePacketScratch3D,
)
pub fn build_from_world_into( &mut self, world: &World3D, viewport_width: u32, viewport_height: u32, quality: &RenderQualityConfig, prev_view_projection: Mat4, scratch: &mut GpuFramePacketScratch3D, )
Populates this GpuFramePacket3D in place from world (culling, LOD selection, Principled materials, 4-cascade CSM, IBL SH9, and bone palettes) reusing all buffer capacities for zero steady-state allocations.
§Arguments
&Self- Mutable reusable frame packet overwritten in place.&World3D- Active 3D scene graph.u32- Target viewport width in pixels.u32- Target viewport height in pixels.&RenderQualityConfig- Active quality, draw distance, and LOD settings.Mat4- Previous frame view-projection matrix for GPU TSR velocity vectors.&mut GpuFramePacketScratch3D- Reusable scratch arena for zero-alloc sorting and bone palettes.
Sourcepub fn apply_csm_matrices(&mut self, vsm: &VirtualShadowMap)
pub fn apply_csm_matrices(&mut self, vsm: &VirtualShadowMap)
Synchronizes the 4-cascade CSM light view-projection matrices from an updated VirtualShadowMap.
§Arguments
&Self- Mutable frame packet.&VirtualShadowMap- Updated 4-cascade directional shadow map.
Sourcepub fn build_from_world(
world: &World3D,
viewport_width: u32,
viewport_height: u32,
quality: &RenderQualityConfig,
prev_view_projection: Mat4,
) -> Self
pub fn build_from_world( world: &World3D, viewport_width: u32, viewport_height: u32, quality: &RenderQualityConfig, prev_view_projection: Mat4, ) -> Self
Builds a frustum-culled, LOD-selected, mesh-sorted instanced GpuFramePacket3D directly from world ready for Metal/WebGPU/WebGL2/D3D12 submission.
§Arguments
&World3D- Active 3D scene graph.u32- Target viewport width in pixels.u32- Target viewport height in pixels.&RenderQualityConfig- Active quality, draw distance, and LOD settings.Mat4- Previous frame view-projection matrix for GPU TSR velocity vectors.
§Returns
Self- Deduplicated hardware instanced draw packet.
Source§impl GpuFramePacket3D
Implements impl #impl_generics #name #ty_generics #where_clause.
impl GpuFramePacket3D
Implements impl #impl_generics #name #ty_generics #where_clause.