Skip to content
sigma.js sigma.js
v4.0.6 Docs Examples GitHub 12.2K

generateFragmentShader

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

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

Generates fragment shader that applies SDF shape and layers.

SDFShape[]

Array of SDF shapes this program supports

FragmentLayer[]

Array of fragment layers

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.

boolean = true

string