pub struct Preprocessor<G: GaussianPod, B = BindGroup> { /* private fields */ }Expand description
Preprocessor to preprocess the Gaussians.
It computes the depth for RadixSorter and do frustum culling.
Implementations§
Source§impl<G: GaussianPod, B> Preprocessor<G, B>
impl<G: GaussianPod, B> Preprocessor<G, B>
Sourcepub fn create_bind_group(
&self,
device: &Device,
camera: &CameraBuffer,
model_transform: &ModelTransformBuffer,
gaussian_transform: &GaussianTransformBuffer,
gaussians: &GaussiansBuffer<G>,
indirect_args: &IndirectArgsBuffer,
radix_sort_indirect_args: &RadixSortIndirectArgsBuffer,
indirect_indices: &IndirectIndicesBuffer,
gaussians_depth: &GaussiansDepthBuffer,
selection: &SelectionBuffer,
invert_selection: &PreprocessorInvertSelectionBuffer,
) -> BindGroup
pub fn create_bind_group( &self, device: &Device, camera: &CameraBuffer, model_transform: &ModelTransformBuffer, gaussian_transform: &GaussianTransformBuffer, gaussians: &GaussiansBuffer<G>, indirect_args: &IndirectArgsBuffer, radix_sort_indirect_args: &RadixSortIndirectArgsBuffer, indirect_indices: &IndirectIndicesBuffer, gaussians_depth: &GaussiansDepthBuffer, selection: &SelectionBuffer, invert_selection: &PreprocessorInvertSelectionBuffer, ) -> BindGroup
Create the bind group.
Sourcepub fn workgroup_size(&self) -> u32
pub fn workgroup_size(&self) -> u32
Get the number of invocations in one workgroup.
Sourcepub fn bind_group_layout(&self) -> &BindGroupLayout
pub fn bind_group_layout(&self) -> &BindGroupLayout
Get the bind group layouts.
Source§impl<G: GaussianPod> Preprocessor<G>
impl<G: GaussianPod> Preprocessor<G>
Sourcepub const BIND_GROUP_LAYOUT_DESCRIPTOR: BindGroupLayoutDescriptor<'static>
pub const BIND_GROUP_LAYOUT_DESCRIPTOR: BindGroupLayoutDescriptor<'static>
The bind group layout descriptor.
Sourcepub fn new(
device: &Device,
camera: &CameraBuffer,
model_transform: &ModelTransformBuffer,
gaussian_transform: &GaussianTransformBuffer,
gaussians: &GaussiansBuffer<G>,
indirect_args: &IndirectArgsBuffer,
radix_sort_indirect_args: &RadixSortIndirectArgsBuffer,
indirect_indices: &IndirectIndicesBuffer,
gaussians_depth: &GaussiansDepthBuffer,
selection: &SelectionBuffer,
invert_selection: &PreprocessorInvertSelectionBuffer,
) -> Result<Self, PreprocessorCreateError>
pub fn new( device: &Device, camera: &CameraBuffer, model_transform: &ModelTransformBuffer, gaussian_transform: &GaussianTransformBuffer, gaussians: &GaussiansBuffer<G>, indirect_args: &IndirectArgsBuffer, radix_sort_indirect_args: &RadixSortIndirectArgsBuffer, indirect_indices: &IndirectIndicesBuffer, gaussians_depth: &GaussiansDepthBuffer, selection: &SelectionBuffer, invert_selection: &PreprocessorInvertSelectionBuffer, ) -> Result<Self, PreprocessorCreateError>
Create a new preprocessor.
Sourcepub fn preprocess(&self, encoder: &mut CommandEncoder, gaussian_count: u32)
pub fn preprocess(&self, encoder: &mut CommandEncoder, gaussian_count: u32)
Preprocess the Gaussians.
Source§impl<G: GaussianPod> Preprocessor<G, ()>
impl<G: GaussianPod> Preprocessor<G, ()>
Sourcepub fn new_without_bind_group(
device: &Device,
) -> Result<Self, PreprocessorCreateError>
pub fn new_without_bind_group( device: &Device, ) -> Result<Self, PreprocessorCreateError>
Create a new preprocessor without interally managed bind group.
To create a bind group with layout matched to this preprocessor, use the
Preprocessor::create_bind_group method.
Sourcepub fn preprocess(
&self,
encoder: &mut CommandEncoder,
bind_group: &BindGroup,
gaussian_count: u32,
)
pub fn preprocess( &self, encoder: &mut CommandEncoder, bind_group: &BindGroup, gaussian_count: u32, )
Preprocess the Gaussians.
Trait Implementations§
Auto Trait Implementations§
impl<G, B> Freeze for Preprocessor<G, B>where
B: Freeze,
impl<G, B = BindGroup> !RefUnwindSafe for Preprocessor<G, B>
impl<G, B> Send for Preprocessor<G, B>where
B: Send,
impl<G, B> Sync for Preprocessor<G, B>where
B: Sync,
impl<G, B> Unpin for Preprocessor<G, B>
impl<G, B> UnsafeUnpin for Preprocessor<G, B>where
B: UnsafeUnpin,
impl<G, B = BindGroup> !UnwindSafe for Preprocessor<G, B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more