Skip to main content

RenderQualityConfig

Struct RenderQualityConfig 

Source
pub struct RenderQualityConfig { /* private fields */ }
Expand description

Complete runtime-adjustable AAA 3D rendering, resolution, LOD, streaming, and ray-tracing configuration.

Implementations§

Source§

impl RenderQualityConfig

Preset builders and live dynamic resolution scaling for RenderQualityConfig.

Source

pub fn from_preset(preset: QualityPreset) -> Self

Builds a complete runtime graphics configuration tuned for preset.

§Arguments
  • QualityPreset - Desired master quality tier.
§Returns
  • Self - Tuned runtime configuration.
Source

pub fn for_target_hz(preset: QualityPreset, target_hz: f32) -> Self

Builds a quality preset tuned with Dynamic Resolution Scaling targeting target_hz (e.g. 60.0, 120.0, 240.0, 360.0, 480.0).

§Arguments
  • QualityPreset - Base master quality tier.
  • f32 - Desired display refresh target in Hz (clamped to 30.0..=1000.0).
§Returns
  • Self - Quality configuration with DRS enabled for target_hz.
Source

pub fn with_drs_target_hz(self, target_hz: f32) -> Self

Enables Dynamic Resolution Scaling targeting target_hz (240.0/360.0/480.0 Hz supported up to 1000.0 Hz).

§Arguments
  • Self - Base configuration.
  • f32 - Target refresh rate in Hz.
§Returns
  • Self - Updated configuration with DRS enabled and target FPS configured.
Source

pub fn adjust_dynamic_resolution(&mut self, frame_ms: f32)

Dynamically adapts resolution_scale based on measured frame_ms when DRS is enabled.

§Arguments
  • &Self - Mutable configuration.
  • f32 - Measured render duration of the previous frame in milliseconds.
Source§

impl RenderQualityConfig

Source

pub fn get_preset(&self) -> QualityPreset

Source

pub fn get_mut_preset(&mut self) -> &mut QualityPreset

Source

pub fn set_preset(&mut self, val: QualityPreset) -> &mut Self

Source

pub fn get_resolution_preset(&self) -> ResolutionPreset

Source

pub fn get_mut_resolution_preset(&mut self) -> &mut ResolutionPreset

Source

pub fn set_resolution_preset(&mut self, val: ResolutionPreset) -> &mut Self

Source

pub fn get_resolution_scale(&self) -> f32

Source

pub fn get_mut_resolution_scale(&mut self) -> &mut f32

Source

pub fn set_resolution_scale(&mut self, val: f32) -> &mut Self

Source

pub fn get_dynamic_resolution(&self) -> bool

Source

pub fn get_mut_dynamic_resolution(&mut self) -> &mut bool

Source

pub fn set_dynamic_resolution(&mut self, val: bool) -> &mut Self

Source

pub fn get_target_fps(&self) -> f32

Source

pub fn get_mut_target_fps(&mut self) -> &mut f32

Source

pub fn set_target_fps(&mut self, val: f32) -> &mut Self

Source

pub fn get_ray_tracing(&self) -> RayTracingMode

Source

pub fn get_mut_ray_tracing(&mut self) -> &mut RayTracingMode

Source

pub fn set_ray_tracing(&mut self, val: RayTracingMode) -> &mut Self

Source

pub fn get_reflection_bounces(&self) -> u8

Source

pub fn get_mut_reflection_bounces(&mut self) -> &mut u8

Source

pub fn set_reflection_bounces(&mut self, val: u8) -> &mut Self

Source

pub fn get_upscaler(&self) -> UpscalerMode

Source

pub fn get_mut_upscaler(&mut self) -> &mut UpscalerMode

Source

pub fn set_upscaler(&mut self, val: UpscalerMode) -> &mut Self

Source

pub fn get_anti_aliasing(&self) -> AntiAliasingMode

Source

pub fn get_mut_anti_aliasing(&mut self) -> &mut AntiAliasingMode

Source

pub fn set_anti_aliasing(&mut self, val: AntiAliasingMode) -> &mut Self

Source

pub fn get_draw_distance(&self) -> f32

Source

pub fn get_mut_draw_distance(&mut self) -> &mut f32

Source

pub fn set_draw_distance(&mut self, val: f32) -> &mut Self

Source

pub fn get_lod_bias(&self) -> f32

Source

pub fn get_mut_lod_bias(&mut self) -> &mut f32

Source

pub fn set_lod_bias(&mut self, val: f32) -> &mut Self

Source

pub fn get_frustum_culling(&self) -> bool

Source

pub fn get_mut_frustum_culling(&mut self) -> &mut bool

Source

pub fn set_frustum_culling(&mut self, val: bool) -> &mut Self

Source

pub fn get_chunk_streaming(&self) -> bool

Source

pub fn get_mut_chunk_streaming(&mut self) -> &mut bool

Source

pub fn set_chunk_streaming(&mut self, val: bool) -> &mut Self

Source

pub fn get_volumetric_fog(&self) -> bool

Source

pub fn get_mut_volumetric_fog(&mut self) -> &mut bool

Source

pub fn set_volumetric_fog(&mut self, val: bool) -> &mut Self

Source

pub fn get_gpu_instancing(&self) -> bool

Source

pub fn get_mut_gpu_instancing(&mut self) -> &mut bool

Source

pub fn set_gpu_instancing(&mut self, val: bool) -> &mut Self

Trait Implementations§

Source§

impl Clone for RenderQualityConfig

Source§

fn clone(&self) -> Self

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 RenderQualityConfig

Source§

impl Debug for RenderQualityConfig

Source§

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

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

impl Default for RenderQualityConfig

Default High AAA quality configuration with BVH ray-traced shadows and DRS enabled.

Source§

fn default() -> Self

Builds the default High runtime graphics profile.

§Returns
  • Self - High quality graphics configuration.
Source§

impl PartialEq for RenderQualityConfig

Source§

fn eq(&self, other: &Self) -> 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 RenderQualityConfig

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<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.