#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resolution_scale: f32Output scale relative to project dimensions.
max_filter_samples: u32Maximum sampling work available to a filter pass.
motion_blur_subframes: u32Temporal samples used by motion blur implementations.
texture_budget_bytes: u64Soft budget available to reusable GPU textures.
Implementations§
Source§impl QualityProfile
impl QualityProfile
Sourcepub const MAX_RESOLUTION_SCALE: f32 = 8.0
pub const MAX_RESOLUTION_SCALE: f32 = 8.0
Largest supported multiplier for project dimensions.
Sourcepub const MAX_FILTER_SAMPLES: u32 = alpha2_render::RenderQualityControls::MAX_FILTER_SAMPLES
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.
Sourcepub const MAX_MOTION_BLUR_SUBFRAMES: u32 = 256
pub const MAX_MOTION_BLUR_SUBFRAMES: u32 = 256
Largest temporal sample count allocated for one render plan.
Sourcepub const MIN_TEXTURE_BUDGET_BYTES: u64
pub const MIN_TEXTURE_BUDGET_BYTES: u64
Smallest useful reusable-texture pool budget.
Sourcepub const MAX_TEXTURE_BUDGET_BYTES: u64
pub const MAX_TEXTURE_BUDGET_BYTES: u64
Largest accepted reusable-texture pool budget.
Sourcepub const fn with_resolution_scale(self, scale: f32) -> Self
pub const fn with_resolution_scale(self, scale: f32) -> Self
This profile with scale as its multiplier for project dimensions;
Self::validate checks it.
Sourcepub fn validate(self) -> Result<(), EngineError>
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.
Sourcepub fn render_size(
self,
settings: &ProjectSettings,
) -> Result<RenderSize, EngineError>
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.
Sourcepub fn export_size(
self,
settings: &ProjectSettings,
) -> Result<RenderSize, EngineError>
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.
Sourcepub fn benchmark_metadata(
self,
project: impl Into<String>,
settings: &ProjectSettings,
renderer: &Renderer,
) -> Result<BenchmarkMetadata, EngineError>
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
impl Clone for QualityProfile
impl Copy for QualityProfile
Source§impl Debug for QualityProfile
impl Debug for QualityProfile
Source§impl Default for QualityProfile
impl Default for QualityProfile
Source§impl PartialEq for QualityProfile
impl PartialEq for QualityProfile
impl StructuralPartialEq for QualityProfile
Auto Trait Implementations§
impl Freeze for QualityProfile
impl RefUnwindSafe for QualityProfile
impl Send for QualityProfile
impl Sync for QualityProfile
impl Unpin for QualityProfile
impl UnsafeUnpin for QualityProfile
impl UnwindSafe for QualityProfile
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more