rasterize(args)

Rasterize quadrille according to upper-left corner vertex array0, bottom-left corner vertex array1, upper-right corner vertex array2, and bottom-right corner vertex array3, using (fragment) shader. Call rasterizeTriangle() on the two non-overlapping triangles entirely covering the quadrille.

Example

edit, then run

Syntax

rasterize(shader, array0, [array1], [array2], [array3])

Parameters

Param Description
shader Function: taking { array: interpolated_data_array, row: i, col: j } params and returning a p5.Color
array0 Array: corner0 attributes to be interpolated
array1 Array: corner1 attributes to be interpolated default is array0
array2 Array: corner2 attributes to be interpolated default is array0
array3 Array: corner3 attributes to be interpolated default is array0
What this page's examples use
p5.quadrille
drawQuadrille createQuadrille
p5.js
createCanvas

Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.