export function createMatrixInstanceAttribute(buffer, instanceCount, shaderPrefix = "a_instanceMatrix") {
    if (!Number.isInteger(instanceCount) || instanceCount <= 0)
        throw new Error("instanceCount must be a positive integer.");
    const attributes = [0, 1, 2, 3].map((column) => ({
        buffer,
        shaderName: `${shaderPrefix}${column}`,
        components: 4,
        stride: 64,
        offset: column * 16,
        divisor: 1
    }));
    return { attributes, instanceCount };
}
//# sourceMappingURL=Instancing.js.map