Animated filters

Use a signal on a texture operation to change its inputs during playback. The left texture stays sharp while the right texture blurs and sharpens again. Edit Maximum blur to change the peak radius in texture pixels.

Loading Ebi…
let tile = Texture(size=[2,2], pixels=[Color("blue4"), Color("yellow3"), Color("yellow3"), Color("blue4")])
let pattern = tile.resize(size=[12,12], filter="nearest").tile(size=[72,72])
let max_blur: Number<0, 8, 0.25> = reflect(4, label="Maximum blur")
mut radius = 0
sig filtered = pattern.blur(radius=radius)

<Image src={pattern} width={162pt} position={[-96pt,0pt]}/>
<Image src={filtered} width={162pt} position={[96pt,0pt]}/>
animate(radius, to=max_blur, duration=1.4s, ease="smootherstep")
animate(radius, to=0, duration=1.4s, ease="smootherstep")

Resampling

Keep filter="nearest" when you want hard pixel edges. Try triangle for softer interpolation or lanczos3 for a sharper resize. The output size is an integer pixel pair.

let crisp = tile.resize(size=[72,72], filter="nearest")
let smooth = tile.resize(size=[72,72], filter="triangle")

Layer effects

Use an effect when the filter should run on the rendered layer. The same effects work on an image, video, or material-backed box. GPU effects

mut exposure = 0
<Image src={pattern} width={180pt} effects={[Effect.color_correction(exposure=exposure)]}/>
animate(exposure, to=1, duration=1.4s, ease="smootherstep")