splat.volume

A 3D swarm in perspective, recording speed for the ramp resolve.

splat.volume: (
  layout: VolumeRenderLayout,
  cfg: VolumeSplatConfig,
) => (i: number) => void

Import sim from shaders/std and use sim.agentRender.splat.volume.

Example

splat: {kernel: splat.volume(simLayout, {shape: 'dot', outRes: 1024, maxSplatSize: 6, extQ: 2.6, names: {splat: 'swarmSplat', glow: 'swarmGlowProfile', profile: 'swarmProfile'}}), threads: 'agents'}

See also

  • resolve.ramp — Rest-to-excited color from two colors, with optional motion trails.
  • renderAgents.volume — A 3D swarm seen in perspective: nearer particles draw larger and brighter, and the color runs from rest to excited with speed.