pub enum DrawPhase {
Opaque = 0,
Background = 1,
Transparent = 2,
PickingLayer = 3,
OutlineMask = 4,
OutlineMaskNoDepth = 5,
Compositing = 6,
CompositingScreenshot = 7,
}Expand description
Determines a (very rough) order of rendering and describes the active wgpu::RenderPass.
Currently we do not support sorting within a rendering phase!
See #702
Within a phase DrawData are drawn in the order they are submitted in.
TODO(andreas): Should every phase/processor be associated with a single wgpu::RenderPass?
Note that this implies sub-phases (e.g. Opaque & background render to the same target).
Also we should then the higher level one to RenderPass or similar!
Variants§
Opaque = 0
Opaque objects, performing reads/writes to the depth buffer.
Typically they are order independent, so everything uses this same index.
Background = 1
Background, rendering where depth wasn’t written.
Transparent = 2
Transparent objects, performing reads of the depth buffer, but no writes.
PickingLayer = 3
Everything that can be picked with GPU based picking.
Typically this contains everything from both the Opaque and Transparent phases drawn with z-test enabled.
OutlineMask = 4
Render mask for things that should get outlines.
OutlineMaskNoDepth = 5
Outline masks for special cases that should follow draw order
instead of the regular DrawPhase::OutlineMask pass depth buffer.
For example outlines for coplanar geometries that would otherwise have z-fighting.
Compositing = 6
Drawn when compositing with the main target.
CompositingScreenshot = 7
Drawn when compositing with the main target, but for screenshots. This is a separate phase primarily because screenshots may be rendered with a different texture format.
Trait Implementations§
impl Copy for DrawPhase
Source§impl EnumSetConstHelper for DrawPhase
impl EnumSetConstHelper for DrawPhase
Source§const CONST_INIT_HELPER: __EnumSetInitHelper = __EnumSetInitHelper
const CONST_INIT_HELPER: __EnumSetInitHelper = __EnumSetInitHelper
ConstInitHelper.Source§const CONST_OP_HELPER: __EnumSetOpHelper = __EnumSetOpHelper
const CONST_OP_HELPER: __EnumSetOpHelper = __EnumSetOpHelper
ConstOpHelper.Source§type ConstInitHelper = __EnumSetInitHelper
type ConstInitHelper = __EnumSetInitHelper
Source§type ConstOpHelper = __EnumSetOpHelper
type ConstOpHelper = __EnumSetOpHelper
impl EnumSetType for DrawPhase
Source§impl EnumSetTypePrivate for DrawPhase
impl EnumSetTypePrivate for DrawPhase
Source§const VARIANT_COUNT: u32 = 8u32
const VARIANT_COUNT: u32 = 8u32
Source§fn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Source§unsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Source§unsafe fn enum_from_u32_checked(val: u32) -> Self
unsafe fn enum_from_u32_checked(val: u32) -> Self
impl Eq for DrawPhase
Auto Trait Implementations§
impl Freeze for DrawPhase
impl RefUnwindSafe for DrawPhase
impl Send for DrawPhase
impl Sync for DrawPhase
impl Unpin for DrawPhase
impl UnsafeUnpin for DrawPhase
impl UnwindSafe for DrawPhase
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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