pub enum Multisample {
Off,
X4,
}Expand description
How many samples a scene’s pass takes in each pixel.
With one sample, each pixel shows the surface its middle falls on, so the
edge of a curved mesh, such as a sphere’s or a tube’s, steps from pixel to
pixel. With four, the GPU tests coverage and depth at four points in each
pixel and averages the colours they find, so the outline of a mesh and
the line where two surfaces cut through each other show smooth. A
surface’s colour is still found once in each pixel: multisampling smooths
the edges of meshes, not the edges of shapes a Volume’s shader finds
or of transparent parts of a surface’s content. A sheet, a mesh whose
outline is its texture’s edge, fades over that outline with either count.
A scene with four samples draws into targets of its own, four samples
deep and as large as the scene, then averages them into the page: more
GPU memory and time, which a scene left Off does not pay.
The GPU renderer takes four samples on every backend, as every GPU format
it draws scenes in supports them. The CPU renderer draws every scene with
one sample.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for Multisample
impl Clone for Multisample
Source§fn clone(&self) -> Multisample
fn clone(&self) -> Multisample
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Multisample
Source§impl Debug for Multisample
impl Debug for Multisample
Source§impl Default for Multisample
impl Default for Multisample
Source§fn default() -> Multisample
fn default() -> Multisample
impl Eq for Multisample
Source§impl Hash for Multisample
impl Hash for Multisample
Source§impl PartialEq for Multisample
impl PartialEq for Multisample
impl StructuralPartialEq for Multisample
Auto Trait Implementations§
impl Forget for Multisample
impl Freeze for Multisample
impl Move for Multisample
impl RefUnwindSafe for Multisample
impl Send for Multisample
impl Sync for Multisample
impl Unpin for Multisample
impl UnsafeUnpin for Multisample
impl UnwindSafe for Multisample
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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