pub struct GBufferLayout {
pub targets: Vec<GBufferTarget>,
pub depth: GfxFormat,
}Expand description
Vollständiges G-Buffer-Layout: Farb-Targets + Tiefen-Attachment.
Fields§
§targets: Vec<GBufferTarget>§depth: GfxFormatImplementations§
Source§impl GBufferLayout
impl GBufferLayout
Sourcepub fn deferred_v1() -> Self
pub fn deferred_v1() -> Self
Das MRT-Layout aus ADR-0003 Box 1: Albedo+Metallic, oktaedrische Normalen+Roughness+Material-ID, Velocity (RG16F), Tiefe. 16 Byte/Pixel — der Wert, gegen den der Visibility-Pfad antritt.
Sourcepub fn visibility_v1() -> Self
pub fn visibility_v1() -> Self
Das Visibility-Buffer-Layout aus ADR-0003 (Desktop-Zweitquelle): eine gepackte ID + Tiefe — 8 Byte/Pixel statt 16.
Sourcepub fn bytes_per_pixel(&self) -> u32
pub fn bytes_per_pixel(&self) -> u32
Gesamtbedarf pro Pixel: alle Farb-Targets plus Tiefe.
Sourcepub fn find(&self, sem: ChannelSemantic) -> Option<(usize, usize)>
pub fn find(&self, sem: ChannelSemantic) -> Option<(usize, usize)>
Fundstelle eines Semantik-Kanals: (target, kanal).
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Prüft das Layout in sich: keine doppelten Semantiken, keine Kanäle über der Formatbreite, vollständige Paare (Albedo dreier, Normal-X mit Normal-Y, Velocity-X mit Velocity-Y).
Trait Implementations§
Source§impl Clone for GBufferLayout
impl Clone for GBufferLayout
Source§fn clone(&self) -> GBufferLayout
fn clone(&self) -> GBufferLayout
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 moreSource§impl Debug for GBufferLayout
impl Debug for GBufferLayout
impl Eq for GBufferLayout
Source§impl PartialEq for GBufferLayout
impl PartialEq for GBufferLayout
Source§fn eq(&self, other: &GBufferLayout) -> bool
fn eq(&self, other: &GBufferLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GBufferLayout
Auto Trait Implementations§
impl Freeze for GBufferLayout
impl RefUnwindSafe for GBufferLayout
impl Send for GBufferLayout
impl Sync for GBufferLayout
impl Unpin for GBufferLayout
impl UnsafeUnpin for GBufferLayout
impl UnwindSafe for GBufferLayout
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