Heat
The dither field's slow heat, rising from the bottom right.
- Drawn with
- CPU only
- Chain
- heat → ordered → palette
- Code
- @forgeron/shaders: heatMeta, heatCpu
/01 → What it is
- Two slow waves stir a heat that rises from the bottom right corner.
- CPU only, about 12 frames a second: the field steps, it does not glide.
- CPU only: a preset with it runs on a 2D canvas.
/02 → In the examples
No example uses it yet: only its own built-in preset.
/03 → Versions
- /01 Live
every setting, on "dither-field"
/04 → Use it
{
"type": "heat"
}import { heatMeta, heatCpu } from "@forgeron/shaders";
// heatMeta: description and params schema (validation, the editor)
// heatCpu: the CPU side, for bindChain then runCpu{
"$schema": "https://shaders.forgeron.sh/schema/preset.v1.json",
"version": 1,
"name": "dither-field",
"source": {
"type": "heat"
},
"passes": [
{
"type": "ordered",
"matrix": 8,
"centered": true,
"origin": "top",
"steps": [
[
0,
0.9
],
[
0.45,
1
]
]
},
{
"type": "palette",
"tones": [
{
"var": "--bg",
"fallback": "#0a0a0a"
},
{
"var": "--line-strong",
"fallback": "#2e2e2e"
},
{
"var": "--accent",
"fallback": "#ff4f1f"
}
],
"transparent": []
}
]
}import { builtInPresets } from "@forgeron/shaders";
import { mountPreset } from "@forgeron/shaders/dom";
// On the CPU: a step has no GLSL. Validated first.
const handle = mountPreset(canvas, builtInPresets()["dither-field"]);
// later: handle?.destroy();import { builtInPresets, chainOf, runCpu, toRgba } from "@forgeron/shaders";
// The CPU side of every step: RGBA bytes for a PNG, or tone paths for an SVG (toSvgPath).
const rgba = toRgba(runCpu(chainOf(builtInPresets()["dither-field"]), 320, 200, { time: 1.7 }));API → Options
No settings.
| Option | Type | Default | Description |
|---|