/** * Vibrance - Modifies the saturation of desaturated colors, leaving saturated colors unmodified. */ export type VibranceProps = { /** -1 to 1 (-1 is minimum vibrance, 0 is no change, and 1 is maximum vibrance) */ amount?: number; }; export type VibranceUniforms = VibranceProps; /** Vibrance - Modifies the saturation of desaturated colors, leaving saturated colors unmodified. */ export declare const vibrance: { readonly props: VibranceProps; readonly uniforms: VibranceUniforms; readonly name: "vibrance"; readonly uniformTypes: { readonly amount: "f32"; }; readonly propTypes: { readonly amount: { readonly value: 0; readonly min: -1; readonly max: 1; }; }; readonly source: "struct vibranceUniforms {\n amount: f32,\n};\n\n@group(0) @binding(auto) var vibrance: vibranceUniforms;\n\nfn vibrance_filterColor(color: vec4f) -> vec4f {\n let average = (color.r + color.g + color.b) / 3.0;\n let mx = max(color.r, max(color.g, color.b));\n let amt = (mx - average) * (-vibrance.amount * 3.0);\n let resultRgb = mix(color.rgb, vec3f(mx), amt);\n return vec4f(resultRgb, color.a);\n}\n\nfn vibrance_filterColor_ext(color: vec4f, texSize: vec2f, texCoord: vec2f) -> vec4f {\n return vibrance_filterColor(color);\n}\n"; readonly fs: "layout(std140) uniform vibranceUniforms {\n float amount;\n} vibrance;\n\nvec4 vibrance_filterColor(vec4 color) {\n float average = (color.r + color.g + color.b) / 3.0;\n float mx = max(color.r, max(color.g, color.b));\n float amt = (mx - average) * (-vibrance.amount * 3.0);\n color.rgb = mix(color.rgb, vec3(mx), amt);\n return color;\n}\n\nvec4 vibrance_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {\n return vibrance_filterColor(color);\n}\n"; readonly passes: [{ readonly filter: true; }]; }; //# sourceMappingURL=vibrance.d.ts.map