rawSurfaceOf
The canvas like surfaceOf, but always measured against the whole canvas, never a fitted box.
rawSurfaceOf(params: GpuFragmentParams): {uv: Expr; viewport: Expr; aspect: Expr}
Import frames from shaders/std and use frames.rawSurfaceOf.
Use it when a pattern should stay anchored to the canvas as the layer is resized.
Parameters
| Name | Type | Notes |
|---|---|---|
params | GpuFragmentParams |
Example
const {delta, dist} = centredFrame({center: p('center')})(params, rawSurfaceOf(params))
See also
surfaceOf— The canvas a generator paints on: itsuv, itsviewportsize in pixels and itsaspect.