#[non_exhaustive]pub enum FrameTexture {
SceneDepth,
SceneColour,
ShadowMap,
ScreenSpaceShadows,
AmbientOcclusion,
ReflectionProbe,
LightProbeVolume,
DecalBuffer(u8),
}Expand description
An image of the frame being drawn that a program reads: the consumer supplies it from its own frame, as it supplies a view or frame constant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SceneDepth
The depth the frame’s depth pass wrote, the hardware depth in x: a program that reads it linearises it with the scene
constants’ depth parameters (soft edges of fog, foam and water against the geometry behind).
SceneColour
The colour image of what the frame has drawn so far behind the surface (the opaque scene, or the screen as it stands): what a refracting or see-through surface samples.
ShadowMap
The depth image rendered from a shadow-casting light (the main light’s, its cascades side by side where it has them): a program compares a surface’s depth in that light’s space with it.
ScreenSpaceShadows
The shadow term of the main light gathered per screen pixel: a program samples it at its own screen position, 1 where the light reaches and 0 where it is shadowed.
AmbientOcclusion
The ambient occlusion the frame computed per screen pixel (1 unoccluded).
ReflectionProbe
The cube image of the environment around the surface as the nearest reflection probe, or the sky where there is none, captured: what a reflection samples along the reflected view direction.
LightProbeVolume
The volume image of the light probes’ lighting around the surface (a 3D image of spherical-harmonic coefficients the surface samples at its position).
DecalBuffer(u8)
Image n of the decal buffer the frame’s decal step draws before the surfaces are lit (Unity’s DBuffer: 0 the
decals’ albedo, 1 their normal, 2 their metallic, occlusion and smoothness, each with the decals’ coverage in
alpha): a lit draw reads it at its own screen position and blends the decals into its surface.
Implementations§
Source§impl FrameTexture
impl FrameTexture
Sourcepub fn spatial_kind(self) -> SpatialKind
pub fn spatial_kind(self) -> SpatialKind
How the frame’s image moves into a program frame.
Source§impl FrameTexture
impl FrameTexture
Sourcepub fn dim(self) -> TextureDim
pub fn dim(self) -> TextureDim
The dimension of the image: a probe’s is a cube, the light probes’ a volume, every other a plane.
Trait Implementations§
Source§impl Clone for FrameTexture
impl Clone for FrameTexture
impl Copy for FrameTexture
Source§impl Debug for FrameTexture
impl Debug for FrameTexture
impl Eq for FrameTexture
Source§impl Hash for FrameTexture
impl Hash for FrameTexture
Source§impl PartialEq for FrameTexture
impl PartialEq for FrameTexture
Source§impl Serialize for FrameTexture
impl Serialize for FrameTexture
impl StructuralPartialEq for FrameTexture
Auto Trait Implementations§
impl Forget for FrameTexture
impl Freeze for FrameTexture
impl RefUnwindSafe for FrameTexture
impl Send for FrameTexture
impl Sync for FrameTexture
impl Unpin for FrameTexture
impl UnsafeUnpin for FrameTexture
impl UnwindSafe for FrameTexture
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<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.