pub struct PostProcessConfig {Show 32 fields
pub bloom_intensity: f32,
pub bloom_threshold: f32,
pub bloom_knee: f32,
pub exposure_ev: f32,
pub vignette_strength: f32,
pub lut_strength: f32,
pub aa_mode: AaMode,
pub ssao: bool,
pub ssao_radius: f32,
pub ssao_intensity: f32,
pub ssr: bool,
pub ssr_intensity: f32,
pub ssr_max_distance: f32,
pub ray_traced_reflections: bool,
pub reflection_blur_resolution: ReflectionBlurResolution,
pub indirect_lighting: IndirectLighting,
pub ambient_intensity: f32,
pub ssgi_intensity: f32,
pub ssgi_max_distance: f32,
pub ssgi_resolution: SsgiResolution,
pub ssgi_rays: u32,
pub ssgi_steps: u32,
pub auto_exposure: bool,
pub auto_exposure_min_ev: f32,
pub auto_exposure_max_ev: f32,
pub auto_exposure_speed: f32,
pub hdr_display: bool,
pub hdr_pq: bool,
pub temporal_upscaling: bool,
pub upscale_quality: UpscaleQuality,
pub upscale_backend: UpscalerBackend,
pub occlusion_two_pass: bool,
}Expand description
Tunables for the post-process stack. One per world; the first declared
instance wins. With no PostProcessConfig present, the defaults below are
used (bloom on at a moderate intensity).
Colour-LUT grading is a separate ColorLut asset; lut_strength
here is the blend amount applied to whichever ColorLut the world
declares.
When auto_exposure is on, the scene’s average brightness is measured each
frame and exposure adapts toward a balanced mid-tone. The authored
exposure_ev then acts as an additive bias (in stops) on top of the adapted
value.
PostProcessConfig {
bloom_intensity: 0.8,
..Default::default()
};Fields§
§bloom_intensity: f32Additive bloom contribution. 0 skips bloom entirely.
bloom_threshold: f32Brightness threshold for bloom. Pixels brighter than this contribute
fully; pixels within bloom_knee below it ramp in softly.
bloom_knee: f32Width of the soft knee just below bloom_threshold.
exposure_ev: f32Exposure offset in photographic stops. Each +1 doubles scene brightness before bloom and tonemapping; 0 is neutral.
vignette_strength: f32Vignette strength in [0, 1]. 0 disables the corner darkening.
lut_strength: f32Colour-LUT blend in [0, 1]. Mixes the graded colour over the ungraded
one by this amount. Only matters when the world declares a
ColorLut; with none, grading is a no-op at any strength.
aa_mode: AaModeAnti-aliasing mode. fxaa (default) applies a cheap composite-pass edge
filter; taa adds a temporal pass that jitters the projection and
accumulates detail across frames for the cleanest edges, at the cost of a
velocity pre-pass and a history buffer; off disables edge smoothing.
ssao: boolScreen-space ambient occlusion toggle. Darkens creases and contact areas where ambient light is occluded.
ssao_radius: f32How far the ambient-occlusion search reaches for occluders, in world units. Larger values pick up broader, softer occlusion.
ssao_intensity: f32Ambient-occlusion strength, clamped to [0, 4]. 1.0 is the natural
amount; higher values exaggerate the contact darkening.
ssr: boolScreen-space reflection toggle. Mixes reflected scene colour over glossy surfaces (water, polished floors).
ssr_intensity: f32Reflection blend strength, clamped to [0, 1]. Scales the
Fresnel-weighted reflection mixed over the base shading.
ssr_max_distance: f32How far a reflection reaches, in world units. Longer reaches catch more distant reflections, more coarsely.
ray_traced_reflections: boolHardware ray-traced reflection toggle. When the GPU supports ray tracing,
traces real reflection rays so off-screen geometry still appears, instead
of the screen-space method. Reuses the ssr_intensity /
ssr_max_distance tunables and takes precedence over ssr, falling back
to it where ray tracing isn’t available.
reflection_blur_resolution: ReflectionBlurResolutionInternal resolution of the roughness-aware reflection blur the SSR /
ray-traced reflection composite runs. half (default) blurs at a
quarter of the pixels for a large saving and bilinearly upsamples;
full blurs at native resolution; quarter is the cheapest. Smooth
mirror surfaces stay sharp at any setting (the composite keeps the sharp
reflection for low roughness). Only matters when ssr or
ray_traced_reflections is on.
indirect_lighting: IndirectLightingIndirect-diffuse lighting source. ibl (default) uses the environment
map’s ambient alone. ssgi adds a screen-space global-illumination pass
on top, so nearby lit surfaces bleed colour onto one another; the
environment ambient still covers the off-screen / sky fallback.
ambient_intensity: f32Multiplier on the indirect (ambient / IBL) lighting term, clamped to
[0, 16]. 1.0 (default) leaves the environment-derived ambient at its
physical level. Raising it lifts fill light in areas the directional
light cannot reach (shadowed facades, alleys) without brightening
directly lit surfaces, which the sun already dominates. Scales the
diffuse and specular IBL together, so reflections stay consistent with
the brighter ambient. Useful for high-contrast exterior scenes where a
strong sun would otherwise crush shadows to black.
ssgi_intensity: f32Indirect-bounce strength, clamped to [0, 4]. Scales the gathered
indirect light added on top of the existing shading; 0 makes it a no-op.
Only matters when indirect_lighting is ssgi.
ssgi_max_distance: f32How far the indirect-light gather reaches, in world units. A near-field
effect, so it defaults well below ssr_max_distance. Only matters when
indirect_lighting is ssgi.
ssgi_resolution: SsgiResolutionInternal resolution of the SSGI gather. half (default) trades a little
sharpness for a large performance saving; full is native; quarter is
the cheapest. Only matters when indirect_lighting is ssgi.
ssgi_rays: u32Hemisphere rays cast per pixel by the SSGI gather, clamped to [1, 32].
More rays reduce noise at a higher cost. Only matters when
indirect_lighting is ssgi.
ssgi_steps: u32Ray-march samples per SSGI ray, clamped to [1, 64]. More samples catch
finer occlusion at a higher cost. Only matters when indirect_lighting
is ssgi.
auto_exposure: boolAuto-exposure toggle. Adapts exposure each frame toward a balanced
mid-tone. The authored exposure_ev then acts as an additive bias in
stops on top of the adapted value.
auto_exposure_min_ev: f32Lower bound on the adapted exposure (EV). The exposure_ev bias is
applied before this clamp.
auto_exposure_max_ev: f32Upper bound on the adapted exposure (EV).
auto_exposure_speed: f32How quickly exposure chases a new target (per second). Higher converges faster but can pump under flickering content; 1-3 is comfortable.
hdr_display: boolHDR display output toggle. On a capable display, emits extended-range HDR instead of the standard tonemapped output. Falls back to standard output when the display or platform doesn’t support HDR.
hdr_pq: boolPQ (HDR10) output mode. When true, and hdr_display is on, and the
display has HDR headroom, output is PQ-encoded for HDR10 panels. No
effect when hdr_display is off.
temporal_upscaling: boolTemporal upscaling toggle. Renders the 3D scene at a lower resolution
(set by upscale_quality) and reconstructs a full-resolution image,
trading some sharpness for performance. Replaces TAA while on (the taa
flag is ignored).
upscale_quality: UpscaleQualityRender-scale preset for temporal_upscaling; each step progressively
lowers the internal resolution. No effect when temporal_upscaling is
off.
upscale_backend: UpscalerBackendWhich upscaler backend temporal_upscaling uses. auto (default) picks
the best available at runtime (DLSS on NVIDIA RTX, else XeSS, else FSR3);
fsr3 / dlss / xess request a specific one and fall back when it is
unavailable on the current GPU or build. No effect when
temporal_upscaling is off. DLSS and XeSS are DirectX-only.
occlusion_two_pass: boolTwo-pass occlusion culling toggle. Reduces objects popping in a frame late when they’re revealed by camera or occluder motion, at the cost of extra culling work each frame.
Trait Implementations§
Source§impl Clone for PostProcessConfig
impl Clone for PostProcessConfig
Source§fn clone(&self) -> PostProcessConfig
fn clone(&self) -> PostProcessConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for PostProcessConfig
impl Component for PostProcessConfig
Source§const NAME: &'static str = "PostProcessConfig"
const NAME: &'static str = "PostProcessConfig"
Source§fn from_baked(bytes: &[u8]) -> Result<Self, CnResult>
fn from_baked(bytes: &[u8]) -> Result<Self, CnResult>
Source§fn inject_locator(&mut self, _locator: PayloadLocator)
fn inject_locator(&mut self, _locator: PayloadLocator)
Source§fn inject_name(&mut self, _id: AssetId)
fn inject_name(&mut self, _id: AssetId)
Source§impl ComponentSlot for PostProcessConfig
impl ComponentSlot for PostProcessConfig
Source§const DISCRIMINANT: u8
const DISCRIMINANT: u8
ComponentId.Source§fn slot(s: &ComponentStorage) -> &Column<Self>
fn slot(s: &ComponentStorage) -> &Column<Self>
Source§fn slot_mut(s: &mut ComponentStorage) -> &mut Column<Self>
fn slot_mut(s: &mut ComponentStorage) -> &mut Column<Self>
Source§impl Debug for PostProcessConfig
impl Debug for PostProcessConfig
Source§impl Default for PostProcessConfig
impl Default for PostProcessConfig
Source§fn default() -> PostProcessConfig
fn default() -> PostProcessConfig
Source§impl<'de> Deserialize<'de> for PostProcessConfigwhere
PostProcessConfig: Default,
impl<'de> Deserialize<'de> for PostProcessConfigwhere
PostProcessConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PostProcessConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PostProcessConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<PostProcessConfig> for ComponentAsset
impl From<PostProcessConfig> for ComponentAsset
Source§fn from(c: PostProcessConfig) -> Self
fn from(c: PostProcessConfig) -> Self
Source§impl PostProcessResolve for PostProcessConfig
impl PostProcessResolve for PostProcessConfig
Source§fn resolve(&self) -> PostProcessTunables
fn resolve(&self) -> PostProcessTunables
PostProcessTunables:
clamps each tunable and converts exposure_ev (stops) into the linear
multiplier the shaders expect. The composite’s display-output flags are
not authored, so they are absent here: the backend adds them to the full
PostProcessParams once it has negotiated EDR support with the display.Source§fn ambient_intensity(&self) -> f32
fn ambient_intensity(&self) -> f32
ambient_intensity to a safe [0, 16] multiplier the
backend folds into LightUniforms to scale the indirect (ambient / IBL)
term.Source§fn reflection_blur_divisor(&self) -> u32
fn reflection_blur_divisor(&self) -> u32
reflection_blur_resolution. Always at least 1.Source§fn ssao_settings(&self) -> Option<SsaoSettings>
fn ssao_settings(&self) -> Option<SsaoSettings>
SsaoSettings, or None when the
ssao toggle is off so the backend can skip the SSAO passes entirely.Source§fn ssr_settings(&self) -> Option<SsrSettings>
fn ssr_settings(&self) -> Option<SsrSettings>
SsrSettings, or None when the
ssr toggle is off.Source§fn rt_reflection_settings(&self) -> Option<RtReflectionSettings>
fn rt_reflection_settings(&self) -> Option<RtReflectionSettings>
RtReflectionSettings, or None when ray_traced_reflections is off.
Reuses the SSR intensity / distance fields; the backend additionally gates
on GPU ray-tracing support.Source§fn ssgi_settings(&self) -> Option<SsgiSettings>
fn ssgi_settings(&self) -> Option<SsgiSettings>
SsgiSettings, or None when
indirect_lighting is not Ssgi so the backend can skip the SSGI passes.Source§fn auto_exposure_settings(&self) -> Option<AutoExposureSettings>
fn auto_exposure_settings(&self) -> Option<AutoExposureSettings>
AutoExposureSettings, or
None when the toggle is off so the backend can skip the histogram passes.