#[repr(u32)]pub enum DepthMode {
Default = 0,
D16 = 1,
D32 = 2,
Stencil = 3,
}
Expand description
This is used to determine what kind of depth buffer StereoKit uses! https://stereokit.net/Pages/StereoKit/DepthMode.html
see also: SkSettings::depth_mode
Variants§
Default = 0
Default mode, uses the OpenXR runtime’s preferred depth format. This isAdd commentMore actions typically 16 bit on standalone/battery powered devices like Quest and HoloLens, and 32 bit on higher powered platforms like PC. If you need a far view distance even on mobile devices, prefer D32 or Stencil instead..
D16 = 1
16 bit depth buffer, this is fast and recommended for devices like the HoloLens. This is especially important for fast depth based reprojection. Far view distances will suffer here though, so keep your clipping far plane as close as possible.
D32 = 2
32 bit depth buffer, should look great at any distance! If you must have the best, then this is the best. If you’re interested in this one, Stencil may also be plenty for you, as 24 bit depth is also pretty peachy.
Stencil = 3
24 bit depth buffer with 8 bits of stencil data. 24 bits is generally plenty for a depth buffer, so using the rest for stencil can open up some nice options! StereoKit has limited stencil support right now though (v0.3).
Trait Implementations§
impl Copy for DepthMode
impl Eq for DepthMode
impl StructuralPartialEq for DepthMode
Auto Trait Implementations§
impl Freeze for DepthMode
impl RefUnwindSafe for DepthMode
impl Send for DepthMode
impl Sync for DepthMode
impl Unpin for DepthMode
impl UnwindSafe for DepthMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.