chalkSketch

The chalk-drawing look: edges become chalk strokes and dark areas fill with cross-hatching.

chalkSketch(slots: {
    edges: SobelRing
    sensitivity: PropRef
    hatchScale: PropRef
    shading: PropRef
    grain: PropRef
    board: PropRef
    chalk: PropRef
}): GatherEffect

Import effects from shaders/std and use effects.stylize.chalkSketch.

Closes the recipe and returns the effect for effect:. sensitivity (0 to 1) sets how faint an edge still draws. hatchScale is the hatch line spacing in device pixels. shading (0 to 1) is how much cross-hatch fills the dark regions and grain (0 to 1) how dusty the strokes are. board and chalk are colors. Alpha follows the layer inside.

Parameters

NameTypeNotes
slots`{
edges: SobelRing
sensitivity: PropRef
hatchScale: PropRef
shading: PropRef
grain: PropRef
board: PropRef
chalk: PropRef

}` | |

Example

effect: chalkSketch({edges: sobelTaps({spacing: p('edgeThickness')}), sensitivity: p('edgeSensitivity'), hatchScale: p('hatchScale'), shading: p('shading'), grain: p('grain'), board: p('boardColor'), chalk: p('chalkColor')})

See also

  • sobelTaps — Eight brightness samples in a ring around each pixel, for finding edges.
  • linework — The engraving look: the layer inside redrawn as ink lines that swell where it is dark.

Used by

Chalkboard