import { RedIntegerFormat, RGBAIntegerFormat, RGIntegerFormat } from "three";
import { GL_RGBIntegerFormat } from "./GL_RGBIntegerFormat.js";

export function channelCountToThreIntegerTextureType(channel_count) {
    switch (channel_count) {
        case 1:
            return RedIntegerFormat;
        case 2:
            return RGIntegerFormat;
        case 3:
            return GL_RGBIntegerFormat;
        case 4:
            return RGBAIntegerFormat;
        default:
            throw new Error(`Unsupported channel count '${channel_count}'`);
    }
}
