Skip to main content

QualityProfile

Struct QualityProfile 

Source
#[non_exhaustive]
pub struct QualityProfile { pub resolution_scale: f32, pub max_filter_samples: u32, pub motion_blur_subframes: u32, pub texture_budget_bytes: u64, }
Expand description

Runtime quality controls shared by real-time playback and export.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§resolution_scale: f32

Output scale relative to project dimensions.

§max_filter_samples: u32

Maximum sampling work available to a filter pass.

§motion_blur_subframes: u32

Temporal samples used by motion blur implementations.

§texture_budget_bytes: u64

Soft budget available to reusable GPU textures.

Implementations§

Source§

impl QualityProfile

Source

pub const MAX_RESOLUTION_SCALE: f32 = 8.0

Largest supported multiplier for project dimensions.

Source

pub const MAX_FILTER_SAMPLES: u32 = alpha2_render::RenderQualityControls::MAX_FILTER_SAMPLES

Largest per-pass filter sampling budget: the most any pass takes (alpha2_render::RenderQualityControls::MAX_FILTER_SAMPLES). A Tier-B renderer applies less, and reports it.

Source

pub const MAX_MOTION_BLUR_SUBFRAMES: u32 = 256

Largest temporal sample count allocated for one render plan.

Source

pub const MIN_TEXTURE_BUDGET_BYTES: u64

Smallest useful reusable-texture pool budget.

Source

pub const MAX_TEXTURE_BUDGET_BYTES: u64

Largest accepted reusable-texture pool budget.

Source

pub const fn export() -> Self

Full-resolution deterministic export defaults.

Source

pub const fn preview() -> Self

Responsive half-resolution playback defaults.

Source

pub const fn with_resolution_scale(self, scale: f32) -> Self

This profile with scale as its multiplier for project dimensions; Self::validate checks it.

Source

pub fn validate(self) -> Result<(), EngineError>

Checks that all controls are finite and within runtime-safe bounds.

§Errors

Returns EngineError::InvalidQualityProfile for out-of-range values.

Source

pub fn render_size( self, settings: &ProjectSettings, ) -> Result<RenderSize, EngineError>

Resolves scaled project dimensions, rounding to the nearest pixel.

§Errors

Returns EngineError for an invalid profile or unrepresentable size.

Source

pub fn export_size( self, settings: &ProjectSettings, ) -> Result<RenderSize, EngineError>

The size of the 4:2:0 frames an export at this profile renders: the render size, which must be even in both dimensions. Every export entry point refuses an odd one with this before it renders, so the error names the nearest even size instead of the readback failing deep inside the GPU work.

§Errors

Returns EngineError::OddExportDimensions, or what Self::render_size returns.

Source

pub fn benchmark_metadata( self, project: impl Into<String>, settings: &ProjectSettings, renderer: &Renderer, ) -> Result<BenchmarkMetadata, EngineError>

Captures project, adapter, driver, backend, and quality facts for a benchmark.

§Errors

Returns EngineError when the profile cannot resolve output dimensions.

Trait Implementations§

Source§

impl Clone for QualityProfile

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 QualityProfile

Source§

impl Debug for QualityProfile

Source§

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

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

impl Default for QualityProfile

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for QualityProfile

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 QualityProfile

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,