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

GLSL_READ_NODE_FLAGS

const GLSL_READ_NODE_FLAGS: “\nvec4 readNodeFlags(sampler2D nodeDataTexture, int nodeDataTextureWidth, int nodeIndex) {\n int t = nodeIndex * 2 + 1;\n ivec2 coord = ivec2(t % nodeDataTextureWidth, t / nodeDataTextureWidth);\n return texelFetch(nodeDataTexture, coord, 0);\n}\n”

Defined in: packages/sigma/src/rendering/glsl.ts:169

Reads a node’s rotation-flags texel from the node-data texture (texel 1): .r = nodeRotation (0 = viewport/screen-upright, 1 = graph/turns with camera) .g = labelRotation (0 = viewport, 1 = label orbits with camera) Same node index as readNodeData. Requires GLSL_READ_NODE_DATA’s stride.