/**
 *
 * @param {Sampler2D} output
 * @param {Sampler2D} input
 * @param {number[]} vector
 */
export function sampler2d_multiply_vector(output, input, vector) {

    const pixel_count = input.width * input.height;
    const item_size = input.itemSize;

    const input_data = input.data;
    const output_data = output.data;

    for (let i = 0; i < pixel_count; i++) {
        const offset = i * item_size;
        for (let j = 0; j < item_size; j++) {
            const address = offset + j;
            output_data[address] = input_data[address] * vector[j];
        }
    }

}