pub struct MotionBlurConfig {
pub intensity: f32,
pub samples: u32,
pub shutter: f64,
}Expand description
Motion blur configuration.
Ghost nodes are sampled at times t - i * (shutter / fps) / samples for
i in 1..=samples. Each ghost and the principal node are painted with
opacity 1.0 / (samples + 1) so their premultiplied-alpha sum approximates
the shutter-averaged exposure.
samples = 1 is the degenerate case: the single ghost falls at t - 0 and
superimposes exactly on the principal → visually equivalent to no blur.
Fields§
§intensity: f32Reserved for future intensity scaling (currently unused by the ghost
sampler — the samples parameter controls quality). Kept for schema
compatibility with existing JSON that may carry this field.
samples: u32Number of ghost samples in the shutter window (default 6, clamped 1..=16). Use 1 to effectively disable (degenerate: ghost = principal position).
shutter: f64Fraction of one frame duration used as the shutter window (default 0.5).
The temporal spread equals shutter / fps seconds.
Trait Implementations§
Source§impl Clone for MotionBlurConfig
impl Clone for MotionBlurConfig
Source§fn clone(&self) -> MotionBlurConfig
fn clone(&self) -> MotionBlurConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MotionBlurConfig
impl Debug for MotionBlurConfig
Source§impl<'de> Deserialize<'de> for MotionBlurConfig
impl<'de> Deserialize<'de> for MotionBlurConfig
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>,
Source§impl JsonSchema for MotionBlurConfig
impl JsonSchema for MotionBlurConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for MotionBlurConfig
impl PartialEq for MotionBlurConfig
Source§impl Serialize for MotionBlurConfig
impl Serialize for MotionBlurConfig
impl StructuralPartialEq for MotionBlurConfig
Auto Trait Implementations§
impl Freeze for MotionBlurConfig
impl RefUnwindSafe for MotionBlurConfig
impl Send for MotionBlurConfig
impl Sync for MotionBlurConfig
impl Unpin for MotionBlurConfig
impl UnsafeUnpin for MotionBlurConfig
impl UnwindSafe for MotionBlurConfig
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
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> 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