resolve
The step that turns the shared canvas into the output picture and clears it for the next frame.
resolve: { ramp, tint, weightedColor }
Import sim from shaders/std and use sim.agentRender.resolve.
Pair ramp with orientedWorld or volume, tint with pointWorld, weightedColor with relief.
Example
resolve: {kernel: resolve.tint(simLayout, {res: 1024, name: 'motesResolve'}), threads: 'fixed', size: [1024, 1024]}
Tip. Dispatch a resolve with
threads: 'fixed'over the canvas size. It must touch every texel to clear it.
Members
resolve.ramp— Rest-to-excited color from two colors, with optional motion trails.resolve.tint— One color, with an alpha from coverage.resolve.weightedColor— The average of the colors that landed, nearer particles first.
See also
splat— The step that draws every agent into the shared canvas, one variant per kind of agent.renderAgents— How the agents are drawn, as one declared part: a splat (each agent stamps its shape into a shared canvas) paired with the matching resolve (the canvas becomes the output picture).