cellSample
The color of the layer inside at the centre of each character cell.
cellSample(slots: {grid: FragmentStage}): FragmentStage
Import effects from shaders/std and use effects.stylize.cellSample.
One sample per cell, straight alpha. Feeds glyphFor (to pick the character) and glyphTint (to color it).
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {grid: FragmentStage} |
Example
const cell = cellSample({grid})
See also
charGrid— The character grid: which cell each pixel falls in, and where it sits inside that cell.glyphFor— The character drawn in each cell, picked by how bright the cell is.