pub enum UiPass {
World,
Hud,
}Expand description
Which of the two screen-space passes a command is painted in.
Everything in this layer used to be painted after post-processing, straight onto the finished frame. That is right for a HUD, which has to stay sharp, and wrong for everything else: a game that draws its figures, rooms and effects as clouds of screen-space particles was getting no bloom, no tonemap, no halation and no grade on any of them. The whole picture went to the screen raw, and the only things the post-processing ever touched were a few background glyphs in the 3D scene.
So there are two passes now. World is painted into the HDR scene buffer
before post-processing, in the same space as the 3D scene, and everything
downstream (bloom, light shafts, flare, tonemap, grade, grain) applies to
it. Hud is painted after, straight to the screen, and stays crisp.
By default particle clouds and filled rectangles go to World, since a
filled rectangle is what a game lays down as the ground under its matter
and it has to stay under it; text, outlines, bars and sprites go to
Hud. A panel is split: its fill goes to World and its border to
Hud. UiLayer::begin_world, UiLayer::begin_hud and
UiLayer::end_pass override all of that for a run of commands.
Variants§
World
Into the scene buffer, before post-processing. Blooms, grades, shakes.
Hud
Onto the finished frame, after post-processing. Sharp and stable.
Trait Implementations§
impl Copy for UiPass
impl Eq for UiPass
impl StructuralPartialEq for UiPass
Auto Trait Implementations§
impl Freeze for UiPass
impl RefUnwindSafe for UiPass
impl Send for UiPass
impl Sync for UiPass
impl Unpin for UiPass
impl UnsafeUnpin for UiPass
impl UnwindSafe for UiPass
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
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<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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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.