Documentation
    Preparing search index...

    Function encodePickId

    • Encodes table index index as the RGBA colour its id draw writes: the value index + 1 split into four bytes, little-endian, each scaled to [0, 1] (RFC 0005 §3).

      Byte k of the value goes to component k, so decodePickId over the read-back bytes is exact: an 8-bit UNORM attachment stores b / 255 as precisely b.

      Writes into out (4 floats) rather than allocating — the backend uploads from one scratch per pass.

      Parameters

      • index: number
      • out: Float32Array

      Returns void