Image
A picture, one pixel per cell.
- Drawn with
- GLSL + CPU
- Chain
- image
- Code
- @forgeron/shaders: imageMeta, imageGlsl, imageCpu
/01 → What it is
- Reads the picture's pixels from the page (`data.image`), already sized to the frame; on the GPU, a texture of the same pixels.
- A preset alone cannot carry the picture: the demos go through `mountDitheredImage`.
- Both sides: GLSL and CPU, with the same result.
/02 → In the examples
| Example | Chain |
|---|---|
| Image | image → pixelate → image-dither → palette |
/03 → Versions
- /01 Source
the picture, before - /02 Hero
pixel 3 · gain 1.1 - /03 Brighter
pixel 3 · gain 1.5
/04 → Use it
{
"type": "image"
}import { imageMeta, imageGlsl, imageCpu } from "@forgeron/shaders";
// imageMeta: description and params schema (validation, the editor)
// imageGlsl: the GPU side, for bindChain then glPipeline
// imageCpu: the CPU side, for bindChain then runCpuAPI → Options
No settings.
| Option | Type | Default | Description |
|---|