NEOLearn

Screen-space effects

Prepasses, deferred rendering, screen-space ambient occlusion and reflections, transmission and order-independent transparency, and where each one works.

Updated October 20, 2026

On this page

Screen-space effects work from what the camera has already drawn: its depth, normals and motion. They add detail that lights and shadow maps miss, at a cost that depends on screen resolution rather than scene size. They only know about what's on screen, so objects leaving the view drop out of them.

Prepasses#

A prepass draws the scene once before the main pass to produce extra textures. Effects add the prepasses they need, so you rarely add these yourself. They're components on the camera, in neo::core_pipeline::prepass:

ComponentProducesUsed by
DepthPrepassDepthSSAO, SSR, contact shadows, forward decals, TAA, occlusion culling, your shaders.
NormalPrepassNormalsSSAO.
MotionVectorPrepassPer-pixel motionTAA, motion blur.
DeferredPrepassThe G-bufferDeferred rendering, SSR.

Custom shaders can read these textures; see cargo run --example shader_prepass (desktop only).

Deferred rendering#

By default the renderer is forward: each object is lit as it's drawn. Deferred rendering first writes every opaque surface's material into a G-buffer, then lights the screen once. It can be faster with many overlapping lights, and SSR needs it.

Rust
use neo::core_pipeline::prepass::{DeferredPrepass, DepthPrepass};
use neo::pbr::DefaultOpaqueRendererMethod;

// every opaque StandardMaterial renders deferred
app.insert_resource(DefaultOpaqueRendererMethod::deferred());

commands.spawn((Camera3d::default(), DepthPrepass, DeferredPrepass, Msaa::Off));

A single material can choose with opaque_render_method: OpaqueRendererMethod::Forward (in neo::material), Deferred or Auto (follow the default). MSAA doesn't work with deferred rendering; the engine turns it off and warns. Transparent materials always render forward. Example: deferred_rendering.

SSAO#

Screen-space ambient occlusion darkens creases, corners and the places where objects meet the ground. It affects ambient and environment light, not direct lights.

Rust
use neo::pbr::{ScreenSpaceAmbientOcclusion, ScreenSpaceAmbientOcclusionQualityLevel};
use neo::anti_alias::taa::TemporalAntiAliasing;

commands.spawn((
    Camera3d::default(),
    Msaa::Off,
    ScreenSpaceAmbientOcclusion {
        quality_level: ScreenSpaceAmbientOcclusionQualityLevel::High,
        ..default()
    },
    TemporalAntiAliasing::default(), // smooths SSAO's noise
));
FieldWhat it does
quality_levelLow, Medium, High (default), Ultra or Custom { .. }.
radiusHow far to look for occluders, in view-space units. Larger gives broader shading and more noise.
constant_object_thicknessHow thick objects are assumed to be.

SSAO needs Msaa::Off; with MSAA on, it warns and doesn't run. It isn't available in web builds. Example: ssao.

SSR#

Screen-space reflections reflect what's on screen in smooth surfaces such as water, polished floors and wet streets. They need deferred rendering:

Rust
use neo::pbr::{DefaultOpaqueRendererMethod, ScreenSpaceReflections};

app.insert_resource(DefaultOpaqueRendererMethod::deferred());
commands.spawn((Camera3d::default(), Msaa::Off, ScreenSpaceReflections::default()));

ScreenSpaceReflections adds the depth and deferred prepasses. min_perceptual_roughness and max_perceptual_roughness set which surfaces reflect and how reflection fades with roughness; thickness and linear_steps trade accuracy for speed. Rough reflections are noisier without the bluenoise_texture feature, which NEO's builds don't turn on.

Reflections disappear when the reflected object leaves the screen. For static surroundings, a reflection probe has no such gap; the two combine well. SSR is switched off in web builds. Example: ssr (needs bluenoise_texture and neo_feathers).

Transmission#

Glass, water and other StandardMaterials with specular_transmission sample the screen behind them to refract it. ScreenSpaceTransmission on the camera (in neo::pbr) sets steps, the number of transparent layers seen through each other (default 1; 0 refracts only the environment map), and quality. See Materials. Example: transmission.

Order-independent transparency#

Normally, blended objects are sorted per object, so overlapping transparent meshes can draw in the wrong order. Order-independent transparency (OIT) stores every transparent fragment and sorts them per pixel:

Rust
use neo::core_pipeline::oit::OrderIndependentTransparencySettings;

commands.spawn((Camera3d::default(), Msaa::Off, OrderIndependentTransparencySettings::default()));

It supports AlphaMode::Blend, Premultiplied and Add. sorted_fragment_max_count and fragments_per_pixel_average trade accuracy for memory. Custom materials opt out with Material::enable_oit returning false, or must call oit_draw in their shader. OIT needs storage buffers, so it doesn't run in web builds, and it doesn't work with MSAA. Example: order_independent_transparency (needs neo_feathers).

Next steps#