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

PrePassDefinition

Defined in: packages/sigma/src/rendering/utils.ts:51

Describes an optional transform feedback pre-pass for a program. The pre-pass runs once per instance (POINTS draw with RASTERIZER_DISCARD), writes computed values into a GPU buffer, and the main draw reads them back as per-instance attributes — eliminating redundant per-vertex work.

Properties

floatsPerInstance

floatsPerInstance: number

Defined in: packages/sigma/src/rendering/utils.ts:57

Total floats written per instance (= sum of output attribute sizes).


inputAttributeName

inputAttributeName: string

Defined in: packages/sigma/src/rendering/utils.ts:63

Name of the single float attribute read from the instance buffer (e.g. “a_edgeIndex”).


outputAttributes

outputAttributes: object[]

Defined in: packages/sigma/src/rendering/utils.ts:59

How the output buffer binds as per-instance attributes in the main shader.

floatOffset

floatOffset: number

name

name: string

size

size: number


shaderSource

shaderSource: string

Defined in: packages/sigma/src/rendering/utils.ts:53

Vertex shader source for the pre-pass.


tfVaryingNames

tfVaryingNames: string[]

Defined in: packages/sigma/src/rendering/utils.ts:55

Transform feedback varying names (interleaved into one buffer).


uniformNames

uniformNames: string[]

Defined in: packages/sigma/src/rendering/utils.ts:61

Uniform names the pre-pass needs; the base class looks up their locations.