GLSL_READ_NODE_COLOR
constGLSL_READ_NODE_COLOR: “\nvec4 readNodeColor(sampler2D nodeDataTexture, int nodeDataTextureWidth, int nodeIndex) {\n int t = nodeIndex * 2 + 1;\n ivec2 coord = ivec2(t % nodeDataTextureWidth, t / nodeDataTextureWidth);\n vec4 texel = texelFetch(nodeDataTexture, coord, 0);\n float r = floor(texel.b / 65536.0);\n float g = floor(mod(texel.b, 65536.0) / 256.0);\n float b = mod(texel.b, 256.0);\n return vec4(r / 255.0, g / 255.0, b / 255.0, texel.a);\n}\n”
Defined in: packages/sigma/src/rendering/glsl.ts:184
Reads a node’s color from the node-data texture (texel 1): .b = RGB packed as r65536 + g256 + b (integer < 2^24, exact in float32) .a = the color’s alpha in [0, 1] Returns a straight-alpha (non-premultiplied) vec4. Same node index as readNodeData.