66863686602b55ed03a91210d7a2418c3d9445250ce4df5bb743702d83a63905.json 47 KB

1
  1. {"ast":null,"code":"import { Texture } from \"../../../Materials/Textures/texture.js\";\nimport { PostProcess } from \"../../../PostProcesses/postProcess.js\";\nimport { PostProcessRenderPipeline } from \"../../../PostProcesses/RenderPipeline/postProcessRenderPipeline.js\";\nimport { PostProcessRenderEffect } from \"../../../PostProcesses/RenderPipeline/postProcessRenderEffect.js\";\nimport { RawTexture } from \"../../../Materials/Textures/rawTexture.js\";\nimport \"../../../PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.js\";\nimport \"../../../Shaders/chromaticAberration.fragment.js\";\nimport \"../../../Shaders/lensHighlights.fragment.js\";\nimport \"../../../Shaders/depthOfField.fragment.js\";\nimport { RandomRange } from \"../../../Maths/math.scalar.functions.js\";\n/**\n * BABYLON.JS Chromatic Aberration GLSL Shader\n * Author: Olivier Guyot\n * Separates very slightly R, G and B colors on the edges of the screen\n * Inspired by Francois Tarlier & Martins Upitis\n */\nexport class LensRenderingPipeline extends PostProcessRenderPipeline {\n /**\n * @constructor\n *\n * Effect parameters are as follow:\n * {\n * chromatic_aberration: number; // from 0 to x (1 for realism)\n * edge_blur: number; // from 0 to x (1 for realism)\n * distortion: number; // from 0 to x (1 for realism), note that this will effect the pointer position precision\n * grain_amount: number; // from 0 to 1\n * grain_texture: BABYLON.Texture; // texture to use for grain effect; if unset, use random B&W noise\n * dof_focus_distance: number; // depth-of-field: focus distance; unset to disable (disabled by default)\n * dof_aperture: number; // depth-of-field: focus blur bias (default: 1)\n * dof_darken: number; // depth-of-field: darken that which is out of focus (from 0 to 1, disabled by default)\n * dof_pentagon: boolean; // depth-of-field: makes a pentagon-like \"bokeh\" effect\n * dof_gain: number; // depth-of-field: highlights gain; unset to disable (disabled by default)\n * dof_threshold: number; // depth-of-field: highlights threshold (default: 1)\n * blur_noise: boolean; // add a little bit of noise to the blur (default: true)\n * }\n * Note: if an effect parameter is unset, effect is disabled\n *\n * @param name The rendering pipeline name\n * @param parameters - An object containing all parameters (see above)\n * @param scene The scene linked to this pipeline\n * @param ratio The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)\n * @param cameras The array of cameras that the rendering pipeline will be attached to\n */\n constructor(name, parameters, scene, ratio = 1.0, cameras) {\n super(scene.getEngine(), name);\n // Lens effects can be of the following:\n // - chromatic aberration (slight shift of RGB colors)\n // - blur on the edge of the lens\n // - lens distortion\n // - depth-of-field blur & highlights enhancing\n // - depth-of-field 'bokeh' effect (shapes appearing in blurred areas)\n // - grain effect (noise or custom texture)\n // Two additional texture samplers are needed:\n // - depth map (for depth-of-field)\n // - grain texture\n /**\n * @ignore\n * The chromatic aberration PostProcess id in the pipeline\n */\n this.LensChromaticAberrationEffect = \"LensChromaticAberrationEffect\";\n /**\n * @ignore\n * The highlights enhancing PostProcess id in the pipeline\n */\n this.HighlightsEnhancingEffect = \"HighlightsEnhancingEffect\";\n /**\n * @ignore\n * The depth-of-field PostProcess id in the pipeline\n */\n this.LensDepthOfFieldEffect = \"LensDepthOfFieldEffect\";\n this._pentagonBokehIsEnabled = false;\n this._scene = scene;\n // Fetch texture samplers\n this._depthTexture = scene.enableDepthRenderer().getDepthMap(); // Force depth renderer \"on\"\n if (parameters.grain_texture) {\n this._grainTexture = parameters.grain_texture;\n } else {\n this._createGrainTexture();\n }\n // save parameters\n this._edgeBlur = parameters.edge_blur ? parameters.edge_blur : 0;\n this._grainAmount = parameters.grain_amount ? parameters.grain_amount : 0;\n this._chromaticAberration = parameters.chromatic_aberration ? parameters.chromatic_aberration : 0;\n this._distortion = parameters.distortion ? parameters.distortion : 0;\n this._highlightsGain = parameters.dof_gain !== undefined ? parameters.dof_gain : -1;\n this._highlightsThreshold = parameters.dof_threshold ? parameters.dof_threshold : 1;\n this._dofDistance = parameters.dof_focus_distance !== undefined ? parameters.dof_focus_distance : -1;\n this._dofAperture = parameters.dof_aperture ? parameters.dof_aperture : 1;\n this._dofDarken = parameters.dof_darken ? parameters.dof_darken : 0;\n this._dofPentagon = parameters.dof_pentagon !== undefined ? parameters.dof_pentagon : true;\n this._blurNoise = parameters.blur_noise !== undefined ? parameters.blur_noise : true;\n // Create effects\n this._createChromaticAberrationPostProcess(ratio);\n this._createHighlightsPostProcess(ratio);\n this._createDepthOfFieldPostProcess(ratio / 4);\n // Set up pipeline\n this.addEffect(new PostProcessRenderEffect(scene.getEngine(), this.LensChromaticAberrationEffect, () => {\n return this._chromaticAberrationPostProcess;\n }, true));\n this.addEffect(new PostProcessRenderEffect(scene.getEngine(), this.HighlightsEnhancingEffect, () => {\n return this._highlightsPostProcess;\n }, true));\n this.addEffect(new PostProcessRenderEffect(scene.getEngine(), this.LensDepthOfFieldEffect, () => {\n return this._depthOfFieldPostProcess;\n }, true));\n if (this._highlightsGain === -1) {\n this._disableEffect(this.HighlightsEnhancingEffect, null);\n }\n // Finish\n scene.postProcessRenderPipelineManager.addPipeline(this);\n if (cameras) {\n scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(name, cameras);\n }\n }\n /**\n * Get the class name\n * @returns \"LensRenderingPipeline\"\n */\n getClassName() {\n return \"LensRenderingPipeline\";\n }\n // Properties\n /**\n * Gets associated scene\n */\n get scene() {\n return this._scene;\n }\n /**\n * Gets or sets the edge blur\n */\n get edgeBlur() {\n return this._edgeBlur;\n }\n set edgeBlur(value) {\n this.setEdgeBlur(value);\n }\n /**\n * Gets or sets the grain amount\n */\n get grainAmount() {\n return this._grainAmount;\n }\n set grainAmount(value) {\n this.setGrainAmount(value);\n }\n /**\n * Gets or sets the chromatic aberration amount\n */\n get chromaticAberration() {\n return this._chromaticAberration;\n }\n set chromaticAberration(value) {\n this.setChromaticAberration(value);\n }\n /**\n * Gets or sets the depth of field aperture\n */\n get dofAperture() {\n return this._dofAperture;\n }\n set dofAperture(value) {\n this.setAperture(value);\n }\n /**\n * Gets or sets the edge distortion\n */\n get edgeDistortion() {\n return this._distortion;\n }\n set edgeDistortion(value) {\n this.setEdgeDistortion(value);\n }\n /**\n * Gets or sets the depth of field distortion\n */\n get dofDistortion() {\n return this._dofDistance;\n }\n set dofDistortion(value) {\n this.setFocusDistance(value);\n }\n /**\n * Gets or sets the darken out of focus amount\n */\n get darkenOutOfFocus() {\n return this._dofDarken;\n }\n set darkenOutOfFocus(value) {\n this.setDarkenOutOfFocus(value);\n }\n /**\n * Gets or sets a boolean indicating if blur noise is enabled\n */\n get blurNoise() {\n return this._blurNoise;\n }\n set blurNoise(value) {\n this._blurNoise = value;\n }\n /**\n * Gets or sets a boolean indicating if pentagon bokeh is enabled\n */\n get pentagonBokeh() {\n return this._pentagonBokehIsEnabled;\n }\n set pentagonBokeh(value) {\n if (value) {\n this.enablePentagonBokeh();\n } else {\n this.disablePentagonBokeh();\n }\n }\n /**\n * Gets or sets the highlight grain amount\n */\n get highlightsGain() {\n return this._highlightsGain;\n }\n set highlightsGain(value) {\n this.setHighlightsGain(value);\n }\n /**\n * Gets or sets the highlight threshold\n */\n get highlightsThreshold() {\n return this._highlightsThreshold;\n }\n set highlightsThreshold(value) {\n this.setHighlightsThreshold(value);\n }\n // public methods (self explanatory)\n /**\n * Sets the amount of blur at the edges\n * @param amount blur amount\n */\n setEdgeBlur(amount) {\n this._edgeBlur = amount;\n }\n /**\n * Sets edge blur to 0\n */\n disableEdgeBlur() {\n this._edgeBlur = 0;\n }\n /**\n * Sets the amount of grain\n * @param amount Amount of grain\n */\n setGrainAmount(amount) {\n this._grainAmount = amount;\n }\n /**\n * Set grain amount to 0\n */\n disableGrain() {\n this._grainAmount = 0;\n }\n /**\n * Sets the chromatic aberration amount\n * @param amount amount of chromatic aberration\n */\n setChromaticAberration(amount) {\n this._chromaticAberration = amount;\n }\n /**\n * Sets chromatic aberration amount to 0\n */\n disableChromaticAberration() {\n this._chromaticAberration = 0;\n }\n /**\n * Sets the EdgeDistortion amount\n * @param amount amount of EdgeDistortion\n */\n setEdgeDistortion(amount) {\n this._distortion = amount;\n }\n /**\n * Sets edge distortion to 0\n */\n disableEdgeDistortion() {\n this._distortion = 0;\n }\n /**\n * Sets the FocusDistance amount\n * @param amount amount of FocusDistance\n */\n setFocusDistance(amount) {\n this._dofDistance = amount;\n }\n /**\n * Disables depth of field\n */\n disableDepthOfField() {\n this._dofDistance = -1;\n }\n /**\n * Sets the Aperture amount\n * @param amount amount of Aperture\n */\n setAperture(amount) {\n this._dofAperture = amount;\n }\n /**\n * Sets the DarkenOutOfFocus amount\n * @param amount amount of DarkenOutOfFocus\n */\n setDarkenOutOfFocus(amount) {\n this._dofDarken = amount;\n }\n /**\n * Creates a pentagon bokeh effect\n */\n enablePentagonBokeh() {\n this._highlightsPostProcess.updateEffect(\"#define PENTAGON\\n\");\n this._pentagonBokehIsEnabled = true;\n }\n /**\n * Disables the pentagon bokeh effect\n */\n disablePentagonBokeh() {\n this._pentagonBokehIsEnabled = false;\n this._highlightsPostProcess.updateEffect();\n }\n /**\n * Enables noise blur\n */\n enableNoiseBlur() {\n this._blurNoise = true;\n }\n /**\n * Disables noise blur\n */\n disableNoiseBlur() {\n this._blurNoise = false;\n }\n /**\n * Sets the HighlightsGain amount\n * @param amount amount of HighlightsGain\n */\n setHighlightsGain(amount) {\n this._highlightsGain = amount;\n }\n /**\n * Sets the HighlightsThreshold amount\n * @param amount amount of HighlightsThreshold\n */\n setHighlightsThreshold(amount) {\n if (this._highlightsGain === -1) {\n this._highlightsGain = 1.0;\n }\n this._highlightsThreshold = amount;\n }\n /**\n * Disables highlights\n */\n disableHighlights() {\n this._highlightsGain = -1;\n }\n /**\n * Removes the internal pipeline assets and detaches the pipeline from the scene cameras\n * @param disableDepthRender If the scene's depth rendering should be disabled (default: false)\n */\n dispose(disableDepthRender = false) {\n this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._scene.cameras);\n this._chromaticAberrationPostProcess = null;\n this._highlightsPostProcess = null;\n this._depthOfFieldPostProcess = null;\n this._grainTexture.dispose();\n if (disableDepthRender) {\n this._scene.disableDepthRenderer();\n }\n }\n // colors shifting and distortion\n _createChromaticAberrationPostProcess(ratio) {\n this._chromaticAberrationPostProcess = new PostProcess(\"LensChromaticAberration\", \"chromaticAberration\", [\"chromatic_aberration\", \"screen_width\", \"screen_height\", \"direction\", \"radialIntensity\", \"centerPosition\"],\n // uniforms\n [],\n // samplers\n ratio, null, Texture.TRILINEAR_SAMPLINGMODE, this._scene.getEngine(), false);\n this._chromaticAberrationPostProcess.onApply = effect => {\n effect.setFloat(\"chromatic_aberration\", this._chromaticAberration);\n effect.setFloat(\"screen_width\", this._scene.getEngine().getRenderWidth());\n effect.setFloat(\"screen_height\", this._scene.getEngine().getRenderHeight());\n effect.setFloat(\"radialIntensity\", 1);\n effect.setFloat2(\"direction\", 17, 17);\n effect.setFloat2(\"centerPosition\", 0.5, 0.5);\n };\n }\n // highlights enhancing\n _createHighlightsPostProcess(ratio) {\n this._highlightsPostProcess = new PostProcess(\"LensHighlights\", \"lensHighlights\", [\"gain\", \"threshold\", \"screen_width\", \"screen_height\"],\n // uniforms\n [],\n // samplers\n ratio, null, Texture.TRILINEAR_SAMPLINGMODE, this._scene.getEngine(), false, this._dofPentagon ? \"#define PENTAGON\\n\" : \"\");\n this._highlightsPostProcess.externalTextureSamplerBinding = true;\n this._highlightsPostProcess.onApply = effect => {\n effect.setFloat(\"gain\", this._highlightsGain);\n effect.setFloat(\"threshold\", this._highlightsThreshold);\n effect.setTextureFromPostProcess(\"textureSampler\", this._chromaticAberrationPostProcess);\n effect.setFloat(\"screen_width\", this._scene.getEngine().getRenderWidth());\n effect.setFloat(\"screen_height\", this._scene.getEngine().getRenderHeight());\n };\n }\n // colors shifting and distortion\n _createDepthOfFieldPostProcess(ratio) {\n this._depthOfFieldPostProcess = new PostProcess(\"LensDepthOfField\", \"depthOfField\", [\"grain_amount\", \"blur_noise\", \"screen_width\", \"screen_height\", \"distortion\", \"dof_enabled\", \"screen_distance\", \"aperture\", \"darken\", \"edge_blur\", \"highlights\", \"near\", \"far\"], [\"depthSampler\", \"grainSampler\", \"highlightsSampler\"], ratio, null, Texture.TRILINEAR_SAMPLINGMODE, this._scene.getEngine(), false);\n this._depthOfFieldPostProcess.externalTextureSamplerBinding = true;\n this._depthOfFieldPostProcess.onApply = effect => {\n effect.setTexture(\"depthSampler\", this._depthTexture);\n effect.setTexture(\"grainSampler\", this._grainTexture);\n effect.setTextureFromPostProcess(\"textureSampler\", this._highlightsPostProcess);\n effect.setTextureFromPostProcess(\"highlightsSampler\", this._depthOfFieldPostProcess);\n effect.setFloat(\"grain_amount\", this._grainAmount);\n effect.setBool(\"blur_noise\", this._blurNoise);\n effect.setFloat(\"screen_width\", this._scene.getEngine().getRenderWidth());\n effect.setFloat(\"screen_height\", this._scene.getEngine().getRenderHeight());\n effect.setFloat(\"distortion\", this._distortion);\n effect.setBool(\"dof_enabled\", this._dofDistance !== -1);\n effect.setFloat(\"screen_distance\", 1.0 / (0.1 - 1.0 / this._dofDistance));\n effect.setFloat(\"aperture\", this._dofAperture);\n effect.setFloat(\"darken\", this._dofDarken);\n effect.setFloat(\"edge_blur\", this._edgeBlur);\n effect.setBool(\"highlights\", this._highlightsGain !== -1);\n if (this._scene.activeCamera) {\n effect.setFloat(\"near\", this._scene.activeCamera.minZ);\n effect.setFloat(\"far\", this._scene.activeCamera.maxZ);\n }\n };\n }\n // creates a black and white random noise texture, 512x512\n _createGrainTexture() {\n const size = 512;\n const data = new Uint8Array(size * size * 4);\n for (let index = 0; index < data.length;) {\n const value = Math.floor(RandomRange(0.42, 0.58) * 255);\n data[index++] = value;\n data[index++] = value;\n data[index++] = value;\n data[index++] = 255;\n }\n const texture = RawTexture.CreateRGBATexture(data, size, size, this._scene, false, false, 2);\n texture.name = \"LensNoiseTexture\";\n texture.wrapU = Texture.WRAP_ADDRESSMODE;\n texture.wrapV = Texture.WRAP_ADDRESSMODE;\n this._grainTexture = texture;\n }\n}","map":{"version":3,"names":["Texture","PostProcess","PostProcessRenderPipeline","PostProcessRenderEffect","RawTexture","RandomRange","LensRenderingPipeline","constructor","name","parameters","scene","ratio","cameras","getEngine","LensChromaticAberrationEffect","HighlightsEnhancingEffect","LensDepthOfFieldEffect","_pentagonBokehIsEnabled","_scene","_depthTexture","enableDepthRenderer","getDepthMap","grain_texture","_grainTexture","_createGrainTexture","_edgeBlur","edge_blur","_grainAmount","grain_amount","_chromaticAberration","chromatic_aberration","_distortion","distortion","_highlightsGain","dof_gain","undefined","_highlightsThreshold","dof_threshold","_dofDistance","dof_focus_distance","_dofAperture","dof_aperture","_dofDarken","dof_darken","_dofPentagon","dof_pentagon","_blurNoise","blur_noise","_createChromaticAberrationPostProcess","_createHighlightsPostProcess","_createDepthOfFieldPostProcess","addEffect","_chromaticAberrationPostProcess","_highlightsPostProcess","_depthOfFieldPostProcess","_disableEffect","postProcessRenderPipelineManager","addPipeline","attachCamerasToRenderPipeline","getClassName","edgeBlur","value","setEdgeBlur","grainAmount","setGrainAmount","chromaticAberration","setChromaticAberration","dofAperture","setAperture","edgeDistortion","setEdgeDistortion","dofDistortion","setFocusDistance","darkenOutOfFocus","setDarkenOutOfFocus","blurNoise","pentagonBokeh","enablePentagonBokeh","disablePentagonBokeh","highlightsGain","setHighlightsGain","highlightsThreshold","setHighlightsThreshold","amount","disableEdgeBlur","disableGrain","disableChromaticAberration","disableEdgeDistortion","disableDepthOfField","updateEffect","enableNoiseBlur","disableNoiseBlur","disableHighlights","dispose","disableDepthRender","detachCamerasFromRenderPipeline","_name","disableDepthRenderer","TRILINEAR_SAMPLINGMODE","onApply","effect","setFloat","getRenderWidth","getRenderHeight","setFloat2","externalTextureSamplerBinding","setTextureFromPostProcess","setTexture","setBool","activeCamera","minZ","maxZ","size","data","Uint8Array","index","length","Math","floor","texture","CreateRGBATexture","wrapU","WRAP_ADDRESSMODE","wrapV"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js"],"sourcesContent":["import { Texture } from \"../../../Materials/Textures/texture.js\";\nimport { PostProcess } from \"../../../PostProcesses/postProcess.js\";\nimport { PostProcessRenderPipeline } from \"../../../PostProcesses/RenderPipeline/postProcessRenderPipeline.js\";\nimport { PostProcessRenderEffect } from \"../../../PostProcesses/RenderPipeline/postProcessRenderEffect.js\";\nimport { RawTexture } from \"../../../Materials/Textures/rawTexture.js\";\n\nimport \"../../../PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.js\";\nimport \"../../../Shaders/chromaticAberration.fragment.js\";\nimport \"../../../Shaders/lensHighlights.fragment.js\";\nimport \"../../../Shaders/depthOfField.fragment.js\";\nimport { RandomRange } from \"../../../Maths/math.scalar.functions.js\";\n/**\n * BABYLON.JS Chromatic Aberration GLSL Shader\n * Author: Olivier Guyot\n * Separates very slightly R, G and B colors on the edges of the screen\n * Inspired by Francois Tarlier & Martins Upitis\n */\nexport class LensRenderingPipeline extends PostProcessRenderPipeline {\n /**\n * @constructor\n *\n * Effect parameters are as follow:\n * {\n * chromatic_aberration: number; // from 0 to x (1 for realism)\n * edge_blur: number; // from 0 to x (1 for realism)\n * distortion: number; // from 0 to x (1 for realism), note that this will effect the pointer position precision\n * grain_amount: number; // from 0 to 1\n * grain_texture: BABYLON.Texture; // texture to use for grain effect; if unset, use random B&W noise\n * dof_focus_distance: number; // depth-of-field: focus distance; unset to disable (disabled by default)\n * dof_aperture: number; // depth-of-field: focus blur bias (default: 1)\n * dof_darken: number; // depth-of-field: darken that which is out of focus (from 0 to 1, disabled by default)\n * dof_pentagon: boolean; // depth-of-field: makes a pentagon-like \"bokeh\" effect\n * dof_gain: number; // depth-of-field: highlights gain; unset to disable (disabled by default)\n * dof_threshold: number; // depth-of-field: highlights threshold (default: 1)\n * blur_noise: boolean; // add a little bit of noise to the blur (default: true)\n * }\n * Note: if an effect parameter is unset, effect is disabled\n *\n * @param name The rendering pipeline name\n * @param parameters - An object containing all parameters (see above)\n * @param scene The scene linked to this pipeline\n * @param ratio The size of the postprocesses (0.5 means that your postprocess will have a width = canvas.width 0.5 and a height = canvas.height 0.5)\n * @param cameras The array of cameras that the rendering pipeline will be attached to\n */\n constructor(name, parameters, scene, ratio = 1.0, cameras) {\n super(scene.getEngine(), name);\n // Lens effects can be of the following:\n // - chromatic aberration (slight shift of RGB colors)\n // - blur on the edge of the lens\n // - lens distortion\n // - depth-of-field blur & highlights enhancing\n // - depth-of-field 'bokeh' effect (shapes appearing in blurred areas)\n // - grain effect (noise or custom texture)\n // Two additional texture samplers are needed:\n // - depth map (for depth-of-field)\n // - grain texture\n /**\n * @ignore\n * The chromatic aberration PostProcess id in the pipeline\n */\n this.LensChromaticAberrationEffect = \"LensChromaticAberrationEffect\";\n /**\n * @ignore\n * The highlights enhancing PostProcess id in the pipeline\n */\n this.HighlightsEnhancingEffect = \"HighlightsEnhancingEffect\";\n /**\n * @ignore\n * The depth-of-field PostProcess id in the pipeline\n */\n this.LensDepthOfFieldEffect = \"LensDepthOfFieldEffect\";\n this._pentagonBokehIsEnabled = false;\n this._scene = scene;\n // Fetch texture samplers\n this._depthTexture = scene.enableDepthRenderer().getDepthMap(); // Force depth renderer \"on\"\n if (parameters.grain_texture) {\n this._grainTexture = parameters.grain_texture;\n }\n else {\n this._createGrainTexture();\n }\n // save parameters\n this._edgeBlur = parameters.edge_blur ? parameters.edge_blur : 0;\n this._grainAmount = parameters.grain_amount ? parameters.grain_amount : 0;\n this._chromaticAberration = parameters.chromatic_aberration ? parameters.chromatic_aberration : 0;\n this._distortion = parameters.distortion ? parameters.distortion : 0;\n this._highlightsGain = parameters.dof_gain !== undefined ? parameters.dof_gain : -1;\n this._highlightsThreshold = parameters.dof_threshold ? parameters.dof_threshold : 1;\n this._dofDistance = parameters.dof_focus_distance !== undefined ? parameters.dof_focus_distance : -1;\n this._dofAperture = parameters.dof_aperture ? parameters.dof_aperture : 1;\n this._dofDarken = parameters.dof_darken ? parameters.dof_darken : 0;\n this._dofPentagon = parameters.dof_pentagon !== undefined ? parameters.dof_pentagon : true;\n this._blurNoise = parameters.blur_noise !== undefined ? parameters.blur_noise : true;\n // Create effects\n this._createChromaticAberrationPostProcess(ratio);\n this._createHighlightsPostProcess(ratio);\n this._createDepthOfFieldPostProcess(ratio / 4);\n // Set up pipeline\n this.addEffect(new PostProcessRenderEffect(scene.getEngine(), this.LensChromaticAberrationEffect, () => {\n return this._chromaticAberrationPostProcess;\n }, true));\n this.addEffect(new PostProcessRenderEffect(scene.getEngine(), this.HighlightsEnhancingEffect, () => {\n return this._highlightsPostProcess;\n }, true));\n this.addEffect(new PostProcessRenderEffect(scene.getEngine(), this.LensDepthOfFieldEffect, () => {\n return this._depthOfFieldPostProcess;\n }, true));\n if (this._highlightsGain === -1) {\n this._disableEffect(this.HighlightsEnhancingEffect, null);\n }\n // Finish\n scene.postProcessRenderPipelineManager.addPipeline(this);\n if (cameras) {\n scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(name, cameras);\n }\n }\n /**\n * Get the class name\n * @returns \"LensRenderingPipeline\"\n */\n getClassName() {\n return \"LensRenderingPipeline\";\n }\n // Properties\n /**\n * Gets associated scene\n */\n get scene() {\n return this._scene;\n }\n /**\n * Gets or sets the edge blur\n */\n get edgeBlur() {\n return this._edgeBlur;\n }\n set edgeBlur(value) {\n this.setEdgeBlur(value);\n }\n /**\n * Gets or sets the grain amount\n */\n get grainAmount() {\n return this._grainAmount;\n }\n set grainAmount(value) {\n this.setGrainAmount(value);\n }\n /**\n * Gets or sets the chromatic aberration amount\n */\n get chromaticAberration() {\n return this._chromaticAberration;\n }\n set chromaticAberration(value) {\n this.setChromaticAberration(value);\n }\n /**\n * Gets or sets the depth of field aperture\n */\n get dofAperture() {\n return this._dofAperture;\n }\n set dofAperture(value) {\n this.setAperture(value);\n }\n /**\n * Gets or sets the edge distortion\n */\n get edgeDistortion() {\n return this._distortion;\n }\n set edgeDistortion(value) {\n this.setEdgeDistortion(value);\n }\n /**\n * Gets or sets the depth of field distortion\n */\n get dofDistortion() {\n return this._dofDistance;\n }\n set dofDistortion(value) {\n this.setFocusDistance(value);\n }\n /**\n * Gets or sets the darken out of focus amount\n */\n get darkenOutOfFocus() {\n return this._dofDarken;\n }\n set darkenOutOfFocus(value) {\n this.setDarkenOutOfFocus(value);\n }\n /**\n * Gets or sets a boolean indicating if blur noise is enabled\n */\n get blurNoise() {\n return this._blurNoise;\n }\n set blurNoise(value) {\n this._blurNoise = value;\n }\n /**\n * Gets or sets a boolean indicating if pentagon bokeh is enabled\n */\n get pentagonBokeh() {\n return this._pentagonBokehIsEnabled;\n }\n set pentagonBokeh(value) {\n if (value) {\n this.enablePentagonBokeh();\n }\n else {\n this.disablePentagonBokeh();\n }\n }\n /**\n * Gets or sets the highlight grain amount\n */\n get highlightsGain() {\n return this._highlightsGain;\n }\n set highlightsGain(value) {\n this.setHighlightsGain(value);\n }\n /**\n * Gets or sets the highlight threshold\n */\n get highlightsThreshold() {\n return this._highlightsThreshold;\n }\n set highlightsThreshold(value) {\n this.setHighlightsThreshold(value);\n }\n // public methods (self explanatory)\n /**\n * Sets the amount of blur at the edges\n * @param amount blur amount\n */\n setEdgeBlur(amount) {\n this._edgeBlur = amount;\n }\n /**\n * Sets edge blur to 0\n */\n disableEdgeBlur() {\n this._edgeBlur = 0;\n }\n /**\n * Sets the amount of grain\n * @param amount Amount of grain\n */\n setGrainAmount(amount) {\n this._grainAmount = amount;\n }\n /**\n * Set grain amount to 0\n */\n disableGrain() {\n this._grainAmount = 0;\n }\n /**\n * Sets the chromatic aberration amount\n * @param amount amount of chromatic aberration\n */\n setChromaticAberration(amount) {\n this._chromaticAberration = amount;\n }\n /**\n * Sets chromatic aberration amount to 0\n */\n disableChromaticAberration() {\n this._chromaticAberration = 0;\n }\n /**\n * Sets the EdgeDistortion amount\n * @param amount amount of EdgeDistortion\n */\n setEdgeDistortion(amount) {\n this._distortion = amount;\n }\n /**\n * Sets edge distortion to 0\n */\n disableEdgeDistortion() {\n this._distortion = 0;\n }\n /**\n * Sets the FocusDistance amount\n * @param amount amount of FocusDistance\n */\n setFocusDistance(amount) {\n this._dofDistance = amount;\n }\n /**\n * Disables depth of field\n */\n disableDepthOfField() {\n this._dofDistance = -1;\n }\n /**\n * Sets the Aperture amount\n * @param amount amount of Aperture\n */\n setAperture(amount) {\n this._dofAperture = amount;\n }\n /**\n * Sets the DarkenOutOfFocus amount\n * @param amount amount of DarkenOutOfFocus\n */\n setDarkenOutOfFocus(amount) {\n this._dofDarken = amount;\n }\n /**\n * Creates a pentagon bokeh effect\n */\n enablePentagonBokeh() {\n this._highlightsPostProcess.updateEffect(\"#define PENTAGON\\n\");\n this._pentagonBokehIsEnabled = true;\n }\n /**\n * Disables the pentagon bokeh effect\n */\n disablePentagonBokeh() {\n this._pentagonBokehIsEnabled = false;\n this._highlightsPostProcess.updateEffect();\n }\n /**\n * Enables noise blur\n */\n enableNoiseBlur() {\n this._blurNoise = true;\n }\n /**\n * Disables noise blur\n */\n disableNoiseBlur() {\n this._blurNoise = false;\n }\n /**\n * Sets the HighlightsGain amount\n * @param amount amount of HighlightsGain\n */\n setHighlightsGain(amount) {\n this._highlightsGain = amount;\n }\n /**\n * Sets the HighlightsThreshold amount\n * @param amount amount of HighlightsThreshold\n */\n setHighlightsThreshold(amount) {\n if (this._highlightsGain === -1) {\n this._highlightsGain = 1.0;\n }\n this._highlightsThreshold = amount;\n }\n /**\n * Disables highlights\n */\n disableHighlights() {\n this._highlightsGain = -1;\n }\n /**\n * Removes the internal pipeline assets and detaches the pipeline from the scene cameras\n * @param disableDepthRender If the scene's depth rendering should be disabled (default: false)\n */\n dispose(disableDepthRender = false) {\n this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._scene.cameras);\n this._chromaticAberrationPostProcess = null;\n this._highlightsPostProcess = null;\n this._depthOfFieldPostProcess = null;\n this._grainTexture.dispose();\n if (disableDepthRender) {\n this._scene.disableDepthRenderer();\n }\n }\n // colors shifting and distortion\n _createChromaticAberrationPostProcess(ratio) {\n this._chromaticAberrationPostProcess = new PostProcess(\"LensChromaticAberration\", \"chromaticAberration\", [\"chromatic_aberration\", \"screen_width\", \"screen_height\", \"direction\", \"radialIntensity\", \"centerPosition\"], // uniforms\n [], // samplers\n ratio, null, Texture.TRILINEAR_SAMPLINGMODE, this._scene.getEngine(), false);\n this._chromaticAberrationPostProcess.onApply = (effect) => {\n effect.setFloat(\"chromatic_aberration\", this._chromaticAberration);\n effect.setFloat(\"screen_width\", this._scene.getEngine().getRenderWidth());\n effect.setFloat(\"screen_height\", this._scene.getEngine().getRenderHeight());\n effect.setFloat(\"radialIntensity\", 1);\n effect.setFloat2(\"direction\", 17, 17);\n effect.setFloat2(\"centerPosition\", 0.5, 0.5);\n };\n }\n // highlights enhancing\n _createHighlightsPostProcess(ratio) {\n this._highlightsPostProcess = new PostProcess(\"LensHighlights\", \"lensHighlights\", [\"gain\", \"threshold\", \"screen_width\", \"screen_height\"], // uniforms\n [], // samplers\n ratio, null, Texture.TRILINEAR_SAMPLINGMODE, this._scene.getEngine(), false, this._dofPentagon ? \"#define PENTAGON\\n\" : \"\");\n this._highlightsPostProcess.externalTextureSamplerBinding = true;\n this._highlightsPostProcess.onApply = (effect) => {\n effect.setFloat(\"gain\", this._highlightsGain);\n effect.setFloat(\"threshold\", this._highlightsThreshold);\n effect.setTextureFromPostProcess(\"textureSampler\", this._chromaticAberrationPostProcess);\n effect.setFloat(\"screen_width\", this._scene.getEngine().getRenderWidth());\n effect.setFloat(\"screen_height\", this._scene.getEngine().getRenderHeight());\n };\n }\n // colors shifting and distortion\n _createDepthOfFieldPostProcess(ratio) {\n this._depthOfFieldPostProcess = new PostProcess(\"LensDepthOfField\", \"depthOfField\", [\n \"grain_amount\",\n \"blur_noise\",\n \"screen_width\",\n \"screen_height\",\n \"distortion\",\n \"dof_enabled\",\n \"screen_distance\",\n \"aperture\",\n \"darken\",\n \"edge_blur\",\n \"highlights\",\n \"near\",\n \"far\",\n ], [\"depthSampler\", \"grainSampler\", \"highlightsSampler\"], ratio, null, Texture.TRILINEAR_SAMPLINGMODE, this._scene.getEngine(), false);\n this._depthOfFieldPostProcess.externalTextureSamplerBinding = true;\n this._depthOfFieldPostProcess.onApply = (effect) => {\n effect.setTexture(\"depthSampler\", this._depthTexture);\n effect.setTexture(\"grainSampler\", this._grainTexture);\n effect.setTextureFromPostProcess(\"textureSampler\", this._highlightsPostProcess);\n effect.setTextureFromPostProcess(\"highlightsSampler\", this._depthOfFieldPostProcess);\n effect.setFloat(\"grain_amount\", this._grainAmount);\n effect.setBool(\"blur_noise\", this._blurNoise);\n effect.setFloat(\"screen_width\", this._scene.getEngine().getRenderWidth());\n effect.setFloat(\"screen_height\", this._scene.getEngine().getRenderHeight());\n effect.setFloat(\"distortion\", this._distortion);\n effect.setBool(\"dof_enabled\", this._dofDistance !== -1);\n effect.setFloat(\"screen_distance\", 1.0 / (0.1 - 1.0 / this._dofDistance));\n effect.setFloat(\"aperture\", this._dofAperture);\n effect.setFloat(\"darken\", this._dofDarken);\n effect.setFloat(\"edge_blur\", this._edgeBlur);\n effect.setBool(\"highlights\", this._highlightsGain !== -1);\n if (this._scene.activeCamera) {\n effect.setFloat(\"near\", this._scene.activeCamera.minZ);\n effect.setFloat(\"far\", this._scene.activeCamera.maxZ);\n }\n };\n }\n // creates a black and white random noise texture, 512x512\n _createGrainTexture() {\n const size = 512;\n const data = new Uint8Array(size * size * 4);\n for (let index = 0; index < data.length;) {\n const value = Math.floor(RandomRange(0.42, 0.58) * 255);\n data[index++] = value;\n data[index++] = value;\n data[index++] = value;\n data[index++] = 255;\n }\n const texture = RawTexture.CreateRGBATexture(data, size, size, this._scene, false, false, 2);\n texture.name = \"LensNoiseTexture\";\n texture.wrapU = Texture.WRAP_ADDRESSMODE;\n texture.wrapV = Texture.WRAP_ADDRESSMODE;\n this._grainTexture = texture;\n }\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,wCAAwC;AAChE,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,yBAAyB,QAAQ,oEAAoE;AAC9G,SAASC,uBAAu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