MotionScript

@motion-script/core


@motion-script/core / ShaderFillCoords

Type Alias: ShaderFillCoords

ShaderFillCoords = "normalized" | "centered" | "local"

Defined in: attributes/shape/sksl-uniforms.ts:48

What fragCoord means inside a shader fill. Realised as a local matrix on the shader (see coordsMatrix), never by rewriting the source — so one compiled program serves every size and every mode.

  • 'normalized'[0,1]² across the fill's resolved bounds. The default.
  • 'centered'(0,0) at the bounds centre with square pixels: y spans [-0.5, 0.5] and x spans ±aspect/2. What anything radial wants.
  • 'local' — raw shape-local logical px, the untransformed coordinate a paint shader is evaluated in. For patterns whose pitch is an authored px size.