Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

generateFragmentShader

generateFragmentShader(shapes, layers, shapeGlobalIds?, antialias?): string

Defined in: packages/sigma/src/rendering/nodes/generator.ts:243

Generates fragment shader that applies SDF shape and layers.

Parameters

shapes

SDFShape[]

Array of SDF shapes this program supports

layers

FragmentLayer[]

Array of fragment layers

shapeGlobalIds?

number[]

Optional array mapping local shape index to global ID (for multi-shape programs)

The node’s shape rotation is applied by the vertex shader (quad geometry), so the fragment SDF query (queryNodeSDF) is rotation-agnostic.

antialias?

boolean = true

Returns

string