pub enum PostEffect {
Grain {
intensity: f32,
seed: u64,
animated: bool,
},
Vignette {
intensity: f32,
radius: f32,
},
Pixelate {
size: u32,
},
ProgressiveBlur {
direction: BlurDirection,
start: f32,
max_radius: f32,
},
Flash {
at: TimePoint,
color: String,
intensity: f32,
duration: f32,
},
Vhs {
at: TimePoint,
duration: f32,
bands: u32,
offset: f32,
noise: f32,
scanlines: f32,
tracking_line: Option<VhsTrackingLine>,
seed: u64,
},
}Expand description
A post-processing effect applied to the full frame buffer after Skia renders. Effects are pure Rust, deterministic, and applied in declaration order.
Variants§
Grain
Film grain noise overlaid on every pixel.
Fields
Vignette
Darken the frame edges towards the corners.
Fields
Pixelate
Reduce spatial resolution by averaging square pixel blocks.
ProgressiveBlur
Blur that grows from zero at start to max_radius at the frame edge.
Fields
direction: BlurDirectionWhich edge gets the maximum blur. Default: bottom.
Flash
A full-frame flash that decays from intensity to zero over
duration, starting at at — issue #330’s companion to
super::shake::SceneShake: the reference reel this pair was
built for lights one of these on every shake impact, so a beat-grid
at can share the same value the matching
super::shake::ShakeImpact::at uses. at is a TimePoint,
resolved the same way as any other in-scene time (relative to the
scene’s own start unless @-prefixed).
Fields
Vhs
A tape-tear glitch: the frame breaks into horizontal bands slid
sideways, with optional noise, scanlines and a travelling tracking
line. Bounded by at and duration like PostEffect::Flash,
because it reads as a beat rather than as a state — a reference reel
holds it for well under a second on a rewind.
Fields
tracking_line: Option<VhsTrackingLine>A thin coloured line travelling down the frame, as tape tracking error looks. Absent means none.
Trait Implementations§
Source§impl Clone for PostEffect
impl Clone for PostEffect
Source§impl Debug for PostEffect
impl Debug for PostEffect
Source§impl<'de> Deserialize<'de> for PostEffect
impl<'de> Deserialize<'de> for PostEffect
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 PostEffect
impl JsonSchema for PostEffect
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 moreAuto Trait Implementations§
impl Freeze for PostEffect
impl RefUnwindSafe for PostEffect
impl Send for PostEffect
impl Sync for PostEffect
impl Unpin for PostEffect
impl UnsafeUnpin for PostEffect
impl UnwindSafe for PostEffect
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