dfd1d12d36754c98cdc700bd3ccd315d3b72c6fb977b23785021893d3bfa08de.json 54 KB

1
  1. {"ast":null,"code":"import { __decorate } from \"../tslib.es6.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\nimport { PrepareUniformsForColorCurves } from \"./colorCurves.functions.js\";\n/**\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\n */\nexport class ColorCurves {\n constructor() {\n this._dirty = true;\n this._tempColor = new Color4(0, 0, 0, 0);\n this._globalCurve = new Color4(0, 0, 0, 0);\n this._highlightsCurve = new Color4(0, 0, 0, 0);\n this._midtonesCurve = new Color4(0, 0, 0, 0);\n this._shadowsCurve = new Color4(0, 0, 0, 0);\n this._positiveCurve = new Color4(0, 0, 0, 0);\n this._negativeCurve = new Color4(0, 0, 0, 0);\n this._globalHue = 30;\n this._globalDensity = 0;\n this._globalSaturation = 0;\n this._globalExposure = 0;\n this._highlightsHue = 30;\n this._highlightsDensity = 0;\n this._highlightsSaturation = 0;\n this._highlightsExposure = 0;\n this._midtonesHue = 30;\n this._midtonesDensity = 0;\n this._midtonesSaturation = 0;\n this._midtonesExposure = 0;\n this._shadowsHue = 30;\n this._shadowsDensity = 0;\n this._shadowsSaturation = 0;\n this._shadowsExposure = 0;\n }\n /**\n * Gets the global Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get globalHue() {\n return this._globalHue;\n }\n /**\n * Sets the global Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set globalHue(value) {\n this._globalHue = value;\n this._dirty = true;\n }\n /**\n * Gets the global Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get globalDensity() {\n return this._globalDensity;\n }\n /**\n * Sets the global Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set globalDensity(value) {\n this._globalDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the global Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get globalSaturation() {\n return this._globalSaturation;\n }\n /**\n * Sets the global Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set globalSaturation(value) {\n this._globalSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the global Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get globalExposure() {\n return this._globalExposure;\n }\n /**\n * Sets the global Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set globalExposure(value) {\n this._globalExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get highlightsHue() {\n return this._highlightsHue;\n }\n /**\n * Sets the highlights Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set highlightsHue(value) {\n this._highlightsHue = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get highlightsDensity() {\n return this._highlightsDensity;\n }\n /**\n * Sets the highlights Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set highlightsDensity(value) {\n this._highlightsDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get highlightsSaturation() {\n return this._highlightsSaturation;\n }\n /**\n * Sets the highlights Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set highlightsSaturation(value) {\n this._highlightsSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get highlightsExposure() {\n return this._highlightsExposure;\n }\n /**\n * Sets the highlights Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set highlightsExposure(value) {\n this._highlightsExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get midtonesHue() {\n return this._midtonesHue;\n }\n /**\n * Sets the midtones Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set midtonesHue(value) {\n this._midtonesHue = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get midtonesDensity() {\n return this._midtonesDensity;\n }\n /**\n * Sets the midtones Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set midtonesDensity(value) {\n this._midtonesDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get midtonesSaturation() {\n return this._midtonesSaturation;\n }\n /**\n * Sets the midtones Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set midtonesSaturation(value) {\n this._midtonesSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get midtonesExposure() {\n return this._midtonesExposure;\n }\n /**\n * Sets the midtones Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set midtonesExposure(value) {\n this._midtonesExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get shadowsHue() {\n return this._shadowsHue;\n }\n /**\n * Sets the shadows Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set shadowsHue(value) {\n this._shadowsHue = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get shadowsDensity() {\n return this._shadowsDensity;\n }\n /**\n * Sets the shadows Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set shadowsDensity(value) {\n this._shadowsDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get shadowsSaturation() {\n return this._shadowsSaturation;\n }\n /**\n * Sets the shadows Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set shadowsSaturation(value) {\n this._shadowsSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get shadowsExposure() {\n return this._shadowsExposure;\n }\n /**\n * Sets the shadows Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set shadowsExposure(value) {\n this._shadowsExposure = value;\n this._dirty = true;\n }\n /**\n * Returns the class name\n * @returns The class name\n */\n getClassName() {\n return \"ColorCurves\";\n }\n /**\n * Binds the color curves to the shader.\n * @param colorCurves The color curve to bind\n * @param effect The effect to bind to\n * @param positiveUniform The positive uniform shader parameter\n * @param neutralUniform The neutral uniform shader parameter\n * @param negativeUniform The negative uniform shader parameter\n */\n static Bind(colorCurves, effect, positiveUniform = \"vCameraColorCurvePositive\", neutralUniform = \"vCameraColorCurveNeutral\", negativeUniform = \"vCameraColorCurveNegative\") {\n if (colorCurves._dirty) {\n colorCurves._dirty = false;\n // Fill in global info.\n colorCurves._getColorGradingDataToRef(colorCurves._globalHue, colorCurves._globalDensity, colorCurves._globalSaturation, colorCurves._globalExposure, colorCurves._globalCurve);\n // Compute highlights info.\n colorCurves._getColorGradingDataToRef(colorCurves._highlightsHue, colorCurves._highlightsDensity, colorCurves._highlightsSaturation, colorCurves._highlightsExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._highlightsCurve);\n // Compute midtones info.\n colorCurves._getColorGradingDataToRef(colorCurves._midtonesHue, colorCurves._midtonesDensity, colorCurves._midtonesSaturation, colorCurves._midtonesExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._midtonesCurve);\n // Compute shadows info.\n colorCurves._getColorGradingDataToRef(colorCurves._shadowsHue, colorCurves._shadowsDensity, colorCurves._shadowsSaturation, colorCurves._shadowsExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._shadowsCurve);\n // Compute deltas (neutral is midtones).\n colorCurves._highlightsCurve.subtractToRef(colorCurves._midtonesCurve, colorCurves._positiveCurve);\n colorCurves._midtonesCurve.subtractToRef(colorCurves._shadowsCurve, colorCurves._negativeCurve);\n }\n if (effect) {\n effect.setFloat4(positiveUniform, colorCurves._positiveCurve.r, colorCurves._positiveCurve.g, colorCurves._positiveCurve.b, colorCurves._positiveCurve.a);\n effect.setFloat4(neutralUniform, colorCurves._midtonesCurve.r, colorCurves._midtonesCurve.g, colorCurves._midtonesCurve.b, colorCurves._midtonesCurve.a);\n effect.setFloat4(negativeUniform, colorCurves._negativeCurve.r, colorCurves._negativeCurve.g, colorCurves._negativeCurve.b, colorCurves._negativeCurve.a);\n }\n }\n /**\n * Returns color grading data based on a hue, density, saturation and exposure value.\n * @param hue\n * @param density\n * @param saturation The saturation.\n * @param exposure The exposure.\n * @param result The result data container.\n */\n _getColorGradingDataToRef(hue, density, saturation, exposure, result) {\n if (hue == null) {\n return;\n }\n hue = ColorCurves._Clamp(hue, 0, 360);\n density = ColorCurves._Clamp(density, -100, 100);\n saturation = ColorCurves._Clamp(saturation, -100, 100);\n exposure = ColorCurves._Clamp(exposure, -100, 100);\n // Remap the slider/config filter density with non-linear mapping and also scale by half\n // so that the maximum filter density is only 50% control. This provides fine control\n // for small values and reasonable range.\n density = ColorCurves._ApplyColorGradingSliderNonlinear(density);\n density *= 0.5;\n exposure = ColorCurves._ApplyColorGradingSliderNonlinear(exposure);\n if (density < 0) {\n density *= -1;\n hue = (hue + 180) % 360;\n }\n ColorCurves._FromHSBToRef(hue, density, 50 + 0.25 * exposure, result);\n result.scaleToRef(2, result);\n result.a = 1 + 0.01 * saturation;\n }\n /**\n * Takes an input slider value and returns an adjusted value that provides extra control near the centre.\n * @param value The input slider value in range [-100,100].\n * @returns Adjusted value.\n */\n static _ApplyColorGradingSliderNonlinear(value) {\n value /= 100;\n let x = Math.abs(value);\n x = Math.pow(x, 2);\n if (value < 0) {\n x *= -1;\n }\n x *= 100;\n return x;\n }\n /**\n * Returns an RGBA Color4 based on Hue, Saturation and Brightness (also referred to as value, HSV).\n * @param hue The hue (H) input.\n * @param saturation The saturation (S) input.\n * @param brightness The brightness (B) input.\n * @param result\n * @result An RGBA color represented as Vector4.\n */\n static _FromHSBToRef(hue, saturation, brightness, result) {\n let h = ColorCurves._Clamp(hue, 0, 360);\n const s = ColorCurves._Clamp(saturation / 100, 0, 1);\n const v = ColorCurves._Clamp(brightness / 100, 0, 1);\n if (s === 0) {\n result.r = v;\n result.g = v;\n result.b = v;\n } else {\n // sector 0 to 5\n h /= 60;\n const i = Math.floor(h);\n // fractional part of h\n const f = h - i;\n const p = v * (1 - s);\n const q = v * (1 - s * f);\n const t = v * (1 - s * (1 - f));\n switch (i) {\n case 0:\n result.r = v;\n result.g = t;\n result.b = p;\n break;\n case 1:\n result.r = q;\n result.g = v;\n result.b = p;\n break;\n case 2:\n result.r = p;\n result.g = v;\n result.b = t;\n break;\n case 3:\n result.r = p;\n result.g = q;\n result.b = v;\n break;\n case 4:\n result.r = t;\n result.g = p;\n result.b = v;\n break;\n default:\n // case 5:\n result.r = v;\n result.g = p;\n result.b = q;\n break;\n }\n }\n result.a = 1;\n }\n /**\n * Returns a value clamped between min and max\n * @param value The value to clamp\n * @param min The minimum of value\n * @param max The maximum of value\n * @returns The clamped value.\n */\n static _Clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n }\n /**\n * Clones the current color curve instance.\n * @returns The cloned curves\n */\n clone() {\n return SerializationHelper.Clone(() => new ColorCurves(), this);\n }\n /**\n * Serializes the current color curve instance to a json representation.\n * @returns a JSON representation\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses the color curve from a json representation.\n * @param source the JSON source to parse\n * @returns The parsed curves\n */\n static Parse(source) {\n return SerializationHelper.Parse(() => new ColorCurves(), source, null, null);\n }\n}\n/**\n * Prepare the list of uniforms associated with the ColorCurves effects.\n * @param uniformsList The list of uniforms used in the effect\n */\nColorCurves.PrepareUniforms = PrepareUniformsForColorCurves;\n__decorate([serialize()], ColorCurves.prototype, \"_globalHue\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_globalDensity\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_globalSaturation\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_globalExposure\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_highlightsHue\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_highlightsDensity\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_highlightsSaturation\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_highlightsExposure\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_midtonesHue\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_midtonesDensity\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_midtonesSaturation\", void 0);\n__decorate([serialize()], ColorCurves.prototype, \"_midtonesExposure\", void 0);\n// References the dependencies.\nSerializationHelper._ColorCurvesParser = ColorCurves.Parse;","map":{"version":3,"names":["__decorate","serialize","Color4","SerializationHelper","PrepareUniformsForColorCurves","ColorCurves","constructor","_dirty","_tempColor","_globalCurve","_highlightsCurve","_midtonesCurve","_shadowsCurve","_positiveCurve","_negativeCurve","_globalHue","_globalDensity","_globalSaturation","_globalExposure","_highlightsHue","_highlightsDensity","_highlightsSaturation","_highlightsExposure","_midtonesHue","_midtonesDensity","_midtonesSaturation","_midtonesExposure","_shadowsHue","_shadowsDensity","_shadowsSaturation","_shadowsExposure","globalHue","value","globalDensity","globalSaturation","globalExposure","highlightsHue","highlightsDensity","highlightsSaturation","highlightsExposure","midtonesHue","midtonesDensity","midtonesSaturation","midtonesExposure","shadowsHue","shadowsDensity","shadowsSaturation","shadowsExposure","getClassName","Bind","colorCurves","effect","positiveUniform","neutralUniform","negativeUniform","_getColorGradingDataToRef","multiplyToRef","subtractToRef","setFloat4","r","g","b","a","hue","density","saturation","exposure","result","_Clamp","_ApplyColorGradingSliderNonlinear","_FromHSBToRef","scaleToRef","x","Math","abs","pow","brightness","h","s","v","i","floor","f","p","q","t","min","max","clone","Clone","Serialize","Parse","source","PrepareUniforms","prototype","_ColorCurvesParser"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/colorCurves.js"],"sourcesContent":["import { __decorate } from \"../tslib.es6.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { Color4 } from \"../Maths/math.color.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\nimport { PrepareUniformsForColorCurves } from \"./colorCurves.functions.js\";\n/**\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\n */\nexport class ColorCurves {\n constructor() {\n this._dirty = true;\n this._tempColor = new Color4(0, 0, 0, 0);\n this._globalCurve = new Color4(0, 0, 0, 0);\n this._highlightsCurve = new Color4(0, 0, 0, 0);\n this._midtonesCurve = new Color4(0, 0, 0, 0);\n this._shadowsCurve = new Color4(0, 0, 0, 0);\n this._positiveCurve = new Color4(0, 0, 0, 0);\n this._negativeCurve = new Color4(0, 0, 0, 0);\n this._globalHue = 30;\n this._globalDensity = 0;\n this._globalSaturation = 0;\n this._globalExposure = 0;\n this._highlightsHue = 30;\n this._highlightsDensity = 0;\n this._highlightsSaturation = 0;\n this._highlightsExposure = 0;\n this._midtonesHue = 30;\n this._midtonesDensity = 0;\n this._midtonesSaturation = 0;\n this._midtonesExposure = 0;\n this._shadowsHue = 30;\n this._shadowsDensity = 0;\n this._shadowsSaturation = 0;\n this._shadowsExposure = 0;\n }\n /**\n * Gets the global Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get globalHue() {\n return this._globalHue;\n }\n /**\n * Sets the global Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set globalHue(value) {\n this._globalHue = value;\n this._dirty = true;\n }\n /**\n * Gets the global Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get globalDensity() {\n return this._globalDensity;\n }\n /**\n * Sets the global Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set globalDensity(value) {\n this._globalDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the global Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get globalSaturation() {\n return this._globalSaturation;\n }\n /**\n * Sets the global Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set globalSaturation(value) {\n this._globalSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the global Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get globalExposure() {\n return this._globalExposure;\n }\n /**\n * Sets the global Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set globalExposure(value) {\n this._globalExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get highlightsHue() {\n return this._highlightsHue;\n }\n /**\n * Sets the highlights Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set highlightsHue(value) {\n this._highlightsHue = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get highlightsDensity() {\n return this._highlightsDensity;\n }\n /**\n * Sets the highlights Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set highlightsDensity(value) {\n this._highlightsDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get highlightsSaturation() {\n return this._highlightsSaturation;\n }\n /**\n * Sets the highlights Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set highlightsSaturation(value) {\n this._highlightsSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the highlights Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get highlightsExposure() {\n return this._highlightsExposure;\n }\n /**\n * Sets the highlights Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set highlightsExposure(value) {\n this._highlightsExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get midtonesHue() {\n return this._midtonesHue;\n }\n /**\n * Sets the midtones Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set midtonesHue(value) {\n this._midtonesHue = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get midtonesDensity() {\n return this._midtonesDensity;\n }\n /**\n * Sets the midtones Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set midtonesDensity(value) {\n this._midtonesDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get midtonesSaturation() {\n return this._midtonesSaturation;\n }\n /**\n * Sets the midtones Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set midtonesSaturation(value) {\n this._midtonesSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the midtones Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get midtonesExposure() {\n return this._midtonesExposure;\n }\n /**\n * Sets the midtones Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set midtonesExposure(value) {\n this._midtonesExposure = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n get shadowsHue() {\n return this._shadowsHue;\n }\n /**\n * Sets the shadows Hue value.\n * The hue value is a standard HSB hue in the range [0,360] where 0=red, 120=green and 240=blue. The default value is 30 degrees (orange).\n */\n set shadowsHue(value) {\n this._shadowsHue = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n get shadowsDensity() {\n return this._shadowsDensity;\n }\n /**\n * Sets the shadows Density value.\n * The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.\n * Values less than zero provide a filter of opposite hue.\n */\n set shadowsDensity(value) {\n this._shadowsDensity = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n get shadowsSaturation() {\n return this._shadowsSaturation;\n }\n /**\n * Sets the shadows Saturation value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase saturation and negative values decrease saturation.\n */\n set shadowsSaturation(value) {\n this._shadowsSaturation = value;\n this._dirty = true;\n }\n /**\n * Gets the shadows Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n get shadowsExposure() {\n return this._shadowsExposure;\n }\n /**\n * Sets the shadows Exposure value.\n * This is an adjustment value in the range [-100,+100], where the default value of 0.0 makes no adjustment, positive values increase exposure and negative values decrease exposure.\n */\n set shadowsExposure(value) {\n this._shadowsExposure = value;\n this._dirty = true;\n }\n /**\n * Returns the class name\n * @returns The class name\n */\n getClassName() {\n return \"ColorCurves\";\n }\n /**\n * Binds the color curves to the shader.\n * @param colorCurves The color curve to bind\n * @param effect The effect to bind to\n * @param positiveUniform The positive uniform shader parameter\n * @param neutralUniform The neutral uniform shader parameter\n * @param negativeUniform The negative uniform shader parameter\n */\n static Bind(colorCurves, effect, positiveUniform = \"vCameraColorCurvePositive\", neutralUniform = \"vCameraColorCurveNeutral\", negativeUniform = \"vCameraColorCurveNegative\") {\n if (colorCurves._dirty) {\n colorCurves._dirty = false;\n // Fill in global info.\n colorCurves._getColorGradingDataToRef(colorCurves._globalHue, colorCurves._globalDensity, colorCurves._globalSaturation, colorCurves._globalExposure, colorCurves._globalCurve);\n // Compute highlights info.\n colorCurves._getColorGradingDataToRef(colorCurves._highlightsHue, colorCurves._highlightsDensity, colorCurves._highlightsSaturation, colorCurves._highlightsExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._highlightsCurve);\n // Compute midtones info.\n colorCurves._getColorGradingDataToRef(colorCurves._midtonesHue, colorCurves._midtonesDensity, colorCurves._midtonesSaturation, colorCurves._midtonesExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._midtonesCurve);\n // Compute shadows info.\n colorCurves._getColorGradingDataToRef(colorCurves._shadowsHue, colorCurves._shadowsDensity, colorCurves._shadowsSaturation, colorCurves._shadowsExposure, colorCurves._tempColor);\n colorCurves._tempColor.multiplyToRef(colorCurves._globalCurve, colorCurves._shadowsCurve);\n // Compute deltas (neutral is midtones).\n colorCurves._highlightsCurve.subtractToRef(colorCurves._midtonesCurve, colorCurves._positiveCurve);\n colorCurves._midtonesCurve.subtractToRef(colorCurves._shadowsCurve, colorCurves._negativeCurve);\n }\n if (effect) {\n effect.setFloat4(positiveUniform, colorCurves._positiveCurve.r, colorCurves._positiveCurve.g, colorCurves._positiveCurve.b, colorCurves._positiveCurve.a);\n effect.setFloat4(neutralUniform, colorCurves._midtonesCurve.r, colorCurves._midtonesCurve.g, colorCurves._midtonesCurve.b, colorCurves._midtonesCurve.a);\n effect.setFloat4(negativeUniform, colorCurves._negativeCurve.r, colorCurves._negativeCurve.g, colorCurves._negativeCurve.b, colorCurves._negativeCurve.a);\n }\n }\n /**\n * Returns color grading data based on a hue, density, saturation and exposure value.\n * @param hue\n * @param density\n * @param saturation The saturation.\n * @param exposure The exposure.\n * @param result The result data container.\n */\n _getColorGradingDataToRef(hue, density, saturation, exposure, result) {\n if (hue == null) {\n return;\n }\n hue = ColorCurves._Clamp(hue, 0, 360);\n density = ColorCurves._Clamp(density, -100, 100);\n saturation = ColorCurves._Clamp(saturation, -100, 100);\n exposure = ColorCurves._Clamp(exposure, -100, 100);\n // Remap the slider/config filter density with non-linear mapping and also scale by half\n // so that the maximum filter density is only 50% control. This provides fine control\n // for small values and reasonable range.\n density = ColorCurves._ApplyColorGradingSliderNonlinear(density);\n density *= 0.5;\n exposure = ColorCurves._ApplyColorGradingSliderNonlinear(exposure);\n if (density < 0) {\n density *= -1;\n hue = (hue + 180) % 360;\n }\n ColorCurves._FromHSBToRef(hue, density, 50 + 0.25 * exposure, result);\n result.scaleToRef(2, result);\n result.a = 1 + 0.01 * saturation;\n }\n /**\n * Takes an input slider value and returns an adjusted value that provides extra control near the centre.\n * @param value The input slider value in range [-100,100].\n * @returns Adjusted value.\n */\n static _ApplyColorGradingSliderNonlinear(value) {\n value /= 100;\n let x = Math.abs(value);\n x = Math.pow(x, 2);\n if (value < 0) {\n x *= -1;\n }\n x *= 100;\n return x;\n }\n /**\n * Returns an RGBA Color4 based on Hue, Saturation and Brightness (also referred to as value, HSV).\n * @param hue The hue (H) input.\n * @param saturation The saturation (S) input.\n * @param brightness The brightness (B) input.\n * @param result\n * @result An RGBA color represented as Vector4.\n */\n static _FromHSBToRef(hue, saturation, brightness, result) {\n let h = ColorCurves._Clamp(hue, 0, 360);\n const s = ColorCurves._Clamp(saturation / 100, 0, 1);\n const v = ColorCurves._Clamp(brightness / 100, 0, 1);\n if (s === 0) {\n result.r = v;\n result.g = v;\n result.b = v;\n }\n else {\n // sector 0 to 5\n h /= 60;\n const i = Math.floor(h);\n // fractional part of h\n const f = h - i;\n const p = v * (1 - s);\n const q = v * (1 - s * f);\n const t = v * (1 - s * (1 - f));\n switch (i) {\n case 0:\n result.r = v;\n result.g = t;\n result.b = p;\n break;\n case 1:\n result.r = q;\n result.g = v;\n result.b = p;\n break;\n case 2:\n result.r = p;\n result.g = v;\n result.b = t;\n break;\n case 3:\n result.r = p;\n result.g = q;\n result.b = v;\n break;\n case 4:\n result.r = t;\n result.g = p;\n result.b = v;\n break;\n default:\n // case 5:\n result.r = v;\n result.g = p;\n result.b = q;\n break;\n }\n }\n result.a = 1;\n }\n /**\n * Returns a value clamped between min and max\n * @param value The value to clamp\n * @param min The minimum of value\n * @param max The maximum of value\n * @returns The clamped value.\n */\n static _Clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n }\n /**\n * Clones the current color curve instance.\n * @returns The cloned curves\n */\n clone() {\n return SerializationHelper.Clone(() => new ColorCurves(), this);\n }\n /**\n * Serializes the current color curve instance to a json representation.\n * @returns a JSON representation\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses the color curve from a json representation.\n * @param source the JSON source to parse\n * @returns The parsed curves\n */\n static Parse(source) {\n return SerializationHelper.Parse(() => new ColorCurves(), source, null, null);\n }\n}\n/**\n * Prepare the list of uniforms associated with the ColorCurves effects.\n * @param uniformsList The list of uniforms used in the effect\n */\nColorCurves.PrepareUniforms = PrepareUniformsForColorCurves;\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalHue\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalDensity\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalSaturation\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_globalExposure\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsHue\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsDensity\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsSaturation\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_highlightsExposure\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesHue\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesDensity\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesSaturation\", void 0);\n__decorate([\n serialize()\n], ColorCurves.prototype, \"_midtonesExposure\", void 0);\n// References the dependencies.\nSerializationHelper._ColorCurvesParser = ColorCurves.Parse;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,mBAAmB,QAAQ,qCAAqC;AACzE,SAASC,6BAA6B,QAAQ,4BAA4B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,CAAC;EACrBC,WAAWA,CAAA,EAAG;IACV,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB,IAAI,CAACC,UAAU,GAAG,IAAIN,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACxC,IAAI,CAACO,YAAY,GAAG,IAAIP,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1C,IAAI,CAACQ,gBAAgB,GAAG,IAAIR,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC9C,IAAI,CAACS,cAAc,GAAG,IAAIT,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5C,IAAI,CAACU,aAAa,GAAG,IAAIV,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC3C,IAAI,CAACW,cAAc,GAAG,IAAIX,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5C,IAAI,CAACY,cAAc,GAAG,IAAIZ,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5C,IAAI,CAACa,UAAU,GAAG,EAAE;IACpB,IAAI,CAACC,cAAc,GAAG,CAAC;IACvB,IAAI,CAACC,iBAAiB,GAAG,CAAC;IAC1B,IAAI,CAACC,eAAe,GAAG,CAA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