pub enum PixelFormat {
Rgba16Float,
Rgba8Unorm,
Rg16Float,
R8Unorm,
R32Float,
Depth32Float,
BgraSwapchain,
}Expand description
Backend-agnostic pixel format. Maps to MTLPixelFormat /
vk::Format / DXGI_FORMAT per executor. Only the formats the
engine actually uses are enumerated; extend as new passes need new
targets.
Variants§
Rgba16Float
16-bit float RGBA, the HDR working format.
Rgba8Unorm
8-bit unorm RGBA.
Rg16Float
16-bit float RG.
R8Unorm
8-bit unorm single channel.
R32Float
32-bit float single channel.
Depth32Float
32-bit float depth.
BgraSwapchain
Whatever format the swapchain presents.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub const fn is_depth(self) -> bool
pub const fn is_depth(self) -> bool
Whether this is a depth format. The aliasing planner keeps depth and colour resources in separate memory pools because their backend memory requirements (heap flags / memory type) differ; the finer per-usage compatibility is the backend’s concern when it realises the plan.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
impl Eq for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
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> 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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.