import { HSV_VALUES, USE_HSV_MAPPING } from './ShaderConstants';
/**
 * Used to modify the fragments output by materials {@link IfcMaterial} and {@link TransparentIfcMaterial}.
 * If enabled {@link isEnabled} then the following occurs.
 * Each RGB fragment (alpha is untouched) is converted to HSV and multiplied by the corresponding value in {@link multiplier}.
 * The resulting HSV value is then converted back to RGB and output as a fragment, with the original alpha intact.
 * One use case is to set {@link multiplier} `= { s: 1.2, v: 1.5 };` to make colors pop. White becomes whiter, black
 * becomes blacker, red becomes redder etc.
 */
export class IfcFragmentHsvColoringSettings {
    isEnabled;
    /**
     * Multiplier values for HSV coloring.
     */
    multiplier = { h: 1, s: 1.2, v: 1.5 };
    /**
     * Represents the HSV parameters for a loader.
     */
    constructor(
    /**
     * Indicates whether the HSV parameters are enabled.
     */
    isEnabled, 
    /**
     * The HSV multiplier values.
     */
    multiplier) {
        this.isEnabled = isEnabled;
        this.multiplier = { ...this.multiplier, ...(multiplier ?? {}) };
    }
    /**
     * Inserts uniforms and defines into the provided `UniformsAndDefinesAndSamplers` object.
     * If the `isEnabled` flag is true, it adds the HSV values and the USE_HSV_MAPPING define.
     * For internal use only.
     * @internal
     * @hidden
     * @param uniformsAndDefines - The object to insert uniforms and defines into.
     */
    _insertUniformsAndDefines(uniformsAndDefines) {
        if (this.isEnabled) {
            uniformsAndDefines.uniforms.push(HSV_VALUES);
            uniformsAndDefines.defines.push(USE_HSV_MAPPING);
        }
    }
    /**
     * Assigns effect values for the HSV effect. For internal use only.
     * @hidden
     * @internal
     * @param effect - The effect to assign values to.
     */
    _setEffectValues(effect) {
        effect.setFloat3(HSV_VALUES, this.multiplier.h, this.multiplier.s, this.multiplier.v);
    }
}
//# sourceMappingURL=IfcFragmentHsvColoringSettings.js.map