• Groups the values of gpgpu data across draw passes and data textures.

    Parameters

    • Optionalmaps: {
          values: any;
          channelsMax: undefined | number;
          buffersMax: undefined | number | false;
          packed: any;
      } = {}

      Initial maps settings; new object if not given.

      • values: any

        An array where each number denotes how many value channels are grouped into one data-texture in one draw pass (where any value map logic isn't handled here); each separate number may be computed across one or more data-textures/passes.

        Each value denotes the number of dependent channels to compute together; separate values denote channels that are independent, and may be drawn in the same or separate passes, depending on settings/support.

        The order may affect the number of textures/passes needed; can maintain order as-is, or use a more efficient packed order. See packValues.

      • channelsMax: undefined | number

        Maximum channels per-texture.

      • buffersMax: undefined | number | false

        Maximum textures that may be bound as buffer outputs per-pass. Maps multiple passes per-step to output all values if they're spread across more textures than this number. Uses one pass and binds no output if given falsey; useful for side-effects with no state outputs, like rendering. See toData.

      • packed: any

        An array of indexes into values packed into an order that best fits into blocks of channelsMax to minimise resources; or falsey to use values in their given order; uses packValues if not given.

    • Optionalto: any = maps

      An object to contain the results; modifies maps if not given.

    Returns any

    to The given to object; how values are grouped per-texture per-pass per-step, meta information, and given parameters.