pub struct RenderConfig {Show 44 fields
pub bloom_enabled: bool,
pub bloom_intensity: f32,
pub bloom_radius: f32,
pub distortion_enabled: bool,
pub motion_blur_enabled: bool,
pub motion_blur_samples: u32,
pub chromatic_aberration: f32,
pub film_grain: f32,
pub scanlines_enabled: bool,
pub scanline_intensity: f32,
pub exposure: f32,
pub tonemap: f32,
pub halation: f32,
pub saturation: f32,
pub contrast: f32,
pub brightness: f32,
pub vignette: f32,
pub vignette_softness: f32,
pub tint: [f32; 3],
pub lift: [f32; 3],
pub gain: [f32; 3],
pub bloom_threshold: f32,
pub bloom_knee: f32,
pub anamorphic: f32,
pub sharpen: f32,
pub dither: f32,
pub barrel: f32,
pub font_size: u32,
pub fullscreen: bool,
pub render_scale: f32,
pub particle_multiplier: f32,
pub shadow_quality: ShadowQuality,
pub antialiasing: bool,
pub color_depth: u8,
pub global_illumination: bool,
pub volumetric_fog: bool,
pub indirect_light: f32,
pub light_shafts: f32,
pub lens_flare: f32,
pub shake_pixels: f32,
pub fxaa: bool,
pub persistence: f32,
pub vsync: bool,
pub world_ui_in_scene: bool,
}Fields§
§bloom_enabled: bool§bloom_intensity: f32§bloom_radius: f32Bloom radius in pixels (higher = wider glow).
distortion_enabled: bool§motion_blur_enabled: bool§motion_blur_samples: u32Motion blur sample count (2-16).
chromatic_aberration: f32§film_grain: f32§scanlines_enabled: bool§scanline_intensity: f32§exposure: f32Linear exposure, applied before the tonemap. 1.0 is neutral.
tonemap: f32How much of the filmic curve to apply, 0.0 to 1.0.
Without it the image is clipped rather than rolled off, which is what makes a rendered frame look rendered.
halation: f32Warm bleed around bright edges, the way film halates. 0.0 to ~0.5.
saturation: f32§contrast: f32§brightness: f32§vignette: f32Strength of the corner darkening, 0.0 to 1.0.
vignette_softness: f32Where the vignette starts, as a fraction of the way to the corner.
tint: [f32; 3]Colour cast, multiplied over everything.
lift: [f32; 3]Shadows, lifted toward this colour.
gain: [f32; 3]Highlights, multiplied by this colour.
bloom_threshold: f32Nothing dimmer than this blooms. 0.0 blooms everything.
bloom_knee: f32How soft the edge of that threshold is.
anamorphic: f32Horizontal light streaking, the way anamorphic glass flares. 0.0 off.
sharpen: f32Unsharp mask after the tonemap, to put back the edge bloom takes off.
dither: f32Ordered dither before output, in 8-bit steps.
This engine renders very dark scenes, and a dark gradient in eight bits per channel bands visibly. A quarter-step of ordered noise costs nothing and removes it.
barrel: f32Barrel distortion, as a fraction of the frame. Small values only.
font_size: u32§fullscreen: bool§render_scale: f32Render scale (1.0 = native, 0.5 = half res).
particle_multiplier: f32Particle system multiplier (1.0 = full, 0.5 = half particles).
shadow_quality: ShadowQuality§antialiasing: boolEnable anti-aliasing (FXAA approximation for terminal renderer).
color_depth: u8Color depth per channel for dithering: 8, 16, or 32.
global_illumination: boolVoxel-cone global illumination: voxelise the scene, inject light, propagate. Worth it for a lit 3D scene and pure cost for anything else.
This used to run unconditionally, every frame, whatever was on screen — which meant a game drawing its whole interface in the screen-space UI layer paid for a global illumination solve it could never see.
volumetric_fog: boolVolumetric fog. Same story: a real effect, and a real cost, that a scene with nothing in it cannot benefit from.
indirect_light: f32Screen-space indirect light: how strongly matter near something bright is lit by it, in that thing’s colour. 0.0 off; 0.5 to 1.5 is a lit room.
light_shafts: f32Radial light shafts from the source the game sets on engine.fx.
0.0 off; the source’s own strength scales it further.
lens_flare: f32Lens flare ghosts and halo off anything that blooms. 0.0 off; 0.1 to 0.4 is a visible lens without being a screensaver.
shake_pixels: f32How far, in pixels, the world pass moves at full camera trauma. The HUD does not move. 0.0 turns screen shake off for the world pass.
fxaa: boolAnti-aliasing on the finished frame, between the composite and the
HUD. A real FXAA pass, not the terminal approximation antialiasing
names.
persistence: f32Motion trails. The fraction of the previous frame’s scene that survives into this one, 0.0 to about 0.9. Applies to the scene and the UI world pass, never to the HUD.
vsync: boolWait for the display’s vertical refresh before presenting. Off, the loop runs as fast as the GPU allows, which burns power and makes every time-based effect run at whatever rate the machine happens to.
world_ui_in_scene: boolWhether the UI layer’s world pass is painted into the scene buffer. Off, every UI command paints in the HUD pass after post-processing, which is how the layer behaved before the world pass existed.
Implementations§
Source§impl RenderConfig
impl RenderConfig
Trait Implementations§
Source§impl Clone for RenderConfig
impl Clone for RenderConfig
Source§impl Debug for RenderConfig
impl Debug for RenderConfig
Source§impl Default for RenderConfig
impl Default for RenderConfig
Source§impl<'de> Deserialize<'de> for RenderConfig
impl<'de> Deserialize<'de> for RenderConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RenderConfig
impl RefUnwindSafe for RenderConfig
impl Send for RenderConfig
impl Sync for RenderConfig
impl Unpin for RenderConfig
impl UnsafeUnpin for RenderConfig
impl UnwindSafe for RenderConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.