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

generateFragmentShader

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

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

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

rotateWithCamera

boolean

Whether nodes rotate with camera

shapeGlobalIds?

number[]

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

Returns

string