Skip to main content

PassId

Enum PassId 

Source
#[repr(u32)]
pub enum PassId {
Show 32 variants Cull = 0, Shadow = 1, SsrPrepass = 2, SsaoPrepass = 3, SsaoKernel = 4, SsaoBlur = 5, Main = 6, AutoExposure = 7, Decals = 8, Fog = 9, ParticlesSim = 10, ParticlesDraw = 11, SsrResolve = 12, Velocity = 13, TaaResolve = 14, Bloom = 15, Composite = 16, FogFroxel = 17, Upscale = 18, Transparent = 19, Raymarch = 20, HizBuild = 21, Cull2 = 22, Main2 = 23, Ssgi = 24, RtReflections = 25, GBufferPrepass = 26, ReflectionComposite = 27, LightCull = 28, SpotShadow = 29, Lines = 30, HizFinal = 31,
}
Expand description

One per-pass identity. Cast to usize to index PASS_NAMES or any [T; PASS_COUNT] companion array.

Variants§

§

Cull = 0

GPU visibility cull; produces the indirect draw arguments.

§

Shadow = 1

Directional shadow cascades and spot shadow slices.

§

SsrPrepass = 2

Depth / normal prepass feeding screen-space reflections.

§

SsaoPrepass = 3

Depth / normal prepass feeding ambient occlusion.

§

SsaoKernel = 4

The ambient-occlusion gather.

§

SsaoBlur = 5

Bilateral blur over the occlusion buffer.

§

Main = 6

The lit forward pass.

§

AutoExposure = 7

Luminance reduction driving auto-exposure.

§

Decals = 8

Projected decals.

§

Fog = 9

Volumetric fog composite.

§

ParticlesSim = 10

Particle simulation compute.

§

ParticlesDraw = 11

Particle draw.

§

SsrResolve = 12

Reflection trace and composite.

§

Velocity = 13

Screen-space velocity, for TAA and motion blur.

§

TaaResolve = 14

Temporal anti-aliasing resolve.

§

Bloom = 15

Bloom down/upsample chain.

§

Composite = 16

Tonemap, grade, and present.

§

FogFroxel = 17

Volumetric-fog froxel-volume compute pass. Populates a 3D (scattered, transmittance) texture once per frame, sampled by the fullscreen Fog render pass instead of an inline ray-march. Every backend implements the path; the Fog pass trilinear-samples the volume by (screen_uv, view_z).

§

Upscale = 18

Temporal upscaling pass. When the world’s PostProcessConfig enables temporal_upscaling, the renderer draws the 3D scene at a fraction of drawable size and inserts this pass between the post-SSR scene and the Bloom + Composite stack. The backend runs its platform-native temporal upscaler (MetalFX on macOS; FSR / DLSS / XeSS slots on the Windows backends are placeholders today) to reconstruct a drawable-resolution image. Replaces TaaResolve: the upscaler does temporal accumulation itself, so adding both would double-temporal the scene.

§

Transparent = 19

Transparent / translucent geometry pass. Runs after SsrResolve (so water + glass see opaque reflections) and before TaaResolve / Upscale (so translucents pick up temporal accumulation). Reads the latest scene-pre-taa colour + main depth as sampled textures; writes scene-pre-taa blended (SRC_ALPHA / ONE_MINUS_SRC_ALPHA). Each transparent draw owns its own pipeline + descriptor set; the pass aggregates them as a back-to-front sorted list at encode time. Gated on FrameGraphInputs::transparent_enabled; when no consumer is in the world, the slot is omitted entirely.

§

Raymarch = 20

Raymarched SDF volume pass. Rasterises the back faces of each SdfVolume’s world-space bounding box and runs the user-authored fragment shader, which sphere-traces a signed distance field inside the box. Hit fragments write opaque colour into hdr_resolve (RMW between AutoExposure and Decals) and update the main depth attachment so the raymarched surface composites with rasterised geometry naturally: decals, fog, SSR-resolve, and TAA all consume the post-Raymarch depth and colour. Gated on FrameGraphInputs::raymarch_enabled; when no SdfVolume is in the world the slot is omitted entirely.

§

HizBuild = 21

Mid-frame Hi-Z (depth-mip pyramid) rebuild for two-pass occlusion culling. Inserted only when FrameGraphInputs::two_pass_occlusion_enabled is on: after Main (phase 1) has written this frame’s depth, this compute pass reduces it into the Hi-Z pyramid so Cull2 can re-test the objects phase 1 occluded against up-to-date depth. Distinct from the end-of-frame Hi-Z build (which feeds the next frame’s phase-1 cull and stays an inline action, not a graph node). Every backend implements the node; whether it appears is two_pass_occlusion_enabled, which each seeds from its own two-pass state.

§

Cull2 = 22

Phase-2 GPU cull for two-pass occlusion. Re-tests the objects Cull (phase 1) marked Hi-Z-occluded against the freshly rebuilt pyramid (HizBuild) and encodes a draw for any that turn out visible into a second indirect command buffer Main2 consumes. Reads the per-object status buffer phase-1 cull wrote + the draw_args2 buffer it writes. Gated on FrameGraphInputs::two_pass_occlusion_enabled.

