resolve.ramp

Rest-to-excited color from two colors, with optional motion trails.

resolve.ramp: (
  layout: RampResolveLayout,
  cfg: RampResolveConfig,
) => (x: number, y: number) => void

Import sim from shaders/std and use sim.agentRender.resolve.ramp.

Example

resolve: {kernel: resolve.ramp(simLayout, {colorSpace: 2, res: 1024, invGain: 1 / 255, trails: 'on', name: 'boidsResolve'}), threads: 'fixed', size: [1024, 1024]}

See also

  • splat.orientedWorld — Agents with a heading: arrows, streaks, squares, dots or comets drawn along the way they point.
  • splat.volume — A 3D swarm in perspective, recording speed for the ramp resolve.