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

GLSL_READ_NODE_DATA

const GLSL_READ_NODE_DATA: “\nuniform float u_minNodeSize;\nvec4 readNodeData(sampler2D nodeDataTexture, int nodeDataTextureWidth, int nodeIndex) {\n int t = nodeIndex * 2;\n ivec2 coord = ivec2(t % nodeDataTextureWidth, t / nodeDataTextureWidth);\n vec4 data = texelFetch(nodeDataTexture, coord, 0);\n data.z = max(data.z, u_minNodeSize);\n return data;\n}\n”

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

Reads a node’s geometry texel (x, y, size, shapeId) from the node-data texture by node index. Shared by every node-data consumer so the two-texel stride lives in exactly one place.

The size is floored to u_minNodeSize (the minNodeSize setting, in node size units: pixels * sizeRatio), so every consumer sees the same size.