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