scatter
Scatters every pixel of the child by a random offset: a grainy diffusion, not a smooth blur.
scatter(opts: {amount: ArgSpec; edges: PropRef; chromatic?: PropRef}): GatherEffect
Import effects from shaders/std and use effects.blurs.scatter.
amount is the largest offset in pixels. edges is a prop with transform: transformEdges and compileTime: true ('stretch' | 'transparent' | 'mirror' | 'wrap') that says what to read where an offset lands outside the canvas. chromatic (0–1, optional) scatters red and blue on their own, for a sparkly colour grain; it is off at 0, so give it recompile: crosses(0).
Parameters
| Name | Type | Notes |
|---|---|---|
opts | {amount: ArgSpec; edges: PropRef; chromatic?: PropRef} |
Example
effect: scatter({amount: p('intensity'), edges: p('edges')})
See also
gaussianBlur— A soft, even blur of the child.motionBlur— Smears the child along a path: a straight streak, an arc around a point, or a zoom out of a point.