resolveScalar
A Scalar or prop ref as a GPU value, for a hand-written builder.
resolveScalar(input: Scalar | ScalarSource, params: SlotParams): Expr
Import resolveScalar from shaders/std.
Products (.times()), radial masks and signals are built out here. A radial mask needs a paint: or effect: host; it throws in a warp's map:.
Parameters
| Name | Type | Notes |
|---|---|---|
input | Scalar | ScalarSource | |
params | SlotParams |
Example
const amount = resolveScalar(radialMask({center: p('center'), radius: p('radius'), falloff: p('falloff')}).times(p('intensity')), params)
See also
uniformOf— The live GPU value of a prop, for a hand-written builder:uniformOf(p('radius'), params).resolveArg— Any input value a word accepts (a prop ref, aScalar, a context token, a number) as a GPU value inside a filter's builder.Scalar— A number built from props: whatradialMask(…),motion.oscillating(…)and.times()return.