§

Main2 = 23

Phase-2 main pass for two-pass occlusion. Loads (does not clear) the HDR colour + depth Main wrote and re-runs only the bindless-static indirect draw through Cull2’s command buffer, depth-compositing the disoccluded geometry with phase 1. Instanced + skinned geometry is not Hi-Z-culled, so it is fully drawn in phase 1 and not repeated here. Becomes the new head of the hdr_resolve post-decoration chain (so AutoExposure / Decals / Fog / SSR see the combined result). Gated on FrameGraphInputs::two_pass_occlusion_enabled.

§

Ssgi = 24

Screen-space global illumination. A refinement of SSR: it reuses the SSR depth + normal pre-pass G-buffer and screen-space ray-march, but integrates bounced radiance over a cosine-weighted hemisphere instead of along one reflection vector. Sits on the hdr_resolve RMW chain (after Raymarch, before Decals): it reads the lit scene as the bounce radiance source and additively composites the gathered + denoised indirect term back into it, so the near-field colour bleed layers on top of the IBL ambient. Gated on FrameGraphInputs::ssgi_enabled; when indirect_lighting is IBL-only the slot is omitted entirely.

§

RtReflections = 25

Hardware ray-traced reflections. Occupies the same scene-pre-taa slot as SsrResolve (reads the post-decoration hdr_resolve, writes scene_pre_taa) and takes precedence over it: when this pass is live the builder inserts it and omits SsrResolve (a world may author both; RT runs where available, SSR is the fallback). It still relies on the SSR depth + normal + roughness pre-pass (so SsrPrepass is forced on), but instead of a screen-space march it traces a world-space reflection ray against an acceleration structure built over the static scene geometry, so off-screen reflected geometry appears. Gated on FrameGraphInputs::rt_reflections_enabled, and so only on GPUs that report ray-tracing support.

§

GBufferPrepass = 26

Unified geometry G-buffer pre-pass. One jittered traversal of the visible set writes view-space normal + linear depth, perceptual roughness, and screen-space motion into a single MRT (plus a sampleable depth), replacing the separate SsrPrepass + Velocity (and the SSAO-owned prepass): every consumer (SSR, SSAO, SSGI, RT, TAA, upscaler) reads this one output. Gated on FrameGraphInputs::unified_gbuffer_prepass.

§

ReflectionComposite = 27

Roughness-aware reflection composite. Not a standalone graph node: it is encoded inline at the tail of the SsrResolve / RtReflections pass (both write a reflection target, then blur it by roughness and composite it over the scene). It carries its own timing slot so its cost is visible separately from the trace/march that precedes it. Inline on every backend, so no backend’s graph executor ever dispatches this id: each treats it as a programming error the way it treats the bundled SSAO sub-passes.

§

LightCull = 28

Clustered light-binning compute pass. Once per frame, before Main: bins the scene’s local lights (the GpuLight buffer) into a per-cluster index list over a screen-tiled, exponential-depth froxel grid, which the forward pass reads to shade each fragment from only its cluster’s lights instead of iterating every light. Runs when the world has local lights. Writes a storage buffer Main reads (RAW edge).

§

SpotShadow = 29

Depth-only render of each shadowed spot light’s cone into one slice of the spot shadow map array. Local lights are static, so the projections are built once; only the depth contents refresh, one slice per frame under ShadowUpdate::Hybrid. Runs when the world has a shadow-casting spot.

§

Lines = 30

World-space line geometry (trajectories, tethers, path previews, the editor’s origin axes). Blend-writes the resolved scene colour after the world decorations, sampling the resolved scene depth so a line behind geometry is occluded by it. Gated on FrameGraphInputs::lines_enabled: a frame that submits no lines omits the node entirely, so a frame that draws none never pays for it.

§

HizFinal = 31

Terminal Hi-Z (depth-mip pyramid) build. Reduces the frame’s final main depth into the pyramid the next frame’s phase-1 Cull tests against, so it is declared last and reads the depth every decoration pass has finished with. Distinct from HizBuild, which rebuilds the same pyramid mid-frame from phase-1 depth for Cull2; when two-pass occlusion is on both run and this one supersedes it for the next frame. Present whenever the GPU-cull path built a pyramid (FrameGraphInputs::hiz_build_enabled).

Implementations§

Source§

impl PassId

Source

pub const ALL: [PassId; 32]

Every variant, in declaration (index) order.

Source§

impl PassId

Source

pub fn name(self) -> &'static str

Stable display name, looked up in PASS_NAMES. 'static since the table is const.

Trait Implementations§

Source§

impl Clone for PassId

Source§

fn clone(&self) -> PassId

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PassId

Source§

impl Debug for PassId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for PassId

Source§

impl Hash for PassId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for PassId

Source§

fn eq(&self, other: &PassId) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PassId

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.