56fd318d224c5c2b1391b42bdbc7f93de7610acc210d125f8a2e30e09c96e147.json 137 KB

1
  1. {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, serializeAsColor3, expandToProperty, serializeAsTexture, serializeAsVector3, serializeAsImageProcessingConfiguration } from \"../../Misc/decorators.js\";\nimport { SmartArray } from \"../../Misc/smartArray.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { Vector3, Vector4 } from \"../../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { MaterialDefines } from \"../../Materials/materialDefines.js\";\nimport { PushMaterial } from \"../../Materials/pushMaterial.js\";\nimport { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\nimport { RegisterClass } from \"../../Misc/typeStore.js\";\nimport { MaterialFlags } from \"../materialFlags.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { EffectFallbacks } from \"../effectFallbacks.js\";\nimport { addClipPlaneUniforms, bindClipPlane } from \"../clipPlaneMaterialHelper.js\";\nimport { BindBonesParameters, BindFogParameters, BindLights, BindLogDepth, BindTextureMatrix, HandleFallbacksForShadows, PrepareAttributesForBones, PrepareAttributesForInstances, PrepareDefinesForAttributes, PrepareDefinesForFrameBoundValues, PrepareDefinesForLights, PrepareDefinesForMergedUV, PrepareDefinesForMisc, PrepareDefinesForMultiview, PrepareUniformsAndSamplersList } from \"../materialHelper.functions.js\";\nimport { SerializationHelper } from \"../../Misc/decorators.serialization.js\";\n/**\n * Background material defines definition.\n * @internal Mainly internal Use\n */\nclass BackgroundMaterialDefines extends MaterialDefines {\n /**\n * Constructor of the defines.\n */\n constructor() {\n super();\n /**\n * True if the diffuse texture is in use.\n */\n this.DIFFUSE = false;\n /**\n * The direct UV channel to use.\n */\n this.DIFFUSEDIRECTUV = 0;\n /**\n * True if the diffuse texture is in gamma space.\n */\n this.GAMMADIFFUSE = false;\n /**\n * True if the diffuse texture has opacity in the alpha channel.\n */\n this.DIFFUSEHASALPHA = false;\n /**\n * True if you want the material to fade to transparent at grazing angle.\n */\n this.OPACITYFRESNEL = false;\n /**\n * True if an extra blur needs to be added in the reflection.\n */\n this.REFLECTIONBLUR = false;\n /**\n * True if you want the material to fade to reflection at grazing angle.\n */\n this.REFLECTIONFRESNEL = false;\n /**\n * True if you want the material to falloff as far as you move away from the scene center.\n */\n this.REFLECTIONFALLOFF = false;\n /**\n * False if the current Webgl implementation does not support the texture lod extension.\n */\n this.TEXTURELODSUPPORT = false;\n /**\n * True to ensure the data are premultiplied.\n */\n this.PREMULTIPLYALPHA = false;\n /**\n * True if the texture contains cooked RGB values and not gray scaled multipliers.\n */\n this.USERGBCOLOR = false;\n /**\n * True if highlight and shadow levels have been specified. It can help ensuring the main perceived color\n * stays aligned with the desired configuration.\n */\n this.USEHIGHLIGHTANDSHADOWCOLORS = false;\n /**\n * True if only shadows must be rendered\n */\n this.BACKMAT_SHADOWONLY = false;\n /**\n * True to add noise in order to reduce the banding effect.\n */\n this.NOISE = false;\n /**\n * is the reflection texture in BGR color scheme?\n * Mainly used to solve a bug in ios10 video tag\n */\n this.REFLECTIONBGR = false;\n /**\n * True if ground projection has been enabled.\n */\n this.PROJECTED_GROUND = false;\n this.IMAGEPROCESSING = false;\n this.VIGNETTE = false;\n this.VIGNETTEBLENDMODEMULTIPLY = false;\n this.VIGNETTEBLENDMODEOPAQUE = false;\n this.TONEMAPPING = 0;\n this.CONTRAST = false;\n this.COLORCURVES = false;\n this.COLORGRADING = false;\n this.COLORGRADING3D = false;\n this.SAMPLER3DGREENDEPTH = false;\n this.SAMPLER3DBGRMAP = false;\n this.DITHER = false;\n this.IMAGEPROCESSINGPOSTPROCESS = false;\n this.SKIPFINALCOLORCLAMP = false;\n this.EXPOSURE = false;\n this.MULTIVIEW = false;\n // Reflection.\n this.REFLECTION = false;\n this.REFLECTIONMAP_3D = false;\n this.REFLECTIONMAP_SPHERICAL = false;\n this.REFLECTIONMAP_PLANAR = false;\n this.REFLECTIONMAP_CUBIC = false;\n this.REFLECTIONMAP_PROJECTION = false;\n this.REFLECTIONMAP_SKYBOX = false;\n this.REFLECTIONMAP_EXPLICIT = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n this.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n this.INVERTCUBICMAP = false;\n this.REFLECTIONMAP_OPPOSITEZ = false;\n this.LODINREFLECTIONALPHA = false;\n this.GAMMAREFLECTION = false;\n this.RGBDREFLECTION = false;\n this.EQUIRECTANGULAR_RELFECTION_FOV = false;\n // Default BJS.\n this.MAINUV1 = false;\n this.MAINUV2 = false;\n this.UV1 = false;\n this.UV2 = false;\n this.CLIPPLANE = false;\n this.CLIPPLANE2 = false;\n this.CLIPPLANE3 = false;\n this.CLIPPLANE4 = false;\n this.CLIPPLANE5 = false;\n this.CLIPPLANE6 = false;\n this.POINTSIZE = false;\n this.FOG = false;\n this.NORMAL = false;\n this.NUM_BONE_INFLUENCERS = 0;\n this.BonesPerMesh = 0;\n this.INSTANCES = false;\n this.SHADOWFLOAT = false;\n this.LOGARITHMICDEPTH = false;\n this.NONUNIFORMSCALING = false;\n this.ALPHATEST = false;\n this.rebuild();\n }\n}\n/**\n * Background material used to create an efficient environment around your scene.\n * #157MGZ: simple test\n */\nexport class BackgroundMaterial extends PushMaterial {\n /**\n * Experimental Internal Use Only.\n *\n * Key light Color in \"perceptual value\" meaning the color you would like to see on screen.\n * This acts as a helper to set the primary color to a more \"human friendly\" value.\n * Conversion to linear space as well as exposure and tone mapping correction will be applied to keep the\n * output color as close as possible from the chosen value.\n * (This does not account for contrast color grading and color curves as they are considered post effect and not directly\n * part of lighting setup.)\n */\n get _perceptualColor() {\n return this.__perceptualColor;\n }\n set _perceptualColor(value) {\n this.__perceptualColor = value;\n this._computePrimaryColorFromPerceptualColor();\n this._markAllSubMeshesAsLightsDirty();\n }\n /**\n * Defines the level of the shadows (dark area of the reflection map) in order to help scaling the colors.\n * The color opposite to the primary color is used at the level chosen to define what the black area would look.\n */\n get primaryColorShadowLevel() {\n return this._primaryColorShadowLevel;\n }\n set primaryColorShadowLevel(value) {\n this._primaryColorShadowLevel = value;\n this._computePrimaryColors();\n this._markAllSubMeshesAsLightsDirty();\n }\n /**\n * Defines the level of the highlights (highlight area of the reflection map) in order to help scaling the colors.\n * The primary color is used at the level chosen to define what the white area would look.\n */\n get primaryColorHighlightLevel() {\n return this._primaryColorHighlightLevel;\n }\n set primaryColorHighlightLevel(value) {\n this._primaryColorHighlightLevel = value;\n this._computePrimaryColors();\n this._markAllSubMeshesAsLightsDirty();\n }\n /**\n * Sets the reflection reflectance fresnel values according to the default standard\n * empirically know to work well :-)\n */\n set reflectionStandardFresnelWeight(value) {\n let reflectionWeight = value;\n if (reflectionWeight < 0.5) {\n reflectionWeight = reflectionWeight * 2.0;\n this.reflectionReflectance0 = BackgroundMaterial.StandardReflectance0 * reflectionWeight;\n this.reflectionReflectance90 = BackgroundMaterial.StandardReflectance90 * reflectionWeight;\n } else {\n reflectionWeight = reflectionWeight * 2.0 - 1.0;\n this.reflectionReflectance0 = BackgroundMaterial.StandardReflectance0 + (1.0 - BackgroundMaterial.StandardReflectance0) * reflectionWeight;\n this.reflectionReflectance90 = BackgroundMaterial.StandardReflectance90 + (1.0 - BackgroundMaterial.StandardReflectance90) * reflectionWeight;\n }\n }\n /**\n * The current fov(field of view) multiplier, 0.0 - 2.0. Defaults to 1.0. Lower values \"zoom in\" and higher values \"zoom out\".\n * Best used when trying to implement visual zoom effects like fish-eye or binoculars while not adjusting camera fov.\n * Recommended to be keep at 1.0 except for special cases.\n */\n get fovMultiplier() {\n return this._fovMultiplier;\n }\n set fovMultiplier(value) {\n if (isNaN(value)) {\n value = 1.0;\n }\n this._fovMultiplier = Math.max(0.0, Math.min(2.0, value));\n }\n /**\n * Attaches a new image processing configuration to the PBR Material.\n * @param configuration (if null the scene configuration will be use)\n */\n _attachImageProcessingConfiguration(configuration) {\n if (configuration === this._imageProcessingConfiguration) {\n return;\n }\n // Detaches observer.\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n // Pick the scene configuration if needed.\n if (!configuration) {\n this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;\n } else {\n this._imageProcessingConfiguration = configuration;\n }\n // Attaches observer.\n if (this._imageProcessingConfiguration) {\n this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {\n this._computePrimaryColorFromPerceptualColor();\n this._markAllSubMeshesAsImageProcessingDirty();\n });\n }\n }\n /**\n * Gets the image processing configuration used either in this material.\n */\n get imageProcessingConfiguration() {\n return this._imageProcessingConfiguration;\n }\n /**\n * Sets the Default image processing configuration used either in the this material.\n *\n * If sets to null, the scene one is in use.\n */\n set imageProcessingConfiguration(value) {\n this._attachImageProcessingConfiguration(value);\n // Ensure the effect will be rebuilt.\n this._markAllSubMeshesAsTexturesDirty();\n }\n /**\n * Gets whether the color curves effect is enabled.\n */\n get cameraColorCurvesEnabled() {\n return this.imageProcessingConfiguration.colorCurvesEnabled;\n }\n /**\n * Sets whether the color curves effect is enabled.\n */\n set cameraColorCurvesEnabled(value) {\n this.imageProcessingConfiguration.colorCurvesEnabled = value;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n get cameraColorGradingEnabled() {\n return this.imageProcessingConfiguration.colorGradingEnabled;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n set cameraColorGradingEnabled(value) {\n this.imageProcessingConfiguration.colorGradingEnabled = value;\n }\n /**\n * Gets whether tonemapping is enabled or not.\n */\n get cameraToneMappingEnabled() {\n return this._imageProcessingConfiguration.toneMappingEnabled;\n }\n /**\n * Sets whether tonemapping is enabled or not\n */\n set cameraToneMappingEnabled(value) {\n this._imageProcessingConfiguration.toneMappingEnabled = value;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n get cameraExposure() {\n return this._imageProcessingConfiguration.exposure;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n set cameraExposure(value) {\n this._imageProcessingConfiguration.exposure = value;\n }\n /**\n * Gets The camera contrast used on this material.\n */\n get cameraContrast() {\n return this._imageProcessingConfiguration.contrast;\n }\n /**\n * Sets The camera contrast used on this material.\n */\n set cameraContrast(value) {\n this._imageProcessingConfiguration.contrast = value;\n }\n /**\n * Gets the Color Grading 2D Lookup Texture.\n */\n get cameraColorGradingTexture() {\n return this._imageProcessingConfiguration.colorGradingTexture;\n }\n /**\n * Sets the Color Grading 2D Lookup Texture.\n */\n set cameraColorGradingTexture(value) {\n this.imageProcessingConfiguration.colorGradingTexture = value;\n }\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 */\n get cameraColorCurves() {\n return this.imageProcessingConfiguration.colorCurves;\n }\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 */\n set cameraColorCurves(value) {\n this.imageProcessingConfiguration.colorCurves = value;\n }\n /**\n * Instantiates a Background Material in the given scene\n * @param name The friendly name of the material\n * @param scene The scene to add the material to\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\n */\n constructor(name, scene, forceGLSL = false) {\n super(name, scene, undefined, forceGLSL);\n /**\n * Key light Color (multiply against the environment texture)\n */\n this.primaryColor = Color3.White();\n this._primaryColorShadowLevel = 0;\n this._primaryColorHighlightLevel = 0;\n /**\n * Reflection Texture used in the material.\n * Should be author in a specific way for the best result (refer to the documentation).\n */\n this.reflectionTexture = null;\n /**\n * Reflection Texture level of blur.\n *\n * Can be use to reuse an existing HDR Texture and target a specific LOD to prevent authoring the\n * texture twice.\n */\n this.reflectionBlur = 0;\n /**\n * Diffuse Texture used in the material.\n * Should be author in a specific way for the best result (refer to the documentation).\n */\n this.diffuseTexture = null;\n this._shadowLights = null;\n /**\n * Specify the list of lights casting shadow on the material.\n * All scene shadow lights will be included if null.\n */\n this.shadowLights = null;\n /**\n * Helps adjusting the shadow to a softer level if required.\n * 0 means black shadows and 1 means no shadows.\n */\n this.shadowLevel = 0;\n /**\n * In case of opacity Fresnel or reflection falloff, this is use as a scene center.\n * It is usually zero but might be interesting to modify according to your setup.\n */\n this.sceneCenter = Vector3.Zero();\n /**\n * This helps specifying that the material is falling off to the sky box at grazing angle.\n * This helps ensuring a nice transition when the camera goes under the ground.\n */\n this.opacityFresnel = true;\n /**\n * This helps specifying that the material is falling off from diffuse to the reflection texture at grazing angle.\n * This helps adding a mirror texture on the ground.\n */\n this.reflectionFresnel = false;\n /**\n * This helps specifying the falloff radius off the reflection texture from the sceneCenter.\n * This helps adding a nice falloff effect to the reflection if used as a mirror for instance.\n */\n this.reflectionFalloffDistance = 0.0;\n /**\n * This specifies the weight of the reflection against the background in case of reflection Fresnel.\n */\n this.reflectionAmount = 1.0;\n /**\n * This specifies the weight of the reflection at grazing angle.\n */\n this.reflectionReflectance0 = 0.05;\n /**\n * This specifies the weight of the reflection at a perpendicular point of view.\n */\n this.reflectionReflectance90 = 0.5;\n /**\n * Helps to directly use the maps channels instead of their level.\n */\n this.useRGBColor = true;\n /**\n * This helps reducing the banding effect that could occur on the background.\n */\n this.enableNoise = false;\n this._fovMultiplier = 1.0;\n /**\n * Enable the FOV adjustment feature controlled by fovMultiplier.\n */\n this.useEquirectangularFOV = false;\n this._maxSimultaneousLights = 4;\n /**\n * Number of Simultaneous lights allowed on the material.\n */\n this.maxSimultaneousLights = 4;\n this._shadowOnly = false;\n /**\n * Make the material only render shadows\n */\n this.shadowOnly = false;\n /**\n * Keep track of the image processing observer to allow dispose and replace.\n */\n this._imageProcessingObserver = null;\n /**\n * Due to a bug in iOS10, video tags (which are using the background material) are in BGR and not RGB.\n * Setting this flag to true (not done automatically!) will convert it back to RGB.\n */\n this.switchToBGR = false;\n this._enableGroundProjection = false;\n /**\n * Enables the ground projection mode on the material.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection\n */\n this.enableGroundProjection = false;\n /**\n * Defines the radius of the projected ground if enableGroundProjection is true.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection\n */\n this.projectedGroundRadius = 1000;\n /**\n * Defines the height of the projected ground if enableGroundProjection is true.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection\n */\n this.projectedGroundHeight = 10;\n // Temp values kept as cache in the material.\n this._renderTargets = new SmartArray(16);\n this._reflectionControls = Vector4.Zero();\n this._white = Color3.White();\n this._primaryShadowColor = Color3.Black();\n this._primaryHighlightColor = Color3.Black();\n this._shadersLoaded = false;\n // Setup the default processing configuration to the scene.\n this._attachImageProcessingConfiguration(null);\n this.getRenderTargetTextures = () => {\n this._renderTargets.reset();\n if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {\n this._renderTargets.push(this._diffuseTexture);\n }\n if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._renderTargets.push(this._reflectionTexture);\n }\n return this._renderTargets;\n };\n }\n /**\n * Gets a boolean indicating that current material needs to register RTT\n */\n get hasRenderTargetTextures() {\n if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {\n return true;\n }\n if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n return true;\n }\n return false;\n }\n /**\n * The entire material has been created in order to prevent overdraw.\n * @returns false\n */\n needAlphaTesting() {\n return true;\n }\n /**\n * The entire material has been created in order to prevent overdraw.\n * @returns true if blending is enable\n */\n needAlphaBlending() {\n return this.alpha < 1 || this._diffuseTexture != null && this._diffuseTexture.hasAlpha || this._shadowOnly;\n }\n /**\n * Checks whether the material is ready to be rendered for a given mesh.\n * @param mesh The mesh to render\n * @param subMesh The submesh to check against\n * @param useInstances Specify wether or not the material is used with instances\n * @returns true if all the dependencies are ready (Textures, Effects...)\n */\n isReadyForSubMesh(mesh, subMesh, useInstances = false) {\n var _this = this;\n const drawWrapper = subMesh._drawWrapper;\n if (drawWrapper.effect && this.isFrozen) {\n if (drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new BackgroundMaterialDefines();\n }\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Lights\n PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights);\n defines._needNormals = true;\n // Multiview\n PrepareDefinesForMultiview(scene, defines);\n // Textures\n if (defines._areTexturesDirty) {\n defines._needUVs = false;\n if (scene.texturesEnabled) {\n if (scene.getEngine().getCaps().textureLOD) {\n defines.TEXTURELODSUPPORT = true;\n }\n if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n if (!this._diffuseTexture.isReadyOrNotBlocking()) {\n return false;\n }\n PrepareDefinesForMergedUV(this._diffuseTexture, defines, \"DIFFUSE\");\n defines.DIFFUSEHASALPHA = this._diffuseTexture.hasAlpha;\n defines.GAMMADIFFUSE = this._diffuseTexture.gammaSpace;\n defines.OPACITYFRESNEL = this._opacityFresnel;\n } else {\n defines.DIFFUSE = false;\n defines.DIFFUSEDIRECTUV = 0;\n defines.DIFFUSEHASALPHA = false;\n defines.GAMMADIFFUSE = false;\n defines.OPACITYFRESNEL = false;\n }\n const reflectionTexture = this._reflectionTexture;\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n if (!reflectionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n defines.REFLECTION = true;\n defines.GAMMAREFLECTION = reflectionTexture.gammaSpace;\n defines.RGBDREFLECTION = reflectionTexture.isRGBD;\n defines.REFLECTIONBLUR = this._reflectionBlur > 0;\n defines.LODINREFLECTIONALPHA = reflectionTexture.lodLevelInAlpha;\n defines.EQUIRECTANGULAR_RELFECTION_FOV = this.useEquirectangularFOV;\n defines.REFLECTIONBGR = this.switchToBGR;\n if (reflectionTexture.coordinatesMode === Texture.INVCUBIC_MODE) {\n defines.INVERTCUBICMAP = true;\n }\n defines.REFLECTIONMAP_3D = reflectionTexture.isCube;\n defines.REFLECTIONMAP_OPPOSITEZ = defines.REFLECTIONMAP_3D && this.getScene().useRightHandedSystem ? !reflectionTexture.invertZ : reflectionTexture.invertZ;\n switch (reflectionTexture.coordinatesMode) {\n case Texture.EXPLICIT_MODE:\n defines.REFLECTIONMAP_EXPLICIT = true;\n break;\n case Texture.PLANAR_MODE:\n defines.REFLECTIONMAP_PLANAR = true;\n break;\n case Texture.PROJECTION_MODE:\n defines.REFLECTIONMAP_PROJECTION = true;\n break;\n case Texture.SKYBOX_MODE:\n defines.REFLECTIONMAP_SKYBOX = true;\n break;\n case Texture.SPHERICAL_MODE:\n defines.REFLECTIONMAP_SPHERICAL = true;\n break;\n case Texture.EQUIRECTANGULAR_MODE:\n defines.REFLECTIONMAP_EQUIRECTANGULAR = true;\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MODE:\n defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = true;\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:\n defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = true;\n break;\n case Texture.CUBIC_MODE:\n case Texture.INVCUBIC_MODE:\n default:\n defines.REFLECTIONMAP_CUBIC = true;\n break;\n }\n if (this.reflectionFresnel) {\n defines.REFLECTIONFRESNEL = true;\n defines.REFLECTIONFALLOFF = this.reflectionFalloffDistance > 0;\n this._reflectionControls.x = this.reflectionAmount;\n this._reflectionControls.y = this.reflectionReflectance0;\n this._reflectionControls.z = this.reflectionReflectance90;\n this._reflectionControls.w = 1 / this.reflectionFalloffDistance;\n } else {\n defines.REFLECTIONFRESNEL = false;\n defines.REFLECTIONFALLOFF = false;\n }\n } else {\n defines.REFLECTION = false;\n defines.REFLECTIONFRESNEL = false;\n defines.REFLECTIONFALLOFF = false;\n defines.REFLECTIONBLUR = false;\n defines.REFLECTIONMAP_3D = false;\n defines.REFLECTIONMAP_SPHERICAL = false;\n defines.REFLECTIONMAP_PLANAR = false;\n defines.REFLECTIONMAP_CUBIC = false;\n defines.REFLECTIONMAP_PROJECTION = false;\n defines.REFLECTIONMAP_SKYBOX = false;\n defines.REFLECTIONMAP_EXPLICIT = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n defines.INVERTCUBICMAP = false;\n defines.REFLECTIONMAP_OPPOSITEZ = false;\n defines.LODINREFLECTIONALPHA = false;\n defines.GAMMAREFLECTION = false;\n defines.RGBDREFLECTION = false;\n }\n }\n defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;\n defines.USERGBCOLOR = this._useRGBColor;\n defines.NOISE = this._enableNoise;\n }\n if (defines._areLightsDirty) {\n defines.USEHIGHLIGHTANDSHADOWCOLORS = !this._useRGBColor && (this._primaryColorShadowLevel !== 0 || this._primaryColorHighlightLevel !== 0);\n defines.BACKMAT_SHADOWONLY = this._shadowOnly;\n }\n if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {\n if (!this._imageProcessingConfiguration.isReady()) {\n return false;\n }\n this._imageProcessingConfiguration.prepareDefines(defines);\n }\n if (defines._areMiscDirty) {\n if (defines.REFLECTIONMAP_3D && this._enableGroundProjection) {\n defines.PROJECTED_GROUND = true;\n defines.REFLECTIONMAP_SKYBOX = true;\n } else {\n defines.PROJECTED_GROUND = false;\n }\n }\n // Misc.\n PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines);\n // Values that need to be evaluated on every frame\n PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);\n // Attribs\n if (PrepareDefinesForAttributes(mesh, defines, false, true, false)) {\n if (mesh) {\n if (!scene.getEngine().getCaps().standardDerivatives && !mesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n mesh.createNormals(true);\n Logger.Warn(\"BackgroundMaterial: Normals have been created for the mesh: \" + mesh.name);\n }\n }\n }\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(0, \"FOG\");\n }\n if (defines.POINTSIZE) {\n fallbacks.addFallback(1, \"POINTSIZE\");\n }\n if (defines.MULTIVIEW) {\n fallbacks.addFallback(0, \"MULTIVIEW\");\n }\n HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n PrepareAttributesForBones(attribs, mesh, defines, fallbacks);\n PrepareAttributesForInstances(attribs, defines);\n const uniforms = [\"world\", \"view\", \"viewProjection\", \"vEyePosition\", \"vLightsType\", \"vFogInfos\", \"vFogColor\", \"pointSize\", \"mBones\", \"vPrimaryColor\", \"vPrimaryColorShadow\", \"vReflectionInfos\", \"reflectionMatrix\", \"vReflectionMicrosurfaceInfos\", \"fFovMultiplier\", \"shadowLevel\", \"alpha\", \"vBackgroundCenter\", \"vReflectionControl\", \"vDiffuseInfos\", \"diffuseMatrix\", \"projectedGroundInfos\", \"logarithmicDepthConstant\"];\n addClipPlaneUniforms(uniforms);\n const samplers = [\"diffuseSampler\", \"reflectionSampler\", \"reflectionSamplerLow\", \"reflectionSamplerHigh\"];\n const uniformBuffers = [\"Material\", \"Scene\"];\n if (ImageProcessingConfiguration) {\n ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);\n ImageProcessingConfiguration.PrepareSamplers(samplers, defines);\n }\n PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: this._maxSimultaneousLights\n });\n const join = defines.toString();\n const effect = scene.getEngine().createEffect(\"background\", {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: {\n maxSimultaneousLights: this._maxSimultaneousLights\n },\n shaderLanguage: this._shaderLanguage,\n extraInitializationsAsync: this._shadersLoaded ? undefined : /*#__PURE__*/_asyncToGenerator(function* () {\n if (_this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n yield Promise.all([import(\"../../ShadersWGSL/background.vertex.js\"), import(\"../../ShadersWGSL/background.fragment.js\")]);\n } else {\n yield Promise.all([import(\"../../Shaders/background.vertex.js\"), import(\"../../Shaders/background.fragment.js\")]);\n }\n _this._shadersLoaded = true;\n })\n }, engine);\n subMesh.setEffect(effect, defines, this._materialContext);\n this.buildUniformLayout();\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n drawWrapper._wasPreviouslyReady = true;\n drawWrapper._wasPreviouslyUsingInstances = useInstances;\n this._checkScenePerformancePriority();\n return true;\n }\n /**\n * Compute the primary color according to the chosen perceptual color.\n */\n _computePrimaryColorFromPerceptualColor() {\n if (!this.__perceptualColor) {\n return;\n }\n this._primaryColor.copyFrom(this.__perceptualColor);\n // Revert gamma space.\n this._primaryColor.toLinearSpaceToRef(this._primaryColor, this.getScene().getEngine().useExactSrgbConversions);\n // Revert image processing configuration.\n if (this._imageProcessingConfiguration) {\n // Revert Exposure.\n this._primaryColor.scaleToRef(1 / this._imageProcessingConfiguration.exposure, this._primaryColor);\n }\n this._computePrimaryColors();\n }\n /**\n * Compute the highlights and shadow colors according to their chosen levels.\n */\n _computePrimaryColors() {\n if (this._primaryColorShadowLevel === 0 && this._primaryColorHighlightLevel === 0) {\n return;\n }\n // Find the highlight color based on the configuration.\n this._primaryColor.scaleToRef(this._primaryColorShadowLevel, this._primaryShadowColor);\n this._primaryColor.subtractToRef(this._primaryShadowColor, this._primaryShadowColor);\n // Find the shadow color based on the configuration.\n this._white.subtractToRef(this._primaryColor, this._primaryHighlightColor);\n this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel, this._primaryHighlightColor);\n this._primaryColor.addToRef(this._primaryHighlightColor, this._primaryHighlightColor);\n }\n /**\n * Build the uniform buffer used in the material.\n */\n buildUniformLayout() {\n // Order is important !\n this._uniformBuffer.addUniform(\"vPrimaryColor\", 4);\n this._uniformBuffer.addUniform(\"vPrimaryColorShadow\", 4);\n this._uniformBuffer.addUniform(\"vDiffuseInfos\", 2);\n this._uniformBuffer.addUniform(\"vReflectionInfos\", 2);\n this._uniformBuffer.addUniform(\"diffuseMatrix\", 16);\n this._uniformBuffer.addUniform(\"reflectionMatrix\", 16);\n this._uniformBuffer.addUniform(\"vReflectionMicrosurfaceInfos\", 3);\n this._uniformBuffer.addUniform(\"fFovMultiplier\", 1);\n this._uniformBuffer.addUniform(\"pointSize\", 1);\n this._uniformBuffer.addUniform(\"shadowLevel\", 1);\n this._uniformBuffer.addUniform(\"alpha\", 1);\n this._uniformBuffer.addUniform(\"vBackgroundCenter\", 3);\n this._uniformBuffer.addUniform(\"vReflectionControl\", 4);\n this._uniformBuffer.addUniform(\"projectedGroundInfos\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Unbind the material.\n */\n unbind() {\n if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {\n this._uniformBuffer.setTexture(\"diffuseSampler\", null);\n }\n if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._uniformBuffer.setTexture(\"reflectionSampler\", null);\n }\n super.unbind();\n }\n /**\n * Bind only the world matrix to the material.\n * @param world The world matrix to bind.\n */\n bindOnlyWorldMatrix(world) {\n this._activeEffect.setMatrix(\"world\", world);\n }\n /**\n * Bind the material for a dedicated submesh (every used meshes will be considered opaque).\n * @param world The world matrix to bind.\n * @param mesh the mesh to bind for.\n * @param subMesh The submesh to bind for.\n */\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n // Bones\n BindBonesParameters(mesh, this._activeEffect);\n const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);\n if (mustRebind) {\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this.bindViewProjection(effect);\n const reflectionTexture = this._reflectionTexture;\n if (!this._uniformBuffer.useUbo || !this.isFrozen || !this._uniformBuffer.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {\n // Texture uniforms\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n this._uniformBuffer.updateFloat2(\"vDiffuseInfos\", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);\n BindTextureMatrix(this._diffuseTexture, this._uniformBuffer, \"diffuse\");\n }\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n this._uniformBuffer.updateMatrix(\"reflectionMatrix\", reflectionTexture.getReflectionTextureMatrix());\n this._uniformBuffer.updateFloat2(\"vReflectionInfos\", reflectionTexture.level, this._reflectionBlur);\n this._uniformBuffer.updateFloat3(\"vReflectionMicrosurfaceInfos\", reflectionTexture.getSize().width, reflectionTexture.lodGenerationScale, reflectionTexture.lodGenerationOffset);\n }\n }\n if (this.shadowLevel > 0) {\n this._uniformBuffer.updateFloat(\"shadowLevel\", this.shadowLevel);\n }\n this._uniformBuffer.updateFloat(\"alpha\", this.alpha);\n // Point size\n if (this.pointsCloud) {\n this._uniformBuffer.updateFloat(\"pointSize\", this.pointSize);\n }\n if (defines.USEHIGHLIGHTANDSHADOWCOLORS) {\n this._uniformBuffer.updateColor4(\"vPrimaryColor\", this._primaryHighlightColor, 1.0);\n this._uniformBuffer.updateColor4(\"vPrimaryColorShadow\", this._primaryShadowColor, 1.0);\n } else {\n this._uniformBuffer.updateColor4(\"vPrimaryColor\", this._primaryColor, 1.0);\n }\n }\n this._uniformBuffer.updateFloat(\"fFovMultiplier\", this._fovMultiplier);\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n this._uniformBuffer.setTexture(\"diffuseSampler\", this._diffuseTexture);\n }\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n if (defines.REFLECTIONBLUR && defines.TEXTURELODSUPPORT) {\n this._uniformBuffer.setTexture(\"reflectionSampler\", reflectionTexture);\n } else if (!defines.REFLECTIONBLUR) {\n this._uniformBuffer.setTexture(\"reflectionSampler\", reflectionTexture);\n } else {\n this._uniformBuffer.setTexture(\"reflectionSampler\", reflectionTexture._lodTextureMid || reflectionTexture);\n this._uniformBuffer.setTexture(\"reflectionSamplerLow\", reflectionTexture._lodTextureLow || reflectionTexture);\n this._uniformBuffer.setTexture(\"reflectionSamplerHigh\", reflectionTexture._lodTextureHigh || reflectionTexture);\n }\n if (defines.REFLECTIONFRESNEL) {\n this._uniformBuffer.updateFloat3(\"vBackgroundCenter\", this.sceneCenter.x, this.sceneCenter.y, this.sceneCenter.z);\n this._uniformBuffer.updateFloat4(\"vReflectionControl\", this._reflectionControls.x, this._reflectionControls.y, this._reflectionControls.z, this._reflectionControls.w);\n }\n }\n if (defines.PROJECTED_GROUND) {\n this._uniformBuffer.updateFloat2(\"projectedGroundInfos\", this.projectedGroundRadius, this.projectedGroundHeight);\n }\n }\n // Clip plane\n bindClipPlane(this._activeEffect, this, scene);\n scene.bindEyePosition(effect);\n } else if (scene.getEngine()._features.needToAlwaysBindUniformBuffers) {\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this._needToBindSceneUbo = true;\n }\n if (mustRebind || !this.isFrozen) {\n if (scene.lightsEnabled) {\n BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights);\n }\n // View\n this.bindView(effect);\n // Fog\n BindFogParameters(scene, mesh, this._activeEffect, true);\n // Log. depth\n if (this._useLogarithmicDepth) {\n BindLogDepth(defines, effect, scene);\n }\n // image processing\n if (this._imageProcessingConfiguration) {\n this._imageProcessingConfiguration.bind(this._activeEffect);\n }\n }\n this._afterBind(mesh, this._activeEffect, subMesh);\n this._uniformBuffer.update();\n }\n /**\n * Checks to see if a texture is used in the material.\n * @param texture - Base texture to use.\n * @returns - Boolean specifying if a texture is used in the material.\n */\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n if (this._reflectionTexture === texture) {\n return true;\n }\n if (this._diffuseTexture === texture) {\n return true;\n }\n return false;\n }\n /**\n * Dispose the material.\n * @param forceDisposeEffect Force disposal of the associated effect.\n * @param forceDisposeTextures Force disposal of the associated textures.\n */\n dispose(forceDisposeEffect = false, forceDisposeTextures = false) {\n if (forceDisposeTextures) {\n if (this.diffuseTexture) {\n this.diffuseTexture.dispose();\n }\n if (this.reflectionTexture) {\n this.reflectionTexture.dispose();\n }\n }\n this._renderTargets.dispose();\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n super.dispose(forceDisposeEffect);\n }\n /**\n * Clones the material.\n * @param name The cloned name.\n * @returns The cloned material.\n */\n clone(name) {\n return SerializationHelper.Clone(() => new BackgroundMaterial(name, this.getScene()), this);\n }\n /**\n * Serializes the current material to its JSON representation.\n * @returns The JSON representation.\n */\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.BackgroundMaterial\";\n return serializationObject;\n }\n /**\n * Gets the class name of the material\n * @returns \"BackgroundMaterial\"\n */\n getClassName() {\n return \"BackgroundMaterial\";\n }\n /**\n * Parse a JSON input to create back a background material.\n * @param source The JSON data to parse\n * @param scene The scene to create the parsed material in\n * @param rootUrl The root url of the assets the material depends upon\n * @returns the instantiated BackgroundMaterial.\n */\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new BackgroundMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * Standard reflectance value at parallel view angle.\n */\nBackgroundMaterial.StandardReflectance0 = 0.05;\n/**\n * Standard reflectance value at grazing angle.\n */\nBackgroundMaterial.StandardReflectance90 = 0.5;\n__decorate([serializeAsColor3()], BackgroundMaterial.prototype, \"_primaryColor\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsLightsDirty\")], BackgroundMaterial.prototype, \"primaryColor\", void 0);\n__decorate([serializeAsColor3()], BackgroundMaterial.prototype, \"__perceptualColor\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_primaryColorShadowLevel\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_primaryColorHighlightLevel\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsLightsDirty\")], BackgroundMaterial.prototype, \"primaryColorHighlightLevel\", null);\n__decorate([serializeAsTexture()], BackgroundMaterial.prototype, \"_reflectionTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"reflectionTexture\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_reflectionBlur\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"reflectionBlur\", void 0);\n__decorate([serializeAsTexture()], BackgroundMaterial.prototype, \"_diffuseTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"diffuseTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"shadowLights\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_shadowLevel\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"shadowLevel\", void 0);\n__decorate([serializeAsVector3()], BackgroundMaterial.prototype, \"_sceneCenter\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"sceneCenter\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_opacityFresnel\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"opacityFresnel\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_reflectionFresnel\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"reflectionFresnel\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_reflectionFalloffDistance\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"reflectionFalloffDistance\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_reflectionAmount\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"reflectionAmount\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_reflectionReflectance0\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"reflectionReflectance0\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_reflectionReflectance90\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"reflectionReflectance90\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_useRGBColor\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"useRGBColor\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_enableNoise\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"enableNoise\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_maxSimultaneousLights\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], BackgroundMaterial.prototype, \"maxSimultaneousLights\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"_shadowOnly\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsLightsDirty\")], BackgroundMaterial.prototype, \"shadowOnly\", void 0);\n__decorate([serializeAsImageProcessingConfiguration()], BackgroundMaterial.prototype, \"_imageProcessingConfiguration\", void 0);\n__decorate([serialize(), expandToProperty(\"_markAllSubMeshesAsMiscDirty\")], BackgroundMaterial.prototype, \"enableGroundProjection\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"projectedGroundRadius\", void 0);\n__decorate([serialize()], BackgroundMaterial.prototype, \"projectedGroundHeight\", void 0);\nRegisterClass(\"BABYLON.BackgroundMaterial\", BackgroundMaterial);","map":{"version":3,"names":["__decorate","serialize","serializeAsColor3","expandToProperty","serializeAsTexture","serializeAsVector3","serializeAsImageProcessingConfiguration","SmartArray","Logger","Vector3","Vector4","VertexBuffer","MaterialDefines","PushMaterial","ImageProcessingConfiguration","Texture","RegisterClass","MaterialFlags","Color3","EffectFallbacks","addClipPlaneUniforms","bindClipPlane","BindBonesParameters","BindFogParameters","BindLights","BindLogDepth","BindTextureMatrix","HandleFallbacksForShadows","PrepareAttributesForBones","PrepareAttributesForInstances","PrepareDefinesForAttributes","PrepareDefinesForFrameBoundValues","PrepareDefinesForLights","PrepareDefinesForMergedUV","PrepareDefinesForMisc","PrepareDefinesForMultiview","PrepareUniformsAndSamplersList","SerializationHelper","BackgroundMaterialDefines","constructor","DIFFUSE","DIFFUSEDIRECTUV","GAMMADIFFUSE","DIFFUSEHASALPHA","OPACITYFRESNEL","REFLECTIONBLUR","REFLECTIONFRESNEL","REFLECTIONFALLOFF","TEXTURELODSUPPORT","PREMULTIPLYALPHA","USERGBCOLOR","USEHIGHLIGHTANDSHADOWCOLORS","BACKMAT_SHADOWONLY","NOISE","REFLECTIONBGR","PROJECTED_GROUND","IMAGEPROCESSING","VIGNETTE","VIGNETTEBLENDMODEMULTIPLY","VIGNETTEBLENDMODEOPAQUE","TONEMAPPING","CONTRAST","COLORCURVES","COLORGRADING","COLORGRADING3D","SAMPLER3DGREENDEPTH","SAMPLER3DBGRMAP","DITHER","IMAGEPROCESSINGPOSTPROCESS","SKIPFINALCOLORCLAMP","EXPOSURE","MULTIVIEW","REFLECTION","REFLECTIONMAP_3D","REFLECTIONMAP_SPHERICAL","REFLECTIONMAP_PLANAR","REFLECTIONMAP_CUBIC","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_SKYBOX","REFLECTIONMAP_EXPLICIT","REFLECTIONMAP_EQUIRECTANGULAR","REFLECTIONMAP_EQUIRECTANGULAR_FIXED","REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED","INVERTCUBICMAP","REFLECTIONMAP_OPPOSITEZ","LODINREFLECTIONALPHA","GAMMAREFLECTION","RGBDREFLECTION","EQUIRECTANGULAR_RELFECTION_FOV","MAINUV1","MAINUV2","UV1","UV2","CLIPPLANE","CLIPPLANE2","CLIPPLANE3","CLIPPLANE4","CLIPPLANE5","CLIPPLANE6","POINTSIZE","FOG","NORMAL","NUM_BONE_INFLUENCERS","BonesPerMesh","INSTANCES","SHADOWFLOAT","LOGARITHMICDEPTH","NONUNIFORMSCALING","ALPHATEST","rebuild","BackgroundMaterial","_perceptualColor","__perceptualColor","value","_computePrimaryColorFromPerceptualColor","_markAllSubMeshesAsLightsDirty","primaryColorShadowLevel","_primaryColorShadowLevel","_computePrimaryColors","primaryColorHighlightLevel","_primaryColorHighlightLevel","reflectionStandardFresnelWeight","reflectionWeight","reflectionReflectance0","StandardReflectance0","reflectionReflectance90","StandardReflectance90","fovMultiplier","_fovMultiplier","isNaN","Math","max","min","_attachImageProcessingConfiguration","configuration","_imageProcessingConfiguration","_imageProcessingObserver","onUpdateParameters","remove","getScene","imageProcessingConfiguration","add","_markAllSubMeshesAsImageProcessingDirty","_markAllSubMeshesAsTexturesDirty","cameraColorCurvesEnabled","colorCurvesEnabled","cameraColorGradingEnabled","colorGradingEnabled","cameraToneMappingEnabled","toneMappingEnabled","cameraExposure","exposure","cameraContrast","contrast","cameraColorGradingTexture","colorGradingTexture","cameraColorCurves","colorCurves","name","scene","forceGLSL","undefined","primaryColor","White","reflectionTexture","reflectionBlur","diffuseTexture","_shadowLights","shadowLights","shadowLevel","sceneCenter","Zero","opacityFresnel","reflectionFresnel","reflectionFalloffDistance","reflectionAmount","useRGBColor","enableNoise","useEquirectangularFOV","_maxSimultaneousLights","maxSimultaneousLights","_shadowOnly","shadowOnly","switchToBGR","_enableGroundProjection","enableGroundProjection","projectedGroundRadius","projectedGroundHeight","_renderTargets","_reflectionControls","_white","_primaryShadowColor","Black","_primaryHighlightColor","_shadersLoaded","getRenderTargetTextures","reset","_diffuseTexture","isRenderTarget","push","_reflectionTexture","hasRenderTargetTextures","needAlphaTesting","needAlphaBlending","alpha","hasAlpha","isReadyForSubMesh","mesh","subMesh","useInstances","_this","drawWrapper","_drawWrapper","effect","isFrozen","_wasPreviouslyReady","_wasPreviouslyUsingInstances","materialDefines","defines","_isReadyForSubMesh","engine","getEngine","_needNormals","_areTexturesDirty","_needUVs","texturesEnabled","getCaps","textureLOD","DiffuseTextureEnabled","isReadyOrNotBlocking","gammaSpace","_opacityFresnel","ReflectionTextureEnabled","isRGBD","_reflectionBlur","lodLevelInAlpha","coordinatesMode","INVCUBIC_MODE","isCube","useRightHandedSystem","invertZ","EXPLICIT_MODE","PLANAR_MODE","PROJECTION_MODE","SKYBOX_MODE","SPHERICAL_MODE","EQUIRECTANGULAR_MODE","FIXED_EQUIRECTANGULAR_MODE","FIXED_EQUIRECTANGULAR_MIRRORED_MODE","CUBIC_MODE","x","y","z","w","alphaMode","_useRGBColor","_enableNoise","_areLightsDirty","_areImageProcessingDirty","isReady","prepareDefines","_areMiscDirty","_useLogarithmicDepth","pointsCloud","fogEnabled","_shouldTurnAlphaTestOn","getRenderingMesh","hasThinInstances","standardDerivatives","isVerticesDataPresent","NormalKind","createNormals","Warn","isDirty","markAsProcessed","resetCachedMaterial","fallbacks","addFallback","attribs","PositionKind","UVKind","UV2Kind","uniforms","samplers","uniformBuffers","PrepareUniforms","PrepareSamplers","uniformsNames","uniformBuffersNames","join","toString","createEffect","attributes","onCompiled","onError","indexParameters","shaderLanguage","_shaderLanguage","extraInitializationsAsync","_asyncToGenerator","Promise","all","setEffect","_materialContext","buildUniformLayout","_renderId","getRenderId","_checkScenePerformancePriority","_primaryColor","copyFrom","toLinearSpaceToRef","useExactSrgbConversions","scaleToRef","subtractToRef","addToRef","_uniformBuffer","addUniform","create","unbind","setTexture","bindOnlyWorldMatrix","world","_activeEffect","setMatrix","bindForSubMesh","mustRebind","_mustRebind","visibility","bindToEffect","bindViewProjection","useUbo","isSync","_forceRebindOnNextCall","updateFloat2","coordinatesIndex","level","updateMatrix","getReflectionTextureMatrix","updateFloat3","getSize","width","lodGenerationScale","lodGenerationOffset","updateFloat","pointSize","updateColor4","_lodTextureMid","_lodTextureLow","_lodTextureHigh","updateFloat4","bindEyePosition","_features","needToAlwaysBindUniformBuffers","_needToBindSceneUbo","lightsEnabled","bindView","bind","_afterBind","update","hasTexture","texture","dispose","forceDisposeEffect","forceDisposeTextures","clone","Clone","serializationObject","customType","getClassName","Parse","source","rootUrl","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Background/backgroundMaterial.js"],"sourcesContent":["import { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, serializeAsColor3, expandToProperty, serializeAsTexture, serializeAsVector3, serializeAsImageProcessingConfiguration } from \"../../Misc/decorators.js\";\nimport { SmartArray } from \"../../Misc/smartArray.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { Vector3, Vector4 } from \"../../Maths/math.vector.js\";\nimport { VertexBuffer } from \"../../Buffers/buffer.js\";\nimport { MaterialDefines } from \"../../Materials/materialDefines.js\";\nimport { PushMaterial } from \"../../Materials/pushMaterial.js\";\nimport { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\n\nimport { RegisterClass } from \"../../Misc/typeStore.js\";\nimport { MaterialFlags } from \"../materialFlags.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { EffectFallbacks } from \"../effectFallbacks.js\";\nimport { addClipPlaneUniforms, bindClipPlane } from \"../clipPlaneMaterialHelper.js\";\nimport { BindBonesParameters, BindFogParameters, BindLights, BindLogDepth, BindTextureMatrix, HandleFallbacksForShadows, PrepareAttributesForBones, PrepareAttributesForInstances, PrepareDefinesForAttributes, PrepareDefinesForFrameBoundValues, PrepareDefinesForLights, PrepareDefinesForMergedUV, PrepareDefinesForMisc, PrepareDefinesForMultiview, PrepareUniformsAndSamplersList, } from \"../materialHelper.functions.js\";\nimport { SerializationHelper } from \"../../Misc/decorators.serialization.js\";\n/**\n * Background material defines definition.\n * @internal Mainly internal Use\n */\nclass BackgroundMaterialDefines extends MaterialDefines {\n /**\n * Constructor of the defines.\n */\n constructor() {\n super();\n /**\n * True if the diffuse texture is in use.\n */\n this.DIFFUSE = false;\n /**\n * The direct UV channel to use.\n */\n this.DIFFUSEDIRECTUV = 0;\n /**\n * True if the diffuse texture is in gamma space.\n */\n this.GAMMADIFFUSE = false;\n /**\n * True if the diffuse texture has opacity in the alpha channel.\n */\n this.DIFFUSEHASALPHA = false;\n /**\n * True if you want the material to fade to transparent at grazing angle.\n */\n this.OPACITYFRESNEL = false;\n /**\n * True if an extra blur needs to be added in the reflection.\n */\n this.REFLECTIONBLUR = false;\n /**\n * True if you want the material to fade to reflection at grazing angle.\n */\n this.REFLECTIONFRESNEL = false;\n /**\n * True if you want the material to falloff as far as you move away from the scene center.\n */\n this.REFLECTIONFALLOFF = false;\n /**\n * False if the current Webgl implementation does not support the texture lod extension.\n */\n this.TEXTURELODSUPPORT = false;\n /**\n * True to ensure the data are premultiplied.\n */\n this.PREMULTIPLYALPHA = false;\n /**\n * True if the texture contains cooked RGB values and not gray scaled multipliers.\n */\n this.USERGBCOLOR = false;\n /**\n * True if highlight and shadow levels have been specified. It can help ensuring the main perceived color\n * stays aligned with the desired configuration.\n */\n this.USEHIGHLIGHTANDSHADOWCOLORS = false;\n /**\n * True if only shadows must be rendered\n */\n this.BACKMAT_SHADOWONLY = false;\n /**\n * True to add noise in order to reduce the banding effect.\n */\n this.NOISE = false;\n /**\n * is the reflection texture in BGR color scheme?\n * Mainly used to solve a bug in ios10 video tag\n */\n this.REFLECTIONBGR = false;\n /**\n * True if ground projection has been enabled.\n */\n this.PROJECTED_GROUND = false;\n this.IMAGEPROCESSING = false;\n this.VIGNETTE = false;\n this.VIGNETTEBLENDMODEMULTIPLY = false;\n this.VIGNETTEBLENDMODEOPAQUE = false;\n this.TONEMAPPING = 0;\n this.CONTRAST = false;\n this.COLORCURVES = false;\n this.COLORGRADING = false;\n this.COLORGRADING3D = false;\n this.SAMPLER3DGREENDEPTH = false;\n this.SAMPLER3DBGRMAP = false;\n this.DITHER = false;\n this.IMAGEPROCESSINGPOSTPROCESS = false;\n this.SKIPFINALCOLORCLAMP = false;\n this.EXPOSURE = false;\n this.MULTIVIEW = false;\n // Reflection.\n this.REFLECTION = false;\n this.REFLECTIONMAP_3D = false;\n this.REFLECTIONMAP_SPHERICAL = false;\n this.REFLECTIONMAP_PLANAR = false;\n this.REFLECTIONMAP_CUBIC = false;\n this.REFLECTIONMAP_PROJECTION = false;\n this.REFLECTIONMAP_SKYBOX = false;\n this.REFLECTIONMAP_EXPLICIT = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR = false;\n this.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n this.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n this.INVERTCUBICMAP = false;\n this.REFLECTIONMAP_OPPOSITEZ = false;\n this.LODINREFLECTIONALPHA = false;\n this.GAMMAREFLECTION = false;\n this.RGBDREFLECTION = false;\n this.EQUIRECTANGULAR_RELFECTION_FOV = false;\n // Default BJS.\n this.MAINUV1 = false;\n this.MAINUV2 = false;\n this.UV1 = false;\n this.UV2 = false;\n this.CLIPPLANE = false;\n this.CLIPPLANE2 = false;\n this.CLIPPLANE3 = false;\n this.CLIPPLANE4 = false;\n this.CLIPPLANE5 = false;\n this.CLIPPLANE6 = false;\n this.POINTSIZE = false;\n this.FOG = false;\n this.NORMAL = false;\n this.NUM_BONE_INFLUENCERS = 0;\n this.BonesPerMesh = 0;\n this.INSTANCES = false;\n this.SHADOWFLOAT = false;\n this.LOGARITHMICDEPTH = false;\n this.NONUNIFORMSCALING = false;\n this.ALPHATEST = false;\n this.rebuild();\n }\n}\n/**\n * Background material used to create an efficient environment around your scene.\n * #157MGZ: simple test\n */\nexport class BackgroundMaterial extends PushMaterial {\n /**\n * Experimental Internal Use Only.\n *\n * Key light Color in \"perceptual value\" meaning the color you would like to see on screen.\n * This acts as a helper to set the primary color to a more \"human friendly\" value.\n * Conversion to linear space as well as exposure and tone mapping correction will be applied to keep the\n * output color as close as possible from the chosen value.\n * (This does not account for contrast color grading and color curves as they are considered post effect and not directly\n * part of lighting setup.)\n */\n get _perceptualColor() {\n return this.__perceptualColor;\n }\n set _perceptualColor(value) {\n this.__perceptualColor = value;\n this._computePrimaryColorFromPerceptualColor();\n this._markAllSubMeshesAsLightsDirty();\n }\n /**\n * Defines the level of the shadows (dark area of the reflection map) in order to help scaling the colors.\n * The color opposite to the primary color is used at the level chosen to define what the black area would look.\n */\n get primaryColorShadowLevel() {\n return this._primaryColorShadowLevel;\n }\n set primaryColorShadowLevel(value) {\n this._primaryColorShadowLevel = value;\n this._computePrimaryColors();\n this._markAllSubMeshesAsLightsDirty();\n }\n /**\n * Defines the level of the highlights (highlight area of the reflection map) in order to help scaling the colors.\n * The primary color is used at the level chosen to define what the white area would look.\n */\n get primaryColorHighlightLevel() {\n return this._primaryColorHighlightLevel;\n }\n set primaryColorHighlightLevel(value) {\n this._primaryColorHighlightLevel = value;\n this._computePrimaryColors();\n this._markAllSubMeshesAsLightsDirty();\n }\n /**\n * Sets the reflection reflectance fresnel values according to the default standard\n * empirically know to work well :-)\n */\n set reflectionStandardFresnelWeight(value) {\n let reflectionWeight = value;\n if (reflectionWeight < 0.5) {\n reflectionWeight = reflectionWeight * 2.0;\n this.reflectionReflectance0 = BackgroundMaterial.StandardReflectance0 * reflectionWeight;\n this.reflectionReflectance90 = BackgroundMaterial.StandardReflectance90 * reflectionWeight;\n }\n else {\n reflectionWeight = reflectionWeight * 2.0 - 1.0;\n this.reflectionReflectance0 = BackgroundMaterial.StandardReflectance0 + (1.0 - BackgroundMaterial.StandardReflectance0) * reflectionWeight;\n this.reflectionReflectance90 = BackgroundMaterial.StandardReflectance90 + (1.0 - BackgroundMaterial.StandardReflectance90) * reflectionWeight;\n }\n }\n /**\n * The current fov(field of view) multiplier, 0.0 - 2.0. Defaults to 1.0. Lower values \"zoom in\" and higher values \"zoom out\".\n * Best used when trying to implement visual zoom effects like fish-eye or binoculars while not adjusting camera fov.\n * Recommended to be keep at 1.0 except for special cases.\n */\n get fovMultiplier() {\n return this._fovMultiplier;\n }\n set fovMultiplier(value) {\n if (isNaN(value)) {\n value = 1.0;\n }\n this._fovMultiplier = Math.max(0.0, Math.min(2.0, value));\n }\n /**\n * Attaches a new image processing configuration to the PBR Material.\n * @param configuration (if null the scene configuration will be use)\n */\n _attachImageProcessingConfiguration(configuration) {\n if (configuration === this._imageProcessingConfiguration) {\n return;\n }\n // Detaches observer.\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n // Pick the scene configuration if needed.\n if (!configuration) {\n this._imageProcessingConfiguration = this.getScene().imageProcessingConfiguration;\n }\n else {\n this._imageProcessingConfiguration = configuration;\n }\n // Attaches observer.\n if (this._imageProcessingConfiguration) {\n this._imageProcessingObserver = this._imageProcessingConfiguration.onUpdateParameters.add(() => {\n this._computePrimaryColorFromPerceptualColor();\n this._markAllSubMeshesAsImageProcessingDirty();\n });\n }\n }\n /**\n * Gets the image processing configuration used either in this material.\n */\n get imageProcessingConfiguration() {\n return this._imageProcessingConfiguration;\n }\n /**\n * Sets the Default image processing configuration used either in the this material.\n *\n * If sets to null, the scene one is in use.\n */\n set imageProcessingConfiguration(value) {\n this._attachImageProcessingConfiguration(value);\n // Ensure the effect will be rebuilt.\n this._markAllSubMeshesAsTexturesDirty();\n }\n /**\n * Gets whether the color curves effect is enabled.\n */\n get cameraColorCurvesEnabled() {\n return this.imageProcessingConfiguration.colorCurvesEnabled;\n }\n /**\n * Sets whether the color curves effect is enabled.\n */\n set cameraColorCurvesEnabled(value) {\n this.imageProcessingConfiguration.colorCurvesEnabled = value;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n get cameraColorGradingEnabled() {\n return this.imageProcessingConfiguration.colorGradingEnabled;\n }\n /**\n * Gets whether the color grading effect is enabled.\n */\n set cameraColorGradingEnabled(value) {\n this.imageProcessingConfiguration.colorGradingEnabled = value;\n }\n /**\n * Gets whether tonemapping is enabled or not.\n */\n get cameraToneMappingEnabled() {\n return this._imageProcessingConfiguration.toneMappingEnabled;\n }\n /**\n * Sets whether tonemapping is enabled or not\n */\n set cameraToneMappingEnabled(value) {\n this._imageProcessingConfiguration.toneMappingEnabled = value;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n get cameraExposure() {\n return this._imageProcessingConfiguration.exposure;\n }\n /**\n * The camera exposure used on this material.\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\n * This corresponds to a photographic exposure.\n */\n set cameraExposure(value) {\n this._imageProcessingConfiguration.exposure = value;\n }\n /**\n * Gets The camera contrast used on this material.\n */\n get cameraContrast() {\n return this._imageProcessingConfiguration.contrast;\n }\n /**\n * Sets The camera contrast used on this material.\n */\n set cameraContrast(value) {\n this._imageProcessingConfiguration.contrast = value;\n }\n /**\n * Gets the Color Grading 2D Lookup Texture.\n */\n get cameraColorGradingTexture() {\n return this._imageProcessingConfiguration.colorGradingTexture;\n }\n /**\n * Sets the Color Grading 2D Lookup Texture.\n */\n set cameraColorGradingTexture(value) {\n this.imageProcessingConfiguration.colorGradingTexture = value;\n }\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 */\n get cameraColorCurves() {\n return this.imageProcessingConfiguration.colorCurves;\n }\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 */\n set cameraColorCurves(value) {\n this.imageProcessingConfiguration.colorCurves = value;\n }\n /**\n * Instantiates a Background Material in the given scene\n * @param name The friendly name of the material\n * @param scene The scene to add the material to\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\n */\n constructor(name, scene, forceGLSL = false) {\n super(name, scene, undefined, forceGLSL);\n /**\n * Key light Color (multiply against the environment texture)\n */\n this.primaryColor = Color3.White();\n this._primaryColorShadowLevel = 0;\n this._primaryColorHighlightLevel = 0;\n /**\n * Reflection Texture used in the material.\n * Should be author in a specific way for the best result (refer to the documentation).\n */\n this.reflectionTexture = null;\n /**\n * Reflection Texture level of blur.\n *\n * Can be use to reuse an existing HDR Texture and target a specific LOD to prevent authoring the\n * texture twice.\n */\n this.reflectionBlur = 0;\n /**\n * Diffuse Texture used in the material.\n * Should be author in a specific way for the best result (refer to the documentation).\n */\n this.diffuseTexture = null;\n this._shadowLights = null;\n /**\n * Specify the list of lights casting shadow on the material.\n * All scene shadow lights will be included if null.\n */\n this.shadowLights = null;\n /**\n * Helps adjusting the shadow to a softer level if required.\n * 0 means black shadows and 1 means no shadows.\n */\n this.shadowLevel = 0;\n /**\n * In case of opacity Fresnel or reflection falloff, this is use as a scene center.\n * It is usually zero but might be interesting to modify according to your setup.\n */\n this.sceneCenter = Vector3.Zero();\n /**\n * This helps specifying that the material is falling off to the sky box at grazing angle.\n * This helps ensuring a nice transition when the camera goes under the ground.\n */\n this.opacityFresnel = true;\n /**\n * This helps specifying that the material is falling off from diffuse to the reflection texture at grazing angle.\n * This helps adding a mirror texture on the ground.\n */\n this.reflectionFresnel = false;\n /**\n * This helps specifying the falloff radius off the reflection texture from the sceneCenter.\n * This helps adding a nice falloff effect to the reflection if used as a mirror for instance.\n */\n this.reflectionFalloffDistance = 0.0;\n /**\n * This specifies the weight of the reflection against the background in case of reflection Fresnel.\n */\n this.reflectionAmount = 1.0;\n /**\n * This specifies the weight of the reflection at grazing angle.\n */\n this.reflectionReflectance0 = 0.05;\n /**\n * This specifies the weight of the reflection at a perpendicular point of view.\n */\n this.reflectionReflectance90 = 0.5;\n /**\n * Helps to directly use the maps channels instead of their level.\n */\n this.useRGBColor = true;\n /**\n * This helps reducing the banding effect that could occur on the background.\n */\n this.enableNoise = false;\n this._fovMultiplier = 1.0;\n /**\n * Enable the FOV adjustment feature controlled by fovMultiplier.\n */\n this.useEquirectangularFOV = false;\n this._maxSimultaneousLights = 4;\n /**\n * Number of Simultaneous lights allowed on the material.\n */\n this.maxSimultaneousLights = 4;\n this._shadowOnly = false;\n /**\n * Make the material only render shadows\n */\n this.shadowOnly = false;\n /**\n * Keep track of the image processing observer to allow dispose and replace.\n */\n this._imageProcessingObserver = null;\n /**\n * Due to a bug in iOS10, video tags (which are using the background material) are in BGR and not RGB.\n * Setting this flag to true (not done automatically!) will convert it back to RGB.\n */\n this.switchToBGR = false;\n this._enableGroundProjection = false;\n /**\n * Enables the ground projection mode on the material.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection\n */\n this.enableGroundProjection = false;\n /**\n * Defines the radius of the projected ground if enableGroundProjection is true.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection\n */\n this.projectedGroundRadius = 1000;\n /**\n * Defines the height of the projected ground if enableGroundProjection is true.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection\n */\n this.projectedGroundHeight = 10;\n // Temp values kept as cache in the material.\n this._renderTargets = new SmartArray(16);\n this._reflectionControls = Vector4.Zero();\n this._white = Color3.White();\n this._primaryShadowColor = Color3.Black();\n this._primaryHighlightColor = Color3.Black();\n this._shadersLoaded = false;\n // Setup the default processing configuration to the scene.\n this._attachImageProcessingConfiguration(null);\n this.getRenderTargetTextures = () => {\n this._renderTargets.reset();\n if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {\n this._renderTargets.push(this._diffuseTexture);\n }\n if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._renderTargets.push(this._reflectionTexture);\n }\n return this._renderTargets;\n };\n }\n /**\n * Gets a boolean indicating that current material needs to register RTT\n */\n get hasRenderTargetTextures() {\n if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {\n return true;\n }\n if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n return true;\n }\n return false;\n }\n /**\n * The entire material has been created in order to prevent overdraw.\n * @returns false\n */\n needAlphaTesting() {\n return true;\n }\n /**\n * The entire material has been created in order to prevent overdraw.\n * @returns true if blending is enable\n */\n needAlphaBlending() {\n return this.alpha < 1 || (this._diffuseTexture != null && this._diffuseTexture.hasAlpha) || this._shadowOnly;\n }\n /**\n * Checks whether the material is ready to be rendered for a given mesh.\n * @param mesh The mesh to render\n * @param subMesh The submesh to check against\n * @param useInstances Specify wether or not the material is used with instances\n * @returns true if all the dependencies are ready (Textures, Effects...)\n */\n isReadyForSubMesh(mesh, subMesh, useInstances = false) {\n const drawWrapper = subMesh._drawWrapper;\n if (drawWrapper.effect && this.isFrozen) {\n if (drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {\n return true;\n }\n }\n if (!subMesh.materialDefines) {\n subMesh.materialDefines = new BackgroundMaterialDefines();\n }\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (this._isReadyForSubMesh(subMesh)) {\n return true;\n }\n const engine = scene.getEngine();\n // Lights\n PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights);\n defines._needNormals = true;\n // Multiview\n PrepareDefinesForMultiview(scene, defines);\n // Textures\n if (defines._areTexturesDirty) {\n defines._needUVs = false;\n if (scene.texturesEnabled) {\n if (scene.getEngine().getCaps().textureLOD) {\n defines.TEXTURELODSUPPORT = true;\n }\n if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n if (!this._diffuseTexture.isReadyOrNotBlocking()) {\n return false;\n }\n PrepareDefinesForMergedUV(this._diffuseTexture, defines, \"DIFFUSE\");\n defines.DIFFUSEHASALPHA = this._diffuseTexture.hasAlpha;\n defines.GAMMADIFFUSE = this._diffuseTexture.gammaSpace;\n defines.OPACITYFRESNEL = this._opacityFresnel;\n }\n else {\n defines.DIFFUSE = false;\n defines.DIFFUSEDIRECTUV = 0;\n defines.DIFFUSEHASALPHA = false;\n defines.GAMMADIFFUSE = false;\n defines.OPACITYFRESNEL = false;\n }\n const reflectionTexture = this._reflectionTexture;\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n if (!reflectionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n defines.REFLECTION = true;\n defines.GAMMAREFLECTION = reflectionTexture.gammaSpace;\n defines.RGBDREFLECTION = reflectionTexture.isRGBD;\n defines.REFLECTIONBLUR = this._reflectionBlur > 0;\n defines.LODINREFLECTIONALPHA = reflectionTexture.lodLevelInAlpha;\n defines.EQUIRECTANGULAR_RELFECTION_FOV = this.useEquirectangularFOV;\n defines.REFLECTIONBGR = this.switchToBGR;\n if (reflectionTexture.coordinatesMode === Texture.INVCUBIC_MODE) {\n defines.INVERTCUBICMAP = true;\n }\n defines.REFLECTIONMAP_3D = reflectionTexture.isCube;\n defines.REFLECTIONMAP_OPPOSITEZ = defines.REFLECTIONMAP_3D && this.getScene().useRightHandedSystem ? !reflectionTexture.invertZ : reflectionTexture.invertZ;\n switch (reflectionTexture.coordinatesMode) {\n case Texture.EXPLICIT_MODE:\n defines.REFLECTIONMAP_EXPLICIT = true;\n break;\n case Texture.PLANAR_MODE:\n defines.REFLECTIONMAP_PLANAR = true;\n break;\n case Texture.PROJECTION_MODE:\n defines.REFLECTIONMAP_PROJECTION = true;\n break;\n case Texture.SKYBOX_MODE:\n defines.REFLECTIONMAP_SKYBOX = true;\n break;\n case Texture.SPHERICAL_MODE:\n defines.REFLECTIONMAP_SPHERICAL = true;\n break;\n case Texture.EQUIRECTANGULAR_MODE:\n defines.REFLECTIONMAP_EQUIRECTANGULAR = true;\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MODE:\n defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = true;\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:\n defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = true;\n break;\n case Texture.CUBIC_MODE:\n case Texture.INVCUBIC_MODE:\n default:\n defines.REFLECTIONMAP_CUBIC = true;\n break;\n }\n if (this.reflectionFresnel) {\n defines.REFLECTIONFRESNEL = true;\n defines.REFLECTIONFALLOFF = this.reflectionFalloffDistance > 0;\n this._reflectionControls.x = this.reflectionAmount;\n this._reflectionControls.y = this.reflectionReflectance0;\n this._reflectionControls.z = this.reflectionReflectance90;\n this._reflectionControls.w = 1 / this.reflectionFalloffDistance;\n }\n else {\n defines.REFLECTIONFRESNEL = false;\n defines.REFLECTIONFALLOFF = false;\n }\n }\n else {\n defines.REFLECTION = false;\n defines.REFLECTIONFRESNEL = false;\n defines.REFLECTIONFALLOFF = false;\n defines.REFLECTIONBLUR = false;\n defines.REFLECTIONMAP_3D = false;\n defines.REFLECTIONMAP_SPHERICAL = false;\n defines.REFLECTIONMAP_PLANAR = false;\n defines.REFLECTIONMAP_CUBIC = false;\n defines.REFLECTIONMAP_PROJECTION = false;\n defines.REFLECTIONMAP_SKYBOX = false;\n defines.REFLECTIONMAP_EXPLICIT = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR = false;\n defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;\n defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;\n defines.INVERTCUBICMAP = false;\n defines.REFLECTIONMAP_OPPOSITEZ = false;\n defines.LODINREFLECTIONALPHA = false;\n defines.GAMMAREFLECTION = false;\n defines.RGBDREFLECTION = false;\n }\n }\n defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;\n defines.USERGBCOLOR = this._useRGBColor;\n defines.NOISE = this._enableNoise;\n }\n if (defines._areLightsDirty) {\n defines.USEHIGHLIGHTANDSHADOWCOLORS = !this._useRGBColor && (this._primaryColorShadowLevel !== 0 || this._primaryColorHighlightLevel !== 0);\n defines.BACKMAT_SHADOWONLY = this._shadowOnly;\n }\n if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {\n if (!this._imageProcessingConfiguration.isReady()) {\n return false;\n }\n this._imageProcessingConfiguration.prepareDefines(defines);\n }\n if (defines._areMiscDirty) {\n if (defines.REFLECTIONMAP_3D && this._enableGroundProjection) {\n defines.PROJECTED_GROUND = true;\n defines.REFLECTIONMAP_SKYBOX = true;\n }\n else {\n defines.PROJECTED_GROUND = false;\n }\n }\n // Misc.\n PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines);\n // Values that need to be evaluated on every frame\n PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);\n // Attribs\n if (PrepareDefinesForAttributes(mesh, defines, false, true, false)) {\n if (mesh) {\n if (!scene.getEngine().getCaps().standardDerivatives && !mesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {\n mesh.createNormals(true);\n Logger.Warn(\"BackgroundMaterial: Normals have been created for the mesh: \" + mesh.name);\n }\n }\n }\n // Get correct effect\n if (defines.isDirty) {\n defines.markAsProcessed();\n scene.resetCachedMaterial();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.FOG) {\n fallbacks.addFallback(0, \"FOG\");\n }\n if (defines.POINTSIZE) {\n fallbacks.addFallback(1, \"POINTSIZE\");\n }\n if (defines.MULTIVIEW) {\n fallbacks.addFallback(0, \"MULTIVIEW\");\n }\n HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.UV1) {\n attribs.push(VertexBuffer.UVKind);\n }\n if (defines.UV2) {\n attribs.push(VertexBuffer.UV2Kind);\n }\n PrepareAttributesForBones(attribs, mesh, defines, fallbacks);\n PrepareAttributesForInstances(attribs, defines);\n const uniforms = [\n \"world\",\n \"view\",\n \"viewProjection\",\n \"vEyePosition\",\n \"vLightsType\",\n \"vFogInfos\",\n \"vFogColor\",\n \"pointSize\",\n \"mBones\",\n \"vPrimaryColor\",\n \"vPrimaryColorShadow\",\n \"vReflectionInfos\",\n \"reflectionMatrix\",\n \"vReflectionMicrosurfaceInfos\",\n \"fFovMultiplier\",\n \"shadowLevel\",\n \"alpha\",\n \"vBackgroundCenter\",\n \"vReflectionControl\",\n \"vDiffuseInfos\",\n \"diffuseMatrix\",\n \"projectedGroundInfos\",\n \"logarithmicDepthConstant\",\n ];\n addClipPlaneUniforms(uniforms);\n const samplers = [\"diffuseSampler\", \"reflectionSampler\", \"reflectionSamplerLow\", \"reflectionSamplerHigh\"];\n const uniformBuffers = [\"Material\", \"Scene\"];\n if (ImageProcessingConfiguration) {\n ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);\n ImageProcessingConfiguration.PrepareSamplers(samplers, defines);\n }\n PrepareUniformsAndSamplersList({\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: defines,\n maxSimultaneousLights: this._maxSimultaneousLights,\n });\n const join = defines.toString();\n const effect = scene.getEngine().createEffect(\"background\", {\n attributes: attribs,\n uniformsNames: uniforms,\n uniformBuffersNames: uniformBuffers,\n samplers: samplers,\n defines: join,\n fallbacks: fallbacks,\n onCompiled: this.onCompiled,\n onError: this.onError,\n indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights },\n shaderLanguage: this._shaderLanguage,\n extraInitializationsAsync: this._shadersLoaded\n ? undefined\n : async () => {\n if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n await Promise.all([import(\"../../ShadersWGSL/background.vertex.js\"), import(\"../../ShadersWGSL/background.fragment.js\")]);\n }\n else {\n await Promise.all([import(\"../../Shaders/background.vertex.js\"), import(\"../../Shaders/background.fragment.js\")]);\n }\n this._shadersLoaded = true;\n },\n }, engine);\n subMesh.setEffect(effect, defines, this._materialContext);\n this.buildUniformLayout();\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n drawWrapper._wasPreviouslyReady = true;\n drawWrapper._wasPreviouslyUsingInstances = useInstances;\n this._checkScenePerformancePriority();\n return true;\n }\n /**\n * Compute the primary color according to the chosen perceptual color.\n */\n _computePrimaryColorFromPerceptualColor() {\n if (!this.__perceptualColor) {\n return;\n }\n this._primaryColor.copyFrom(this.__perceptualColor);\n // Revert gamma space.\n this._primaryColor.toLinearSpaceToRef(this._primaryColor, this.getScene().getEngine().useExactSrgbConversions);\n // Revert image processing configuration.\n if (this._imageProcessingConfiguration) {\n // Revert Exposure.\n this._primaryColor.scaleToRef(1 / this._imageProcessingConfiguration.exposure, this._primaryColor);\n }\n this._computePrimaryColors();\n }\n /**\n * Compute the highlights and shadow colors according to their chosen levels.\n */\n _computePrimaryColors() {\n if (this._primaryColorShadowLevel === 0 && this._primaryColorHighlightLevel === 0) {\n return;\n }\n // Find the highlight color based on the configuration.\n this._primaryColor.scaleToRef(this._primaryColorShadowLevel, this._primaryShadowColor);\n this._primaryColor.subtractToRef(this._primaryShadowColor, this._primaryShadowColor);\n // Find the shadow color based on the configuration.\n this._white.subtractToRef(this._primaryColor, this._primaryHighlightColor);\n this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel, this._primaryHighlightColor);\n this._primaryColor.addToRef(this._primaryHighlightColor, this._primaryHighlightColor);\n }\n /**\n * Build the uniform buffer used in the material.\n */\n buildUniformLayout() {\n // Order is important !\n this._uniformBuffer.addUniform(\"vPrimaryColor\", 4);\n this._uniformBuffer.addUniform(\"vPrimaryColorShadow\", 4);\n this._uniformBuffer.addUniform(\"vDiffuseInfos\", 2);\n this._uniformBuffer.addUniform(\"vReflectionInfos\", 2);\n this._uniformBuffer.addUniform(\"diffuseMatrix\", 16);\n this._uniformBuffer.addUniform(\"reflectionMatrix\", 16);\n this._uniformBuffer.addUniform(\"vReflectionMicrosurfaceInfos\", 3);\n this._uniformBuffer.addUniform(\"fFovMultiplier\", 1);\n this._uniformBuffer.addUniform(\"pointSize\", 1);\n this._uniformBuffer.addUniform(\"shadowLevel\", 1);\n this._uniformBuffer.addUniform(\"alpha\", 1);\n this._uniformBuffer.addUniform(\"vBackgroundCenter\", 3);\n this._uniformBuffer.addUniform(\"vReflectionControl\", 4);\n this._uniformBuffer.addUniform(\"projectedGroundInfos\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Unbind the material.\n */\n unbind() {\n if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {\n this._uniformBuffer.setTexture(\"diffuseSampler\", null);\n }\n if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._uniformBuffer.setTexture(\"reflectionSampler\", null);\n }\n super.unbind();\n }\n /**\n * Bind only the world matrix to the material.\n * @param world The world matrix to bind.\n */\n bindOnlyWorldMatrix(world) {\n this._activeEffect.setMatrix(\"world\", world);\n }\n /**\n * Bind the material for a dedicated submesh (every used meshes will be considered opaque).\n * @param world The world matrix to bind.\n * @param mesh the mesh to bind for.\n * @param subMesh The submesh to bind for.\n */\n bindForSubMesh(world, mesh, subMesh) {\n const scene = this.getScene();\n const defines = subMesh.materialDefines;\n if (!defines) {\n return;\n }\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n this._activeEffect = effect;\n // Matrices\n this.bindOnlyWorldMatrix(world);\n // Bones\n BindBonesParameters(mesh, this._activeEffect);\n const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);\n if (mustRebind) {\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this.bindViewProjection(effect);\n const reflectionTexture = this._reflectionTexture;\n if (!this._uniformBuffer.useUbo || !this.isFrozen || !this._uniformBuffer.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {\n // Texture uniforms\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n this._uniformBuffer.updateFloat2(\"vDiffuseInfos\", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);\n BindTextureMatrix(this._diffuseTexture, this._uniformBuffer, \"diffuse\");\n }\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n this._uniformBuffer.updateMatrix(\"reflectionMatrix\", reflectionTexture.getReflectionTextureMatrix());\n this._uniformBuffer.updateFloat2(\"vReflectionInfos\", reflectionTexture.level, this._reflectionBlur);\n this._uniformBuffer.updateFloat3(\"vReflectionMicrosurfaceInfos\", reflectionTexture.getSize().width, reflectionTexture.lodGenerationScale, reflectionTexture.lodGenerationOffset);\n }\n }\n if (this.shadowLevel > 0) {\n this._uniformBuffer.updateFloat(\"shadowLevel\", this.shadowLevel);\n }\n this._uniformBuffer.updateFloat(\"alpha\", this.alpha);\n // Point size\n if (this.pointsCloud) {\n this._uniformBuffer.updateFloat(\"pointSize\", this.pointSize);\n }\n if (defines.USEHIGHLIGHTANDSHADOWCOLORS) {\n this._uniformBuffer.updateColor4(\"vPrimaryColor\", this._primaryHighlightColor, 1.0);\n this._uniformBuffer.updateColor4(\"vPrimaryColorShadow\", this._primaryShadowColor, 1.0);\n }\n else {\n this._uniformBuffer.updateColor4(\"vPrimaryColor\", this._primaryColor, 1.0);\n }\n }\n this._uniformBuffer.updateFloat(\"fFovMultiplier\", this._fovMultiplier);\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {\n this._uniformBuffer.setTexture(\"diffuseSampler\", this._diffuseTexture);\n }\n if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {\n if (defines.REFLECTIONBLUR && defines.TEXTURELODSUPPORT) {\n this._uniformBuffer.setTexture(\"reflectionSampler\", reflectionTexture);\n }\n else if (!defines.REFLECTIONBLUR) {\n this._uniformBuffer.setTexture(\"reflectionSampler\", reflectionTexture);\n }\n else {\n this._uniformBuffer.setTexture(\"reflectionSampler\", reflectionTexture._lodTextureMid || reflectionTexture);\n this._uniformBuffer.setTexture(\"reflectionSamplerLow\", reflectionTexture._lodTextureLow || reflectionTexture);\n this._uniformBuffer.setTexture(\"reflectionSamplerHigh\", reflectionTexture._lodTextureHigh || reflectionTexture);\n }\n if (defines.REFLECTIONFRESNEL) {\n this._uniformBuffer.updateFloat3(\"vBackgroundCenter\", this.sceneCenter.x, this.sceneCenter.y, this.sceneCenter.z);\n this._uniformBuffer.updateFloat4(\"vReflectionControl\", this._reflectionControls.x, this._reflectionControls.y, this._reflectionControls.z, this._reflectionControls.w);\n }\n }\n if (defines.PROJECTED_GROUND) {\n this._uniformBuffer.updateFloat2(\"projectedGroundInfos\", this.projectedGroundRadius, this.projectedGroundHeight);\n }\n }\n // Clip plane\n bindClipPlane(this._activeEffect, this, scene);\n scene.bindEyePosition(effect);\n }\n else if (scene.getEngine()._features.needToAlwaysBindUniformBuffers) {\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this._needToBindSceneUbo = true;\n }\n if (mustRebind || !this.isFrozen) {\n if (scene.lightsEnabled) {\n BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights);\n }\n // View\n this.bindView(effect);\n // Fog\n BindFogParameters(scene, mesh, this._activeEffect, true);\n // Log. depth\n if (this._useLogarithmicDepth) {\n BindLogDepth(defines, effect, scene);\n }\n // image processing\n if (this._imageProcessingConfiguration) {\n this._imageProcessingConfiguration.bind(this._activeEffect);\n }\n }\n this._afterBind(mesh, this._activeEffect, subMesh);\n this._uniformBuffer.update();\n }\n /**\n * Checks to see if a texture is used in the material.\n * @param texture - Base texture to use.\n * @returns - Boolean specifying if a texture is used in the material.\n */\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n if (this._reflectionTexture === texture) {\n return true;\n }\n if (this._diffuseTexture === texture) {\n return true;\n }\n return false;\n }\n /**\n * Dispose the material.\n * @param forceDisposeEffect Force disposal of the associated effect.\n * @param forceDisposeTextures Force disposal of the associated textures.\n */\n dispose(forceDisposeEffect = false, forceDisposeTextures = false) {\n if (forceDisposeTextures) {\n if (this.diffuseTexture) {\n this.diffuseTexture.dispose();\n }\n if (this.reflectionTexture) {\n this.reflectionTexture.dispose();\n }\n }\n this._renderTargets.dispose();\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n super.dispose(forceDisposeEffect);\n }\n /**\n * Clones the material.\n * @param name The cloned name.\n * @returns The cloned material.\n */\n clone(name) {\n return SerializationHelper.Clone(() => new BackgroundMaterial(name, this.getScene()), this);\n }\n /**\n * Serializes the current material to its JSON representation.\n * @returns The JSON representation.\n */\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.customType = \"BABYLON.BackgroundMaterial\";\n return serializationObject;\n }\n /**\n * Gets the class name of the material\n * @returns \"BackgroundMaterial\"\n */\n getClassName() {\n return \"BackgroundMaterial\";\n }\n /**\n * Parse a JSON input to create back a background material.\n * @param source The JSON data to parse\n * @param scene The scene to create the parsed material in\n * @param rootUrl The root url of the assets the material depends upon\n * @returns the instantiated BackgroundMaterial.\n */\n static Parse(source, scene, rootUrl) {\n return SerializationHelper.Parse(() => new BackgroundMaterial(source.name, scene), source, scene, rootUrl);\n }\n}\n/**\n * Standard reflectance value at parallel view angle.\n */\nBackgroundMaterial.StandardReflectance0 = 0.05;\n/**\n * Standard reflectance value at grazing angle.\n */\nBackgroundMaterial.StandardReflectance90 = 0.5;\n__decorate([\n serializeAsColor3()\n], BackgroundMaterial.prototype, \"_primaryColor\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], BackgroundMaterial.prototype, \"primaryColor\", void 0);\n__decorate([\n serializeAsColor3()\n], BackgroundMaterial.prototype, \"__perceptualColor\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_primaryColorShadowLevel\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_primaryColorHighlightLevel\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], BackgroundMaterial.prototype, \"primaryColorHighlightLevel\", null);\n__decorate([\n serializeAsTexture()\n], BackgroundMaterial.prototype, \"_reflectionTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"reflectionTexture\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_reflectionBlur\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"reflectionBlur\", void 0);\n__decorate([\n serializeAsTexture()\n], BackgroundMaterial.prototype, \"_diffuseTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"diffuseTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"shadowLights\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_shadowLevel\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"shadowLevel\", void 0);\n__decorate([\n serializeAsVector3()\n], BackgroundMaterial.prototype, \"_sceneCenter\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"sceneCenter\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_opacityFresnel\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"opacityFresnel\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_reflectionFresnel\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"reflectionFresnel\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_reflectionFalloffDistance\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"reflectionFalloffDistance\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_reflectionAmount\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"reflectionAmount\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_reflectionReflectance0\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"reflectionReflectance0\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_reflectionReflectance90\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"reflectionReflectance90\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_useRGBColor\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"useRGBColor\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_enableNoise\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"enableNoise\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_maxSimultaneousLights\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], BackgroundMaterial.prototype, \"maxSimultaneousLights\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"_shadowOnly\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], BackgroundMaterial.prototype, \"shadowOnly\", void 0);\n__decorate([\n serializeAsImageProcessingConfiguration()\n], BackgroundMaterial.prototype, \"_imageProcessingConfiguration\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], BackgroundMaterial.prototype, \"enableGroundProjection\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"projectedGroundRadius\", void 0);\n__decorate([\n serialize()\n], BackgroundMaterial.prototype, \"projectedGroundHeight\", void 0);\nRegisterClass(\"BABYLON.BackgroundMaterial\", BackgroundMaterial);\n"],"mappings":";AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAC/C;AACA,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,uCAAuC,QAAQ,0BAA0B;AAC1K,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,OAAO,EAAEC,OAAO,QAAQ,4BAA4B;AAC7D,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,eAAe,QAAQ,oCAAoC;AACpE,SAASC,YAAY,QAAQ,iCAAiC;AAC9D,SAASC,4BAA4B,QAAQ,iDAAiD;AAC9F,SAASC,OAAO,QAAQ,qCAAqC;AAE7D,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,aAAa,QAAQ,qBAAqB;AACnD,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,oBAAoB,EAAEC,aAAa,QAAQ,+BAA+B;AACnF,SAASC,mBAAmB,EAAEC,iBAAiB,EAAEC,UAAU,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,yBAAyB,EAAEC,yBAAyB,EAAEC,6BAA6B,EAAEC,2BAA2B,EAAEC,iCAAiC,EAAEC,uBAAuB,EAAEC,yBAAyB,EAAEC,qBAAqB,EAAEC,0BAA0B,EAAEC,8BAA8B,QAAS,gCAAgC;AACja,SAASC,mBAAmB,QAAQ,wCAAwC;AAC5E;AACA;AACA;AACA;AACA,MAAMC,yBAAyB,SAAS1B,eAAe,CAAC;EACpD;AACJ;AACA;EACI2B,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