{"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, serializeAsFresnelParameters, serializeAsTexture } from \"../Misc/decorators.js\";\nimport { SmartArray } from \"../Misc/smartArray.js\";\nimport { Scene } from \"../scene.js\";\nimport { Matrix } from \"../Maths/math.vector.js\";\nimport { Color3 } from \"../Maths/math.color.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { PrePassConfiguration } from \"./prePassConfiguration.js\";\nimport { ImageProcessingConfiguration } from \"./imageProcessingConfiguration.js\";\nimport { Material } from \"../Materials/material.js\";\nimport { MaterialDefines } from \"../Materials/materialDefines.js\";\nimport { PushMaterial } from \"./pushMaterial.js\";\nimport { Texture } from \"../Materials/Textures/texture.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { MaterialFlags } from \"./materialFlags.js\";\nimport { EffectFallbacks } from \"./effectFallbacks.js\";\nimport { DetailMapConfiguration } from \"./material.detailMapConfiguration.js\";\nimport { addClipPlaneUniforms, bindClipPlane } from \"./clipPlaneMaterialHelper.js\";\nimport { BindBonesParameters, BindFogParameters, BindLights, BindLogDepth, BindMorphTargetParameters, BindTextureMatrix, HandleFallbacksForShadows, PrepareAttributesForBakedVertexAnimation, PrepareAttributesForBones, PrepareAttributesForInstances, PrepareAttributesForMorphTargets, PrepareDefinesForAttributes, PrepareDefinesForFrameBoundValues, PrepareDefinesForLights, PrepareDefinesForMergedUV, PrepareDefinesForMisc, PrepareDefinesForMultiview, PrepareDefinesForOIT, PrepareDefinesForPrePass, PrepareUniformsAndSamplersList } from \"./materialHelper.functions.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\nimport { MaterialHelperGeometryRendering } from \"./materialHelper.geometryrendering.js\";\nconst onCreatedEffectParameters = {\n effect: null,\n subMesh: null\n};\n/** @internal */\nexport class StandardMaterialDefines extends MaterialDefines {\n /**\n * Initializes the Standard Material defines.\n * @param externalProperties The external properties\n */\n constructor(externalProperties) {\n super(externalProperties);\n this.MAINUV1 = false;\n this.MAINUV2 = false;\n this.MAINUV3 = false;\n this.MAINUV4 = false;\n this.MAINUV5 = false;\n this.MAINUV6 = false;\n this.DIFFUSE = false;\n this.DIFFUSEDIRECTUV = 0;\n this.BAKED_VERTEX_ANIMATION_TEXTURE = false;\n this.AMBIENT = false;\n this.AMBIENTDIRECTUV = 0;\n this.OPACITY = false;\n this.OPACITYDIRECTUV = 0;\n this.OPACITYRGB = false;\n this.REFLECTION = false;\n this.EMISSIVE = false;\n this.EMISSIVEDIRECTUV = 0;\n this.SPECULAR = false;\n this.SPECULARDIRECTUV = 0;\n this.BUMP = false;\n this.BUMPDIRECTUV = 0;\n this.PARALLAX = false;\n this.PARALLAX_RHS = false;\n this.PARALLAXOCCLUSION = false;\n this.SPECULAROVERALPHA = 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.ALPHATEST = false;\n this.DEPTHPREPASS = false;\n this.ALPHAFROMDIFFUSE = false;\n this.POINTSIZE = false;\n this.FOG = false;\n this.SPECULARTERM = false;\n this.DIFFUSEFRESNEL = false;\n this.OPACITYFRESNEL = false;\n this.REFLECTIONFRESNEL = false;\n this.REFRACTIONFRESNEL = false;\n this.EMISSIVEFRESNEL = false;\n this.FRESNEL = false;\n this.NORMAL = false;\n this.TANGENT = false;\n this.UV1 = false;\n this.UV2 = false;\n this.UV3 = false;\n this.UV4 = false;\n this.UV5 = false;\n this.UV6 = false;\n this.VERTEXCOLOR = false;\n this.VERTEXALPHA = false;\n this.NUM_BONE_INFLUENCERS = 0;\n this.BonesPerMesh = 0;\n this.BONETEXTURE = false;\n this.BONES_VELOCITY_ENABLED = false;\n this.INSTANCES = false;\n this.THIN_INSTANCES = false;\n this.INSTANCESCOLOR = false;\n this.GLOSSINESS = false;\n this.ROUGHNESS = false;\n this.EMISSIVEASILLUMINATION = false;\n this.LINKEMISSIVEWITHDIFFUSE = false;\n this.REFLECTIONFRESNELFROMSPECULAR = false;\n this.LIGHTMAP = false;\n this.LIGHTMAPDIRECTUV = 0;\n this.OBJECTSPACE_NORMALMAP = false;\n this.USELIGHTMAPASSHADOWMAP = false;\n this.REFLECTIONMAP_3D = false;\n this.REFLECTIONMAP_SPHERICAL = false;\n this.REFLECTIONMAP_PLANAR = false;\n this.REFLECTIONMAP_CUBIC = false;\n this.USE_LOCAL_REFLECTIONMAP_CUBIC = false;\n this.USE_LOCAL_REFRACTIONMAP_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.REFLECTIONMAP_OPPOSITEZ = false;\n this.INVERTCUBICMAP = false;\n this.LOGARITHMICDEPTH = false;\n this.REFRACTION = false;\n this.REFRACTIONMAP_3D = false;\n this.REFLECTIONOVERALPHA = false;\n this.TWOSIDEDLIGHTING = false;\n this.SHADOWFLOAT = false;\n this.MORPHTARGETS = false;\n this.MORPHTARGETS_NORMAL = false;\n this.MORPHTARGETS_TANGENT = false;\n this.MORPHTARGETS_UV = false;\n this.NUM_MORPH_INFLUENCERS = 0;\n this.MORPHTARGETS_TEXTURE = false;\n this.NONUNIFORMSCALING = false; // https://playground.babylonjs.com#V6DWIH\n this.PREMULTIPLYALPHA = false; // https://playground.babylonjs.com#LNVJJ7\n this.ALPHATEST_AFTERALLALPHACOMPUTATIONS = false;\n this.ALPHABLEND = true;\n this.PREPASS = false;\n this.PREPASS_COLOR = false;\n this.PREPASS_COLOR_INDEX = -1;\n this.PREPASS_IRRADIANCE = false;\n this.PREPASS_IRRADIANCE_INDEX = -1;\n this.PREPASS_ALBEDO = false;\n this.PREPASS_ALBEDO_INDEX = -1;\n this.PREPASS_ALBEDO_SQRT = false;\n this.PREPASS_ALBEDO_SQRT_INDEX = -1;\n this.PREPASS_DEPTH = false;\n this.PREPASS_DEPTH_INDEX = -1;\n this.PREPASS_SCREENSPACE_DEPTH = false;\n this.PREPASS_SCREENSPACE_DEPTH_INDEX = -1;\n this.PREPASS_NORMAL = false;\n this.PREPASS_NORMAL_INDEX = -1;\n this.PREPASS_NORMAL_WORLDSPACE = false;\n this.PREPASS_WORLD_NORMAL = false;\n this.PREPASS_WORLD_NORMAL_INDEX = -1;\n this.PREPASS_POSITION = false;\n this.PREPASS_POSITION_INDEX = -1;\n this.PREPASS_LOCAL_POSITION = false;\n this.PREPASS_LOCAL_POSITION_INDEX = -1;\n this.PREPASS_VELOCITY = false;\n this.PREPASS_VELOCITY_INDEX = -1;\n this.PREPASS_VELOCITY_LINEAR = false;\n this.PREPASS_VELOCITY_LINEAR_INDEX = -1;\n this.PREPASS_REFLECTIVITY = false;\n this.PREPASS_REFLECTIVITY_INDEX = -1;\n this.SCENE_MRT_COUNT = 0;\n this.RGBDLIGHTMAP = false;\n this.RGBDREFLECTION = false;\n this.RGBDREFRACTION = 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.MULTIVIEW = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY_16BITS = false;\n this.CAMERA_ORTHOGRAPHIC = false;\n this.CAMERA_PERSPECTIVE = false;\n /**\n * If the reflection texture on this material is in linear color space\n * @internal\n */\n this.IS_REFLECTION_LINEAR = false;\n /**\n * If the refraction texture on this material is in linear color space\n * @internal\n */\n this.IS_REFRACTION_LINEAR = false;\n this.EXPOSURE = false;\n this.DECAL_AFTER_DETAIL = false;\n this.rebuild();\n }\n setReflectionMode(modeToEnable) {\n const modes = [\"REFLECTIONMAP_CUBIC\", \"REFLECTIONMAP_EXPLICIT\", \"REFLECTIONMAP_PLANAR\", \"REFLECTIONMAP_PROJECTION\", \"REFLECTIONMAP_PROJECTION\", \"REFLECTIONMAP_SKYBOX\", \"REFLECTIONMAP_SPHERICAL\", \"REFLECTIONMAP_EQUIRECTANGULAR\", \"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\", \"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\"];\n for (const mode of modes) {\n this[mode] = mode === modeToEnable;\n }\n }\n}\n/**\n * This is the default material used in Babylon. It is the best trade off between quality\n * and performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\n */\nexport class StandardMaterial extends PushMaterial {\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 * Attaches a new image processing configuration to the Standard Material.\n * @param configuration\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._markAllSubMeshesAsImageProcessingDirty();\n });\n }\n }\n /**\n * Can this material render to prepass\n */\n get isPrePassCapable() {\n return !this.disableDepthWrite;\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 adjustmnent 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 * Can this material render to several textures at once\n */\n get canRenderToMRT() {\n return true;\n }\n /**\n * Instantiates a new standard material.\n * This is the default material used in Babylon. It is the best trade off between quality\n * and performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\n * @param name Define the name of the material in the scene\n * @param scene Define the scene the material belong 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 || StandardMaterial.ForceGLSL);\n this._diffuseTexture = null;\n this._ambientTexture = null;\n this._opacityTexture = null;\n this._reflectionTexture = null;\n this._emissiveTexture = null;\n this._specularTexture = null;\n this._bumpTexture = null;\n this._lightmapTexture = null;\n this._refractionTexture = null;\n /**\n * The color of the material lit by the environmental background lighting.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#ambient-color-example\n */\n this.ambientColor = new Color3(0, 0, 0);\n /**\n * The basic color of the material as viewed under a light.\n */\n this.diffuseColor = new Color3(1, 1, 1);\n /**\n * Define how the color and intensity of the highlight given by the light in the material.\n */\n this.specularColor = new Color3(1, 1, 1);\n /**\n * Define the color of the material as if self lit.\n * This will be mixed in the final result even in the absence of light.\n */\n this.emissiveColor = new Color3(0, 0, 0);\n /**\n * Defines how sharp are the highlights in the material.\n * The bigger the value the sharper giving a more glossy feeling to the result.\n * Reversely, the smaller the value the blurrier giving a more rough feeling to the result.\n */\n this.specularPower = 64;\n this._useAlphaFromDiffuseTexture = false;\n this._useEmissiveAsIllumination = false;\n this._linkEmissiveWithDiffuse = false;\n this._useSpecularOverAlpha = false;\n this._useReflectionOverAlpha = false;\n this._disableLighting = false;\n this._useObjectSpaceNormalMap = false;\n this._useParallax = false;\n this._useParallaxOcclusion = false;\n /**\n * Apply a scaling factor that determine which \"depth\" the height map should reprensent. A value between 0.05 and 0.1 is reasonnable in Parallax, you can reach 0.2 using Parallax Occlusion.\n */\n this.parallaxScaleBias = 0.05;\n this._roughness = 0;\n /**\n * In case of refraction, define the value of the index of refraction.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions\n */\n this.indexOfRefraction = 0.98;\n /**\n * Invert the refraction texture alongside the y axis.\n * It can be useful with procedural textures or probe for instance.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions\n */\n this.invertRefractionY = true;\n /**\n * Defines the alpha limits in alpha test mode.\n */\n this.alphaCutOff = 0.4;\n this._useLightmapAsShadowmap = false;\n this._useReflectionFresnelFromSpecular = false;\n this._useGlossinessFromSpecularMapAlpha = false;\n this._maxSimultaneousLights = 4;\n this._invertNormalMapX = false;\n this._invertNormalMapY = false;\n this._twoSidedLighting = false;\n this._applyDecalMapAfterDetailMap = false;\n this._shadersLoaded = false;\n this._renderTargets = new SmartArray(16);\n this._worldViewProjectionMatrix = Matrix.Zero();\n this._globalAmbientColor = new Color3(0, 0, 0);\n this._cacheHasRenderTargetTextures = false;\n this.detailMap = new DetailMapConfiguration(this);\n // Setup the default processing configuration to the scene.\n this._attachImageProcessingConfiguration(null);\n this.prePassConfiguration = new PrePassConfiguration();\n this.getRenderTargetTextures = () => {\n this._renderTargets.reset();\n if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._renderTargets.push(this._reflectionTexture);\n }\n if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n this._renderTargets.push(this._refractionTexture);\n }\n this._eventInfo.renderTargets = this._renderTargets;\n this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);\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 (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n return true;\n }\n if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n return true;\n }\n return this._cacheHasRenderTargetTextures;\n }\n /**\n * Gets the current class name of the material e.g. \"StandardMaterial\"\n * Mainly use in serialization.\n * @returns the class name\n */\n getClassName() {\n return \"StandardMaterial\";\n }\n /**\n * Specifies if the material will require alpha blending\n * @returns a boolean specifying if alpha blending is needed\n */\n needAlphaBlending() {\n if (this._disableAlphaBlending) {\n return false;\n }\n return this.alpha < 1.0 || this._opacityTexture != null || this._shouldUseAlphaFromDiffuseTexture() || this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;\n }\n /**\n * Specifies if this material should be rendered in alpha test mode\n * @returns a boolean specifying if an alpha test is needed.\n */\n needAlphaTesting() {\n if (this._forceAlphaTest) {\n return true;\n }\n return this._hasAlphaChannel() && (this._transparencyMode == null || this._transparencyMode === Material.MATERIAL_ALPHATEST);\n }\n /**\n * @returns whether or not the alpha value of the diffuse texture should be used for alpha blending.\n */\n _shouldUseAlphaFromDiffuseTexture() {\n return this._diffuseTexture != null && this._diffuseTexture.hasAlpha && this._useAlphaFromDiffuseTexture && this._transparencyMode !== Material.MATERIAL_OPAQUE;\n }\n /**\n * @returns whether or not there is a usable alpha channel for transparency.\n */\n _hasAlphaChannel() {\n return this._diffuseTexture != null && this._diffuseTexture.hasAlpha || this._opacityTexture != null;\n }\n /**\n * Get the texture used for alpha test purpose.\n * @returns the diffuse texture in case of the standard material.\n */\n getAlphaTestTexture() {\n return this._diffuseTexture;\n }\n /**\n * Get if the submesh is ready to be used and all its information available.\n * Child classes can use it to update shaders\n * @param mesh defines the mesh to check\n * @param subMesh defines which submesh to check\n * @param useInstances specifies that instances should be used\n * @returns a boolean indicating that the submesh is ready or not\n */\n isReadyForSubMesh(mesh, subMesh, useInstances = false) {\n var _this = this;\n if (!this._uniformBufferLayoutBuilt) {\n this.buildUniformLayout();\n }\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 this._callbackPluginEventGeneric(4 /* MaterialPluginEvent.GetDefineNames */, this._eventInfo);\n subMesh.materialDefines = new StandardMaterialDefines(this._eventInfo.defineNames);\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 defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting);\n // Multiview\n PrepareDefinesForMultiview(scene, defines);\n // PrePass\n const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency;\n PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit);\n // Order independant transparency\n PrepareDefinesForOIT(scene, defines, oit);\n MaterialHelperGeometryRendering.PrepareDefines(engine.currentRenderPassId, mesh, defines);\n // Textures\n if (defines._areTexturesDirty) {\n this._eventInfo.hasRenderTargetTextures = false;\n this._callbackPluginEventHasRenderTargetTextures(this._eventInfo);\n this._cacheHasRenderTargetTextures = this._eventInfo.hasRenderTargetTextures;\n defines._needUVs = false;\n for (let i = 1; i <= 6; ++i) {\n defines[\"MAINUV\" + i] = false;\n }\n if (scene.texturesEnabled) {\n defines.DIFFUSEDIRECTUV = 0;\n defines.BUMPDIRECTUV = 0;\n defines.AMBIENTDIRECTUV = 0;\n defines.OPACITYDIRECTUV = 0;\n defines.EMISSIVEDIRECTUV = 0;\n defines.SPECULARDIRECTUV = 0;\n defines.LIGHTMAPDIRECTUV = 0;\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n if (!this._diffuseTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n PrepareDefinesForMergedUV(this._diffuseTexture, defines, \"DIFFUSE\");\n }\n } else {\n defines.DIFFUSE = false;\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n if (!this._ambientTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n PrepareDefinesForMergedUV(this._ambientTexture, defines, \"AMBIENT\");\n }\n } else {\n defines.AMBIENT = false;\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n if (!this._opacityTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n PrepareDefinesForMergedUV(this._opacityTexture, defines, \"OPACITY\");\n defines.OPACITYRGB = this._opacityTexture.getAlphaFromRGB;\n }\n } else {\n defines.OPACITY = false;\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n if (!this._reflectionTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n defines._needNormals = true;\n defines.REFLECTION = true;\n defines.ROUGHNESS = this._roughness > 0;\n defines.REFLECTIONOVERALPHA = this._useReflectionOverAlpha;\n defines.INVERTCUBICMAP = this._reflectionTexture.coordinatesMode === Texture.INVCUBIC_MODE;\n defines.REFLECTIONMAP_3D = this._reflectionTexture.isCube;\n defines.REFLECTIONMAP_OPPOSITEZ = defines.REFLECTIONMAP_3D && this.getScene().useRightHandedSystem ? !this._reflectionTexture.invertZ : this._reflectionTexture.invertZ;\n defines.RGBDREFLECTION = this._reflectionTexture.isRGBD;\n switch (this._reflectionTexture.coordinatesMode) {\n case Texture.EXPLICIT_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EXPLICIT\");\n break;\n case Texture.PLANAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_PLANAR\");\n break;\n case Texture.PROJECTION_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_PROJECTION\");\n break;\n case Texture.SKYBOX_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_SKYBOX\");\n break;\n case Texture.SPHERICAL_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_SPHERICAL\");\n break;\n case Texture.EQUIRECTANGULAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR\");\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\");\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\");\n break;\n case Texture.CUBIC_MODE:\n case Texture.INVCUBIC_MODE:\n default:\n defines.setReflectionMode(\"REFLECTIONMAP_CUBIC\");\n break;\n }\n defines.USE_LOCAL_REFLECTIONMAP_CUBIC = this._reflectionTexture.boundingBoxSize ? true : false;\n }\n } else {\n defines.REFLECTION = false;\n defines.REFLECTIONMAP_OPPOSITEZ = false;\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n if (!this._emissiveTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n PrepareDefinesForMergedUV(this._emissiveTexture, defines, \"EMISSIVE\");\n }\n } else {\n defines.EMISSIVE = false;\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n if (!this._lightmapTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n PrepareDefinesForMergedUV(this._lightmapTexture, defines, \"LIGHTMAP\");\n defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;\n defines.RGBDLIGHTMAP = this._lightmapTexture.isRGBD;\n }\n } else {\n defines.LIGHTMAP = false;\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n if (!this._specularTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n PrepareDefinesForMergedUV(this._specularTexture, defines, \"SPECULAR\");\n defines.GLOSSINESS = this._useGlossinessFromSpecularMapAlpha;\n }\n } else {\n defines.SPECULAR = false;\n }\n if (scene.getEngine().getCaps().standardDerivatives && this._bumpTexture && StandardMaterial.BumpTextureEnabled) {\n // Bump texture can not be not blocking.\n if (!this._bumpTexture.isReady()) {\n return false;\n } else {\n PrepareDefinesForMergedUV(this._bumpTexture, defines, \"BUMP\");\n defines.PARALLAX = this._useParallax;\n defines.PARALLAX_RHS = scene.useRightHandedSystem;\n defines.PARALLAXOCCLUSION = this._useParallaxOcclusion;\n }\n defines.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap;\n } else {\n defines.BUMP = false;\n defines.PARALLAX = false;\n defines.PARALLAX_RHS = false;\n defines.PARALLAXOCCLUSION = false;\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n if (!this._refractionTexture.isReadyOrNotBlocking()) {\n return false;\n } else {\n defines._needUVs = true;\n defines.REFRACTION = true;\n defines.REFRACTIONMAP_3D = this._refractionTexture.isCube;\n defines.RGBDREFRACTION = this._refractionTexture.isRGBD;\n defines.USE_LOCAL_REFRACTIONMAP_CUBIC = this._refractionTexture.boundingBoxSize ? true : false;\n }\n } else {\n defines.REFRACTION = false;\n }\n defines.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting;\n } else {\n defines.DIFFUSE = false;\n defines.AMBIENT = false;\n defines.OPACITY = false;\n defines.REFLECTION = false;\n defines.EMISSIVE = false;\n defines.LIGHTMAP = false;\n defines.BUMP = false;\n defines.REFRACTION = false;\n }\n defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();\n defines.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination;\n defines.LINKEMISSIVEWITHDIFFUSE = this._linkEmissiveWithDiffuse;\n defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;\n defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;\n defines.ALPHATEST_AFTERALLALPHACOMPUTATIONS = this.transparencyMode !== null;\n defines.ALPHABLEND = this.transparencyMode === null || this.needAlphaBlendingForMesh(mesh); // check on null for backward compatibility\n }\n this._eventInfo.isReadyForSubMesh = true;\n this._eventInfo.defines = defines;\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);\n if (!this._eventInfo.isReadyForSubMesh) {\n return false;\n }\n if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {\n if (!this._imageProcessingConfiguration.isReady()) {\n return false;\n }\n this._imageProcessingConfiguration.prepareDefines(defines);\n defines.IS_REFLECTION_LINEAR = this.reflectionTexture != null && !this.reflectionTexture.gammaSpace;\n defines.IS_REFRACTION_LINEAR = this.refractionTexture != null && !this.refractionTexture.gammaSpace;\n }\n if (defines._areFresnelDirty) {\n if (StandardMaterial.FresnelEnabled) {\n // Fresnel\n if (this._diffuseFresnelParameters || this._opacityFresnelParameters || this._emissiveFresnelParameters || this._refractionFresnelParameters || this._reflectionFresnelParameters) {\n defines.DIFFUSEFRESNEL = this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled;\n defines.OPACITYFRESNEL = this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;\n defines.REFLECTIONFRESNEL = this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled;\n defines.REFLECTIONFRESNELFROMSPECULAR = this._useReflectionFresnelFromSpecular;\n defines.REFRACTIONFRESNEL = this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled;\n defines.EMISSIVEFRESNEL = this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled;\n defines._needNormals = true;\n defines.FRESNEL = true;\n }\n } else {\n defines.FRESNEL = false;\n }\n }\n // Misc.\n PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh) || this._forceAlphaTest, defines, this._applyDecalMapAfterDetailMap);\n // Values that need to be evaluated on every frame\n PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);\n // External config\n this._eventInfo.defines = defines;\n this._eventInfo.mesh = mesh;\n this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo);\n // Attribs\n PrepareDefinesForAttributes(mesh, defines, true, true, true);\n // External config\n this._callbackPluginEventPrepareDefines(this._eventInfo);\n // Get correct effect\n let forceWasNotReadyPreviously = false;\n if (defines.isDirty) {\n const lightDisposed = defines._areLightsDisposed;\n defines.markAsProcessed();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.REFLECTION) {\n fallbacks.addFallback(0, \"REFLECTION\");\n }\n if (defines.SPECULAR) {\n fallbacks.addFallback(0, \"SPECULAR\");\n }\n if (defines.BUMP) {\n fallbacks.addFallback(0, \"BUMP\");\n }\n if (defines.PARALLAX) {\n fallbacks.addFallback(1, \"PARALLAX\");\n }\n if (defines.PARALLAX_RHS) {\n fallbacks.addFallback(1, \"PARALLAX_RHS\");\n }\n if (defines.PARALLAXOCCLUSION) {\n fallbacks.addFallback(0, \"PARALLAXOCCLUSION\");\n }\n if (defines.SPECULAROVERALPHA) {\n fallbacks.addFallback(0, \"SPECULAROVERALPHA\");\n }\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n if (defines.POINTSIZE) {\n fallbacks.addFallback(0, \"POINTSIZE\");\n }\n if (defines.LOGARITHMICDEPTH) {\n fallbacks.addFallback(0, \"LOGARITHMICDEPTH\");\n }\n HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);\n if (defines.SPECULARTERM) {\n fallbacks.addFallback(0, \"SPECULARTERM\");\n }\n if (defines.DIFFUSEFRESNEL) {\n fallbacks.addFallback(1, \"DIFFUSEFRESNEL\");\n }\n if (defines.OPACITYFRESNEL) {\n fallbacks.addFallback(2, \"OPACITYFRESNEL\");\n }\n if (defines.REFLECTIONFRESNEL) {\n fallbacks.addFallback(3, \"REFLECTIONFRESNEL\");\n }\n if (defines.EMISSIVEFRESNEL) {\n fallbacks.addFallback(4, \"EMISSIVEFRESNEL\");\n }\n if (defines.FRESNEL) {\n fallbacks.addFallback(4, \"FRESNEL\");\n }\n if (defines.MULTIVIEW) {\n fallbacks.addFallback(0, \"MULTIVIEW\");\n }\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n for (let i = 1; i <= 6; ++i) {\n if (defines[\"UV\" + i]) {\n attribs.push(`uv${i === 1 ? \"\" : i}`);\n }\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n PrepareAttributesForBones(attribs, mesh, defines, fallbacks);\n PrepareAttributesForInstances(attribs, defines);\n PrepareAttributesForMorphTargets(attribs, mesh, defines);\n PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);\n let shaderName = \"default\";\n const uniforms = [\"world\", \"view\", \"viewProjection\", \"vEyePosition\", \"vLightsType\", \"vAmbientColor\", \"vDiffuseColor\", \"vSpecularColor\", \"vEmissiveColor\", \"visibility\", \"vFogInfos\", \"vFogColor\", \"pointSize\", \"vDiffuseInfos\", \"vAmbientInfos\", \"vOpacityInfos\", \"vReflectionInfos\", \"vEmissiveInfos\", \"vSpecularInfos\", \"vBumpInfos\", \"vLightmapInfos\", \"vRefractionInfos\", \"mBones\", \"diffuseMatrix\", \"ambientMatrix\", \"opacityMatrix\", \"reflectionMatrix\", \"emissiveMatrix\", \"specularMatrix\", \"bumpMatrix\", \"normalMatrix\", \"lightmapMatrix\", \"refractionMatrix\", \"diffuseLeftColor\", \"diffuseRightColor\", \"opacityParts\", \"reflectionLeftColor\", \"reflectionRightColor\", \"emissiveLeftColor\", \"emissiveRightColor\", \"refractionLeftColor\", \"refractionRightColor\", \"vReflectionPosition\", \"vReflectionSize\", \"vRefractionPosition\", \"vRefractionSize\", \"logarithmicDepthConstant\", \"vTangentSpaceParams\", \"alphaCutOff\", \"boneTextureWidth\", \"morphTargetTextureInfo\", \"morphTargetTextureIndices\"];\n const samplers = [\"diffuseSampler\", \"ambientSampler\", \"opacitySampler\", \"reflectionCubeSampler\", \"reflection2DSampler\", \"emissiveSampler\", \"specularSampler\", \"bumpSampler\", \"lightmapSampler\", \"refractionCubeSampler\", \"refraction2DSampler\", \"boneSampler\", \"morphTargets\", \"oitDepthSampler\", \"oitFrontColorSampler\"];\n const uniformBuffers = [\"Material\", \"Scene\", \"Mesh\"];\n const indexParameters = {\n maxSimultaneousLights: this._maxSimultaneousLights,\n maxSimultaneousMorphTargets: defines.NUM_MORPH_INFLUENCERS\n };\n this._eventInfo.fallbacks = fallbacks;\n this._eventInfo.fallbackRank = 0;\n this._eventInfo.defines = defines;\n this._eventInfo.uniforms = uniforms;\n this._eventInfo.attributes = attribs;\n this._eventInfo.samplers = samplers;\n this._eventInfo.uniformBuffersNames = uniformBuffers;\n this._eventInfo.customCode = undefined;\n this._eventInfo.mesh = mesh;\n this._eventInfo.indexParameters = indexParameters;\n this._callbackPluginEventGeneric(128 /* MaterialPluginEvent.PrepareEffect */, this._eventInfo);\n MaterialHelperGeometryRendering.AddUniformsAndSamplers(uniforms, samplers);\n PrePassConfiguration.AddUniforms(uniforms);\n PrePassConfiguration.AddSamplers(samplers);\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 addClipPlaneUniforms(uniforms);\n const csnrOptions = {};\n if (this.customShaderNameResolve) {\n shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);\n }\n const join = defines.toString();\n const previousEffect = subMesh.effect;\n let effect = scene.getEngine().createEffect(shaderName, {\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 processFinalCode: csnrOptions.processFinalCode,\n processCodeAfterIncludes: this._eventInfo.customCode,\n multiTarget: defines.PREPASS,\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/default.vertex.js\"), import(\"../ShadersWGSL/default.fragment.js\")]);\n } else {\n yield Promise.all([import(\"../Shaders/default.vertex.js\"), import(\"../Shaders/default.fragment.js\")]);\n }\n _this._shadersLoaded = true;\n })\n }, engine);\n this._eventInfo.customCode = undefined;\n if (effect) {\n if (this._onEffectCreatedObservable) {\n onCreatedEffectParameters.effect = effect;\n onCreatedEffectParameters.subMesh = subMesh;\n this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);\n }\n // Use previous effect while new one is compiling\n if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {\n effect = previousEffect;\n defines.markAsUnprocessed();\n forceWasNotReadyPreviously = this.isFrozen;\n if (lightDisposed) {\n // re register in case it takes more than one frame.\n defines._areLightsDisposed = true;\n return false;\n }\n } else {\n scene.resetCachedMaterial();\n subMesh.setEffect(effect, defines, this._materialContext);\n }\n }\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n drawWrapper._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;\n drawWrapper._wasPreviouslyUsingInstances = useInstances;\n this._checkScenePerformancePriority();\n return true;\n }\n /**\n * Builds the material UBO layouts.\n * Used internally during the effect preparation.\n */\n buildUniformLayout() {\n // Order is important !\n const ubo = this._uniformBuffer;\n ubo.addUniform(\"diffuseLeftColor\", 4);\n ubo.addUniform(\"diffuseRightColor\", 4);\n ubo.addUniform(\"opacityParts\", 4);\n ubo.addUniform(\"reflectionLeftColor\", 4);\n ubo.addUniform(\"reflectionRightColor\", 4);\n ubo.addUniform(\"refractionLeftColor\", 4);\n ubo.addUniform(\"refractionRightColor\", 4);\n ubo.addUniform(\"emissiveLeftColor\", 4);\n ubo.addUniform(\"emissiveRightColor\", 4);\n ubo.addUniform(\"vDiffuseInfos\", 2);\n ubo.addUniform(\"vAmbientInfos\", 2);\n ubo.addUniform(\"vOpacityInfos\", 2);\n ubo.addUniform(\"vReflectionInfos\", 2);\n ubo.addUniform(\"vReflectionPosition\", 3);\n ubo.addUniform(\"vReflectionSize\", 3);\n ubo.addUniform(\"vEmissiveInfos\", 2);\n ubo.addUniform(\"vLightmapInfos\", 2);\n ubo.addUniform(\"vSpecularInfos\", 2);\n ubo.addUniform(\"vBumpInfos\", 3);\n ubo.addUniform(\"diffuseMatrix\", 16);\n ubo.addUniform(\"ambientMatrix\", 16);\n ubo.addUniform(\"opacityMatrix\", 16);\n ubo.addUniform(\"reflectionMatrix\", 16);\n ubo.addUniform(\"emissiveMatrix\", 16);\n ubo.addUniform(\"lightmapMatrix\", 16);\n ubo.addUniform(\"specularMatrix\", 16);\n ubo.addUniform(\"bumpMatrix\", 16);\n ubo.addUniform(\"vTangentSpaceParams\", 2);\n ubo.addUniform(\"pointSize\", 1);\n ubo.addUniform(\"alphaCutOff\", 1);\n ubo.addUniform(\"refractionMatrix\", 16);\n ubo.addUniform(\"vRefractionInfos\", 4);\n ubo.addUniform(\"vRefractionPosition\", 3);\n ubo.addUniform(\"vRefractionSize\", 3);\n ubo.addUniform(\"vSpecularColor\", 4);\n ubo.addUniform(\"vEmissiveColor\", 3);\n ubo.addUniform(\"vDiffuseColor\", 4);\n ubo.addUniform(\"vAmbientColor\", 3);\n super.buildUniformLayout();\n }\n /**\n * Binds the submesh to this material by preparing the effect and shader to draw\n * @param world defines the world transformation matrix\n * @param mesh defines the mesh containing the submesh\n * @param subMesh defines the submesh to bind the material to\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 Mesh.\n mesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n mesh.transferToEffect(world);\n // Binding unconditionally\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this.prePassConfiguration.bindForSubMesh(this._activeEffect, scene, mesh, world, this.isFrozen);\n MaterialHelperGeometryRendering.Bind(scene.getEngine().currentRenderPassId, this._activeEffect, mesh, world);\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventHardBindForSubMesh(this._eventInfo);\n // Normal Matrix\n if (defines.OBJECTSPACE_NORMALMAP) {\n world.toNormalMatrix(this._normalMatrix);\n this.bindOnlyNormalMatrix(this._normalMatrix);\n }\n const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);\n // Bones\n BindBonesParameters(mesh, effect);\n const ubo = this._uniformBuffer;\n if (mustRebind) {\n this.bindViewProjection(effect);\n if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {\n if (StandardMaterial.FresnelEnabled && defines.FRESNEL) {\n // Fresnel\n if (this.diffuseFresnelParameters && this.diffuseFresnelParameters.isEnabled) {\n ubo.updateColor4(\"diffuseLeftColor\", this.diffuseFresnelParameters.leftColor, this.diffuseFresnelParameters.power);\n ubo.updateColor4(\"diffuseRightColor\", this.diffuseFresnelParameters.rightColor, this.diffuseFresnelParameters.bias);\n }\n if (this.opacityFresnelParameters && this.opacityFresnelParameters.isEnabled) {\n ubo.updateColor4(\"opacityParts\", new Color3(this.opacityFresnelParameters.leftColor.toLuminance(), this.opacityFresnelParameters.rightColor.toLuminance(), this.opacityFresnelParameters.bias), this.opacityFresnelParameters.power);\n }\n if (this.reflectionFresnelParameters && this.reflectionFresnelParameters.isEnabled) {\n ubo.updateColor4(\"reflectionLeftColor\", this.reflectionFresnelParameters.leftColor, this.reflectionFresnelParameters.power);\n ubo.updateColor4(\"reflectionRightColor\", this.reflectionFresnelParameters.rightColor, this.reflectionFresnelParameters.bias);\n }\n if (this.refractionFresnelParameters && this.refractionFresnelParameters.isEnabled) {\n ubo.updateColor4(\"refractionLeftColor\", this.refractionFresnelParameters.leftColor, this.refractionFresnelParameters.power);\n ubo.updateColor4(\"refractionRightColor\", this.refractionFresnelParameters.rightColor, this.refractionFresnelParameters.bias);\n }\n if (this.emissiveFresnelParameters && this.emissiveFresnelParameters.isEnabled) {\n ubo.updateColor4(\"emissiveLeftColor\", this.emissiveFresnelParameters.leftColor, this.emissiveFresnelParameters.power);\n ubo.updateColor4(\"emissiveRightColor\", this.emissiveFresnelParameters.rightColor, this.emissiveFresnelParameters.bias);\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n ubo.updateFloat2(\"vDiffuseInfos\", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);\n BindTextureMatrix(this._diffuseTexture, ubo, \"diffuse\");\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n ubo.updateFloat2(\"vAmbientInfos\", this._ambientTexture.coordinatesIndex, this._ambientTexture.level);\n BindTextureMatrix(this._ambientTexture, ubo, \"ambient\");\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n ubo.updateFloat2(\"vOpacityInfos\", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);\n BindTextureMatrix(this._opacityTexture, ubo, \"opacity\");\n }\n if (this._hasAlphaChannel()) {\n ubo.updateFloat(\"alphaCutOff\", this.alphaCutOff);\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n ubo.updateFloat2(\"vReflectionInfos\", this._reflectionTexture.level, this.roughness);\n ubo.updateMatrix(\"reflectionMatrix\", this._reflectionTexture.getReflectionTextureMatrix());\n if (this._reflectionTexture.boundingBoxSize) {\n const cubeTexture = this._reflectionTexture;\n ubo.updateVector3(\"vReflectionPosition\", cubeTexture.boundingBoxPosition);\n ubo.updateVector3(\"vReflectionSize\", cubeTexture.boundingBoxSize);\n }\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n ubo.updateFloat2(\"vEmissiveInfos\", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level);\n BindTextureMatrix(this._emissiveTexture, ubo, \"emissive\");\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n ubo.updateFloat2(\"vLightmapInfos\", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level);\n BindTextureMatrix(this._lightmapTexture, ubo, \"lightmap\");\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n ubo.updateFloat2(\"vSpecularInfos\", this._specularTexture.coordinatesIndex, this._specularTexture.level);\n BindTextureMatrix(this._specularTexture, ubo, \"specular\");\n }\n if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {\n ubo.updateFloat3(\"vBumpInfos\", this._bumpTexture.coordinatesIndex, 1.0 / this._bumpTexture.level, this.parallaxScaleBias);\n BindTextureMatrix(this._bumpTexture, ubo, \"bump\");\n if (scene._mirroredCameraPosition) {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);\n } else {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? -1.0 : 1.0, this._invertNormalMapY ? -1.0 : 1.0);\n }\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n let depth = 1.0;\n if (!this._refractionTexture.isCube) {\n ubo.updateMatrix(\"refractionMatrix\", this._refractionTexture.getReflectionTextureMatrix());\n if (this._refractionTexture.depth) {\n depth = this._refractionTexture.depth;\n }\n }\n ubo.updateFloat4(\"vRefractionInfos\", this._refractionTexture.level, this.indexOfRefraction, depth, this.invertRefractionY ? -1 : 1);\n if (this._refractionTexture.boundingBoxSize) {\n const cubeTexture = this._refractionTexture;\n ubo.updateVector3(\"vRefractionPosition\", cubeTexture.boundingBoxPosition);\n ubo.updateVector3(\"vRefractionSize\", cubeTexture.boundingBoxSize);\n }\n }\n }\n // Point size\n if (this.pointsCloud) {\n ubo.updateFloat(\"pointSize\", this.pointSize);\n }\n ubo.updateColor4(\"vSpecularColor\", this.specularColor, this.specularPower);\n ubo.updateColor3(\"vEmissiveColor\", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : Color3.BlackReadOnly);\n ubo.updateColor4(\"vDiffuseColor\", this.diffuseColor, this.alpha);\n scene.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor);\n ubo.updateColor3(\"vAmbientColor\", this._globalAmbientColor);\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n effect.setTexture(\"diffuseSampler\", this._diffuseTexture);\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n effect.setTexture(\"ambientSampler\", this._ambientTexture);\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n effect.setTexture(\"opacitySampler\", this._opacityTexture);\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n if (this._reflectionTexture.isCube) {\n effect.setTexture(\"reflectionCubeSampler\", this._reflectionTexture);\n } else {\n effect.setTexture(\"reflection2DSampler\", this._reflectionTexture);\n }\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n effect.setTexture(\"emissiveSampler\", this._emissiveTexture);\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n effect.setTexture(\"lightmapSampler\", this._lightmapTexture);\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n effect.setTexture(\"specularSampler\", this._specularTexture);\n }\n if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {\n effect.setTexture(\"bumpSampler\", this._bumpTexture);\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n if (this._refractionTexture.isCube) {\n effect.setTexture(\"refractionCubeSampler\", this._refractionTexture);\n } else {\n effect.setTexture(\"refraction2DSampler\", this._refractionTexture);\n }\n }\n }\n // OIT with depth peeling\n if (this.getScene().useOrderIndependentTransparency && this.needAlphaBlendingForMesh(mesh)) {\n this.getScene().depthPeelingRenderer.bind(effect);\n }\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventBindForSubMesh(this._eventInfo);\n // Clip plane\n bindClipPlane(effect, this, scene);\n // Colors\n this.bindEyePosition(effect);\n } else if (scene.getEngine()._features.needToAlwaysBindUniformBuffers) {\n this._needToBindSceneUbo = true;\n }\n if (mustRebind || !this.isFrozen) {\n // Lights\n if (scene.lightsEnabled && !this._disableLighting) {\n BindLights(scene, mesh, effect, defines, this._maxSimultaneousLights);\n }\n // View\n if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE || this._reflectionTexture || this._refractionTexture || mesh.receiveShadows || defines.PREPASS) {\n this.bindView(effect);\n }\n // Fog\n BindFogParameters(scene, mesh, effect);\n // Morph targets\n if (defines.NUM_MORPH_INFLUENCERS) {\n BindMorphTargetParameters(mesh, effect);\n }\n if (defines.BAKED_VERTEX_ANIMATION_TEXTURE) {\n var _mesh$bakedVertexAnim;\n (_mesh$bakedVertexAnim = mesh.bakedVertexAnimationManager) === null || _mesh$bakedVertexAnim === void 0 || _mesh$bakedVertexAnim.bind(effect, defines.INSTANCES);\n }\n // Log. depth\n if (this.useLogarithmicDepth) {\n BindLogDepth(defines, effect, scene);\n }\n // image processing\n if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) {\n this._imageProcessingConfiguration.bind(this._activeEffect);\n }\n }\n this._afterBind(mesh, this._activeEffect, subMesh);\n ubo.update();\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n const results = super.getAnimatables();\n if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) {\n results.push(this._diffuseTexture);\n }\n if (this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0) {\n results.push(this._ambientTexture);\n }\n if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) {\n results.push(this._opacityTexture);\n }\n if (this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0) {\n results.push(this._reflectionTexture);\n }\n if (this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0) {\n results.push(this._emissiveTexture);\n }\n if (this._specularTexture && this._specularTexture.animations && this._specularTexture.animations.length > 0) {\n results.push(this._specularTexture);\n }\n if (this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0) {\n results.push(this._bumpTexture);\n }\n if (this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0) {\n results.push(this._lightmapTexture);\n }\n if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {\n results.push(this._refractionTexture);\n }\n return results;\n }\n /**\n * Gets the active textures from the material\n * @returns an array of textures\n */\n getActiveTextures() {\n const activeTextures = super.getActiveTextures();\n if (this._diffuseTexture) {\n activeTextures.push(this._diffuseTexture);\n }\n if (this._ambientTexture) {\n activeTextures.push(this._ambientTexture);\n }\n if (this._opacityTexture) {\n activeTextures.push(this._opacityTexture);\n }\n if (this._reflectionTexture) {\n activeTextures.push(this._reflectionTexture);\n }\n if (this._emissiveTexture) {\n activeTextures.push(this._emissiveTexture);\n }\n if (this._specularTexture) {\n activeTextures.push(this._specularTexture);\n }\n if (this._bumpTexture) {\n activeTextures.push(this._bumpTexture);\n }\n if (this._lightmapTexture) {\n activeTextures.push(this._lightmapTexture);\n }\n if (this._refractionTexture) {\n activeTextures.push(this._refractionTexture);\n }\n return activeTextures;\n }\n /**\n * Specifies if the material uses a texture\n * @param texture defines the texture to check against the material\n * @returns a boolean specifying if the material uses the texture\n */\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n if (this._diffuseTexture === texture) {\n return true;\n }\n if (this._ambientTexture === texture) {\n return true;\n }\n if (this._opacityTexture === texture) {\n return true;\n }\n if (this._reflectionTexture === texture) {\n return true;\n }\n if (this._emissiveTexture === texture) {\n return true;\n }\n if (this._specularTexture === texture) {\n return true;\n }\n if (this._bumpTexture === texture) {\n return true;\n }\n if (this._lightmapTexture === texture) {\n return true;\n }\n if (this._refractionTexture === texture) {\n return true;\n }\n return false;\n }\n /**\n * Disposes the material\n * @param forceDisposeEffect specifies if effects should be forcefully disposed\n * @param forceDisposeTextures specifies if textures should be forcefully disposed\n */\n dispose(forceDisposeEffect, forceDisposeTextures) {\n if (forceDisposeTextures) {\n var _this$_diffuseTexture, _this$_ambientTexture, _this$_opacityTexture, _this$_reflectionText, _this$_emissiveTextur, _this$_specularTextur, _this$_bumpTexture, _this$_lightmapTextur, _this$_refractionText;\n (_this$_diffuseTexture = this._diffuseTexture) === null || _this$_diffuseTexture === void 0 || _this$_diffuseTexture.dispose();\n (_this$_ambientTexture = this._ambientTexture) === null || _this$_ambientTexture === void 0 || _this$_ambientTexture.dispose();\n (_this$_opacityTexture = this._opacityTexture) === null || _this$_opacityTexture === void 0 || _this$_opacityTexture.dispose();\n (_this$_reflectionText = this._reflectionTexture) === null || _this$_reflectionText === void 0 || _this$_reflectionText.dispose();\n (_this$_emissiveTextur = this._emissiveTexture) === null || _this$_emissiveTextur === void 0 || _this$_emissiveTextur.dispose();\n (_this$_specularTextur = this._specularTexture) === null || _this$_specularTextur === void 0 || _this$_specularTextur.dispose();\n (_this$_bumpTexture = this._bumpTexture) === null || _this$_bumpTexture === void 0 || _this$_bumpTexture.dispose();\n (_this$_lightmapTextur = this._lightmapTexture) === null || _this$_lightmapTextur === void 0 || _this$_lightmapTextur.dispose();\n (_this$_refractionText = this._refractionTexture) === null || _this$_refractionText === void 0 || _this$_refractionText.dispose();\n }\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n super.dispose(forceDisposeEffect, forceDisposeTextures);\n }\n /**\n * Makes a duplicate of the material, and gives it a new name\n * @param name defines the new name for the duplicated material\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\n * @param rootUrl defines the root URL to use to load textures\n * @returns the cloned material\n */\n clone(name, cloneTexturesOnlyOnce = true, rootUrl = \"\") {\n const result = SerializationHelper.Clone(() => new StandardMaterial(name, this.getScene()), this, {\n cloneTexturesOnlyOnce\n });\n result.name = name;\n result.id = name;\n this.stencil.copyTo(result.stencil);\n this._clonePlugins(result, rootUrl);\n return result;\n }\n /**\n * Creates a standard material from parsed material data\n * @param source defines the JSON representation of the material\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures and relative dependencies\n * @returns a new standard material\n */\n static Parse(source, scene, rootUrl) {\n const material = SerializationHelper.Parse(() => new StandardMaterial(source.name, scene), source, scene, rootUrl);\n if (source.stencil) {\n material.stencil.parse(source.stencil, scene, rootUrl);\n }\n Material._ParsePlugins(source, material, scene, rootUrl);\n return material;\n }\n // Flags used to enable or disable a type of texture for all Standard Materials\n /**\n * Are diffuse textures enabled in the application.\n */\n static get DiffuseTextureEnabled() {\n return MaterialFlags.DiffuseTextureEnabled;\n }\n static set DiffuseTextureEnabled(value) {\n MaterialFlags.DiffuseTextureEnabled = value;\n }\n /**\n * Are detail textures enabled in the application.\n */\n static get DetailTextureEnabled() {\n return MaterialFlags.DetailTextureEnabled;\n }\n static set DetailTextureEnabled(value) {\n MaterialFlags.DetailTextureEnabled = value;\n }\n /**\n * Are ambient textures enabled in the application.\n */\n static get AmbientTextureEnabled() {\n return MaterialFlags.AmbientTextureEnabled;\n }\n static set AmbientTextureEnabled(value) {\n MaterialFlags.AmbientTextureEnabled = value;\n }\n /**\n * Are opacity textures enabled in the application.\n */\n static get OpacityTextureEnabled() {\n return MaterialFlags.OpacityTextureEnabled;\n }\n static set OpacityTextureEnabled(value) {\n MaterialFlags.OpacityTextureEnabled = value;\n }\n /**\n * Are reflection textures enabled in the application.\n */\n static get ReflectionTextureEnabled() {\n return MaterialFlags.ReflectionTextureEnabled;\n }\n static set ReflectionTextureEnabled(value) {\n MaterialFlags.ReflectionTextureEnabled = value;\n }\n /**\n * Are emissive textures enabled in the application.\n */\n static get EmissiveTextureEnabled() {\n return MaterialFlags.EmissiveTextureEnabled;\n }\n static set EmissiveTextureEnabled(value) {\n MaterialFlags.EmissiveTextureEnabled = value;\n }\n /**\n * Are specular textures enabled in the application.\n */\n static get SpecularTextureEnabled() {\n return MaterialFlags.SpecularTextureEnabled;\n }\n static set SpecularTextureEnabled(value) {\n MaterialFlags.SpecularTextureEnabled = value;\n }\n /**\n * Are bump textures enabled in the application.\n */\n static get BumpTextureEnabled() {\n return MaterialFlags.BumpTextureEnabled;\n }\n static set BumpTextureEnabled(value) {\n MaterialFlags.BumpTextureEnabled = value;\n }\n /**\n * Are lightmap textures enabled in the application.\n */\n static get LightmapTextureEnabled() {\n return MaterialFlags.LightmapTextureEnabled;\n }\n static set LightmapTextureEnabled(value) {\n MaterialFlags.LightmapTextureEnabled = value;\n }\n /**\n * Are refraction textures enabled in the application.\n */\n static get RefractionTextureEnabled() {\n return MaterialFlags.RefractionTextureEnabled;\n }\n static set RefractionTextureEnabled(value) {\n MaterialFlags.RefractionTextureEnabled = value;\n }\n /**\n * Are color grading textures enabled in the application.\n */\n static get ColorGradingTextureEnabled() {\n return MaterialFlags.ColorGradingTextureEnabled;\n }\n static set ColorGradingTextureEnabled(value) {\n MaterialFlags.ColorGradingTextureEnabled = value;\n }\n /**\n * Are fresnels enabled in the application.\n */\n static get FresnelEnabled() {\n return MaterialFlags.FresnelEnabled;\n }\n static set FresnelEnabled(value) {\n MaterialFlags.FresnelEnabled = value;\n }\n}\n/**\n * Force all the standard materials to compile to glsl even on WebGPU engines.\n * False by default. This is mostly meant for backward compatibility.\n */\nStandardMaterial.ForceGLSL = false;\n__decorate([serializeAsTexture(\"diffuseTexture\")], StandardMaterial.prototype, \"_diffuseTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")], StandardMaterial.prototype, \"diffuseTexture\", void 0);\n__decorate([serializeAsTexture(\"ambientTexture\")], StandardMaterial.prototype, \"_ambientTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"ambientTexture\", void 0);\n__decorate([serializeAsTexture(\"opacityTexture\")], StandardMaterial.prototype, \"_opacityTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")], StandardMaterial.prototype, \"opacityTexture\", void 0);\n__decorate([serializeAsTexture(\"reflectionTexture\")], StandardMaterial.prototype, \"_reflectionTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"reflectionTexture\", void 0);\n__decorate([serializeAsTexture(\"emissiveTexture\")], StandardMaterial.prototype, \"_emissiveTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"emissiveTexture\", void 0);\n__decorate([serializeAsTexture(\"specularTexture\")], StandardMaterial.prototype, \"_specularTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"specularTexture\", void 0);\n__decorate([serializeAsTexture(\"bumpTexture\")], StandardMaterial.prototype, \"_bumpTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"bumpTexture\", void 0);\n__decorate([serializeAsTexture(\"lightmapTexture\")], StandardMaterial.prototype, \"_lightmapTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"lightmapTexture\", void 0);\n__decorate([serializeAsTexture(\"refractionTexture\")], StandardMaterial.prototype, \"_refractionTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"refractionTexture\", void 0);\n__decorate([serializeAsColor3(\"ambient\")], StandardMaterial.prototype, \"ambientColor\", void 0);\n__decorate([serializeAsColor3(\"diffuse\")], StandardMaterial.prototype, \"diffuseColor\", void 0);\n__decorate([serializeAsColor3(\"specular\")], StandardMaterial.prototype, \"specularColor\", void 0);\n__decorate([serializeAsColor3(\"emissive\")], StandardMaterial.prototype, \"emissiveColor\", void 0);\n__decorate([serialize()], StandardMaterial.prototype, \"specularPower\", void 0);\n__decorate([serialize(\"useAlphaFromDiffuseTexture\")], StandardMaterial.prototype, \"_useAlphaFromDiffuseTexture\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")], StandardMaterial.prototype, \"useAlphaFromDiffuseTexture\", void 0);\n__decorate([serialize(\"useEmissiveAsIllumination\")], StandardMaterial.prototype, \"_useEmissiveAsIllumination\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useEmissiveAsIllumination\", void 0);\n__decorate([serialize(\"linkEmissiveWithDiffuse\")], StandardMaterial.prototype, \"_linkEmissiveWithDiffuse\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"linkEmissiveWithDiffuse\", void 0);\n__decorate([serialize(\"useSpecularOverAlpha\")], StandardMaterial.prototype, \"_useSpecularOverAlpha\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useSpecularOverAlpha\", void 0);\n__decorate([serialize(\"useReflectionOverAlpha\")], StandardMaterial.prototype, \"_useReflectionOverAlpha\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useReflectionOverAlpha\", void 0);\n__decorate([serialize(\"disableLighting\")], StandardMaterial.prototype, \"_disableLighting\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsLightsDirty\")], StandardMaterial.prototype, \"disableLighting\", void 0);\n__decorate([serialize(\"useObjectSpaceNormalMap\")], StandardMaterial.prototype, \"_useObjectSpaceNormalMap\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useObjectSpaceNormalMap\", void 0);\n__decorate([serialize(\"useParallax\")], StandardMaterial.prototype, \"_useParallax\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useParallax\", void 0);\n__decorate([serialize(\"useParallaxOcclusion\")], StandardMaterial.prototype, \"_useParallaxOcclusion\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useParallaxOcclusion\", void 0);\n__decorate([serialize()], StandardMaterial.prototype, \"parallaxScaleBias\", void 0);\n__decorate([serialize(\"roughness\")], StandardMaterial.prototype, \"_roughness\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"roughness\", void 0);\n__decorate([serialize()], StandardMaterial.prototype, \"indexOfRefraction\", void 0);\n__decorate([serialize()], StandardMaterial.prototype, \"invertRefractionY\", void 0);\n__decorate([serialize()], StandardMaterial.prototype, \"alphaCutOff\", void 0);\n__decorate([serialize(\"useLightmapAsShadowmap\")], StandardMaterial.prototype, \"_useLightmapAsShadowmap\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useLightmapAsShadowmap\", void 0);\n__decorate([serializeAsFresnelParameters(\"diffuseFresnelParameters\")], StandardMaterial.prototype, \"_diffuseFresnelParameters\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")], StandardMaterial.prototype, \"diffuseFresnelParameters\", void 0);\n__decorate([serializeAsFresnelParameters(\"opacityFresnelParameters\")], StandardMaterial.prototype, \"_opacityFresnelParameters\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsFresnelAndMiscDirty\")], StandardMaterial.prototype, \"opacityFresnelParameters\", void 0);\n__decorate([serializeAsFresnelParameters(\"reflectionFresnelParameters\")], StandardMaterial.prototype, \"_reflectionFresnelParameters\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")], StandardMaterial.prototype, \"reflectionFresnelParameters\", void 0);\n__decorate([serializeAsFresnelParameters(\"refractionFresnelParameters\")], StandardMaterial.prototype, \"_refractionFresnelParameters\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")], StandardMaterial.prototype, \"refractionFresnelParameters\", void 0);\n__decorate([serializeAsFresnelParameters(\"emissiveFresnelParameters\")], StandardMaterial.prototype, \"_emissiveFresnelParameters\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")], StandardMaterial.prototype, \"emissiveFresnelParameters\", void 0);\n__decorate([serialize(\"useReflectionFresnelFromSpecular\")], StandardMaterial.prototype, \"_useReflectionFresnelFromSpecular\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")], StandardMaterial.prototype, \"useReflectionFresnelFromSpecular\", void 0);\n__decorate([serialize(\"useGlossinessFromSpecularMapAlpha\")], StandardMaterial.prototype, \"_useGlossinessFromSpecularMapAlpha\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"useGlossinessFromSpecularMapAlpha\", void 0);\n__decorate([serialize(\"maxSimultaneousLights\")], StandardMaterial.prototype, \"_maxSimultaneousLights\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsLightsDirty\")], StandardMaterial.prototype, \"maxSimultaneousLights\", void 0);\n__decorate([serialize(\"invertNormalMapX\")], StandardMaterial.prototype, \"_invertNormalMapX\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"invertNormalMapX\", void 0);\n__decorate([serialize(\"invertNormalMapY\")], StandardMaterial.prototype, \"_invertNormalMapY\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"invertNormalMapY\", void 0);\n__decorate([serialize(\"twoSidedLighting\")], StandardMaterial.prototype, \"_twoSidedLighting\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], StandardMaterial.prototype, \"twoSidedLighting\", void 0);\n__decorate([serialize(\"applyDecalMapAfterDetailMap\")], StandardMaterial.prototype, \"_applyDecalMapAfterDetailMap\", void 0);\n__decorate([expandToProperty(\"_markAllSubMeshesAsMiscDirty\")], StandardMaterial.prototype, \"applyDecalMapAfterDetailMap\", void 0);\nRegisterClass(\"BABYLON.StandardMaterial\", StandardMaterial);\nScene.DefaultMaterialFactory = scene => {\n return new StandardMaterial(\"default material\", scene);\n};","map":{"version":3,"names":["__decorate","serialize","serializeAsColor3","expandToProperty","serializeAsFresnelParameters","serializeAsTexture","SmartArray","Scene","Matrix","Color3","VertexBuffer","PrePassConfiguration","ImageProcessingConfiguration","Material","MaterialDefines","PushMaterial","Texture","RegisterClass","MaterialFlags","EffectFallbacks","DetailMapConfiguration","addClipPlaneUniforms","bindClipPlane","BindBonesParameters","BindFogParameters","BindLights","BindLogDepth","BindMorphTargetParameters","BindTextureMatrix","HandleFallbacksForShadows","PrepareAttributesForBakedVertexAnimation","PrepareAttributesForBones","PrepareAttributesForInstances","PrepareAttributesForMorphTargets","PrepareDefinesForAttributes","PrepareDefinesForFrameBoundValues","PrepareDefinesForLights","PrepareDefinesForMergedUV","PrepareDefinesForMisc","PrepareDefinesForMultiview","PrepareDefinesForOIT","PrepareDefinesForPrePass","PrepareUniformsAndSamplersList","SerializationHelper","MaterialHelperGeometryRendering","onCreatedEffectParameters","effect","subMesh","StandardMaterialDefines","constructor","externalProperties","MAINUV1","MAINUV2","MAINUV3","MAINUV4","MAINUV5","MAINUV6","DIFFUSE","DIFFUSEDIRECTUV","BAKED_VERTEX_ANIMATION_TEXTURE","AMBIENT","AMBIENTDIRECTUV","OPACITY","OPACITYDIRECTUV","OPACITYRGB","REFLECTION","EMISSIVE","EMISSIVEDIRECTUV","SPECULAR","SPECULARDIRECTUV","BUMP","BUMPDIRECTUV","PARALLAX","PARALLAX_RHS","PARALLAXOCCLUSION","SPECULAROVERALPHA","CLIPPLANE","CLIPPLANE2","CLIPPLANE3","CLIPPLANE4","CLIPPLANE5","CLIPPLANE6","ALPHATEST","DEPTHPREPASS","ALPHAFROMDIFFUSE","POINTSIZE","FOG","SPECULARTERM","DIFFUSEFRESNEL","OPACITYFRESNEL","REFLECTIONFRESNEL","REFRACTIONFRESNEL","EMISSIVEFRESNEL","FRESNEL","NORMAL","TANGENT","UV1","UV2","UV3","UV4","UV5","UV6","VERTEXCOLOR","VERTEXALPHA","NUM_BONE_INFLUENCERS","BonesPerMesh","BONETEXTURE","BONES_VELOCITY_ENABLED","INSTANCES","THIN_INSTANCES","INSTANCESCOLOR","GLOSSINESS","ROUGHNESS","EMISSIVEASILLUMINATION","LINKEMISSIVEWITHDIFFUSE","REFLECTIONFRESNELFROMSPECULAR","LIGHTMAP","LIGHTMAPDIRECTUV","OBJECTSPACE_NORMALMAP","USELIGHTMAPASSHADOWMAP","REFLECTIONMAP_3D","REFLECTIONMAP_SPHERICAL","REFLECTIONMAP_PLANAR","REFLECTIONMAP_CUBIC","USE_LOCAL_REFLECTIONMAP_CUBIC","USE_LOCAL_REFRACTIONMAP_CUBIC","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_SKYBOX","REFLECTIONMAP_EXPLICIT","REFLECTIONMAP_EQUIRECTANGULAR","REFLECTIONMAP_EQUIRECTANGULAR_FIXED","REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED","REFLECTIONMAP_OPPOSITEZ","INVERTCUBICMAP","LOGARITHMICDEPTH","REFRACTION","REFRACTIONMAP_3D","REFLECTIONOVERALPHA","TWOSIDEDLIGHTING","SHADOWFLOAT","MORPHTARGETS","MORPHTARGETS_NORMAL","MORPHTARGETS_TANGENT","MORPHTARGETS_UV","NUM_MORPH_INFLUENCERS","MORPHTARGETS_TEXTURE","NONUNIFORMSCALING","PREMULTIPLYALPHA","ALPHATEST_AFTERALLALPHACOMPUTATIONS","ALPHABLEND","PREPASS","PREPASS_COLOR","PREPASS_COLOR_INDEX","PREPASS_IRRADIANCE","PREPASS_IRRADIANCE_INDEX","PREPASS_ALBEDO","PREPASS_ALBEDO_INDEX","PREPASS_ALBEDO_SQRT","PREPASS_ALBEDO_SQRT_INDEX","PREPASS_DEPTH","PREPASS_DEPTH_INDEX","PREPASS_SCREENSPACE_DEPTH","PREPASS_SCREENSPACE_DEPTH_INDEX","PREPASS_NORMAL","PREPASS_NORMAL_INDEX","PREPASS_NORMAL_WORLDSPACE","PREPASS_WORLD_NORMAL","PREPASS_WORLD_NORMAL_INDEX","PREPASS_POSITION","PREPASS_POSITION_INDEX","PREPASS_LOCAL_POSITION","PREPASS_LOCAL_POSITION_INDEX","PREPASS_VELOCITY","PREPASS_VELOCITY_INDEX","PREPASS_VELOCITY_LINEAR","PREPASS_VELOCITY_LINEAR_INDEX","PREPASS_REFLECTIVITY","PREPASS_REFLECTIVITY_INDEX","SCENE_MRT_COUNT","RGBDLIGHTMAP","RGBDREFLECTION","RGBDREFRACTION","IMAGEPROCESSING","VIGNETTE","VIGNETTEBLENDMODEMULTIPLY","VIGNETTEBLENDMODEOPAQUE","TONEMAPPING","CONTRAST","COLORCURVES","COLORGRADING","COLORGRADING3D","SAMPLER3DGREENDEPTH","SAMPLER3DBGRMAP","DITHER","IMAGEPROCESSINGPOSTPROCESS","SKIPFINALCOLORCLAMP","MULTIVIEW","ORDER_INDEPENDENT_TRANSPARENCY","ORDER_INDEPENDENT_TRANSPARENCY_16BITS","CAMERA_ORTHOGRAPHIC","CAMERA_PERSPECTIVE","IS_REFLECTION_LINEAR","IS_REFRACTION_LINEAR","EXPOSURE","DECAL_AFTER_DETAIL","rebuild","setReflectionMode","modeToEnable","modes","mode","StandardMaterial","imageProcessingConfiguration","_imageProcessingConfiguration","value","_attachImageProcessingConfiguration","_markAllSubMeshesAsTexturesDirty","configuration","_imageProcessingObserver","onUpdateParameters","remove","getScene","add","_markAllSubMeshesAsImageProcessingDirty","isPrePassCapable","disableDepthWrite","cameraColorCurvesEnabled","colorCurvesEnabled","cameraColorGradingEnabled","colorGradingEnabled","cameraToneMappingEnabled","toneMappingEnabled","cameraExposure","exposure","cameraContrast","contrast","cameraColorGradingTexture","colorGradingTexture","cameraColorCurves","colorCurves","canRenderToMRT","name","scene","forceGLSL","undefined","ForceGLSL","_diffuseTexture","_ambientTexture","_opacityTexture","_reflectionTexture","_emissiveTexture","_specularTexture","_bumpTexture","_lightmapTexture","_refractionTexture","ambientColor","diffuseColor","specularColor","emissiveColor","specularPower","_useAlphaFromDiffuseTexture","_useEmissiveAsIllumination","_linkEmissiveWithDiffuse","_useSpecularOverAlpha","_useReflectionOverAlpha","_disableLighting","_useObjectSpaceNormalMap","_useParallax","_useParallaxOcclusion","parallaxScaleBias","_roughness","indexOfRefraction","invertRefractionY","alphaCutOff","_useLightmapAsShadowmap","_useReflectionFresnelFromSpecular","_useGlossinessFromSpecularMapAlpha","_maxSimultaneousLights","_invertNormalMapX","_invertNormalMapY","_twoSidedLighting","_applyDecalMapAfterDetailMap","_shadersLoaded","_renderTargets","_worldViewProjectionMatrix","Zero","_globalAmbientColor","_cacheHasRenderTargetTextures","detailMap","prePassConfiguration","getRenderTargetTextures","reset","ReflectionTextureEnabled","isRenderTarget","push","RefractionTextureEnabled","_eventInfo","renderTargets","_callbackPluginEventFillRenderTargetTextures","hasRenderTargetTextures","getClassName","needAlphaBlending","_disableAlphaBlending","alpha","_shouldUseAlphaFromDiffuseTexture","_opacityFresnelParameters","isEnabled","needAlphaTesting","_forceAlphaTest","_hasAlphaChannel","_transparencyMode","MATERIAL_ALPHATEST","hasAlpha","MATERIAL_OPAQUE","getAlphaTestTexture","isReadyForSubMesh","mesh","useInstances","_this","_uniformBufferLayoutBuilt","buildUniformLayout","drawWrapper","_drawWrapper","isFrozen","_wasPreviouslyReady","_wasPreviouslyUsingInstances","materialDefines","_callbackPluginEventGeneric","defineNames","defines","_isReadyForSubMesh","engine","getEngine","_needNormals","oit","needAlphaBlendingForMesh","useOrderIndependentTransparency","PrepareDefines","currentRenderPassId","_areTexturesDirty","_callbackPluginEventHasRenderTargetTextures","_needUVs","i","texturesEnabled","DiffuseTextureEnabled","isReadyOrNotBlocking","AmbientTextureEnabled","OpacityTextureEnabled","getAlphaFromRGB","coordinatesMode","INVCUBIC_MODE","isCube","useRightHandedSystem","invertZ","isRGBD","EXPLICIT_MODE","PLANAR_MODE","PROJECTION_MODE","SKYBOX_MODE","SPHERICAL_MODE","EQUIRECTANGULAR_MODE","FIXED_EQUIRECTANGULAR_MODE","FIXED_EQUIRECTANGULAR_MIRRORED_MODE","CUBIC_MODE","boundingBoxSize","EmissiveTextureEnabled","LightmapTextureEnabled","SpecularTextureEnabled","getCaps","standardDerivatives","BumpTextureEnabled","isReady","_backFaceCulling","alphaMode","transparencyMode","_callbackPluginEventIsReadyForSubMesh","_areImageProcessingDirty","prepareDefines","reflectionTexture","gammaSpace","refractionTexture","_areFresnelDirty","FresnelEnabled","_diffuseFresnelParameters","_emissiveFresnelParameters","_refractionFresnelParameters","_reflectionFresnelParameters","_useLogarithmicDepth","pointsCloud","fogEnabled","_shouldTurnAlphaTestOn","getRenderingMesh","hasThinInstances","_callbackPluginEventPrepareDefinesBeforeAttributes","_callbackPluginEventPrepareDefines","forceWasNotReadyPreviously","isDirty","lightDisposed","_areLightsDisposed","markAsProcessed","fallbacks","addFallback","attribs","PositionKind","NormalKind","TangentKind","ColorKind","shaderName","uniforms","samplers","uniformBuffers","indexParameters","maxSimultaneousLights","maxSimultaneousMorphTargets","fallbackRank","attributes","uniformBuffersNames","customCode","AddUniformsAndSamplers","AddUniforms","AddSamplers","PrepareUniforms","PrepareSamplers","uniformsNames","csnrOptions","customShaderNameResolve","join","toString","previousEffect","createEffect","onCompiled","onError","processFinalCode","processCodeAfterIncludes","multiTarget","shaderLanguage","_shaderLanguage","extraInitializationsAsync","_asyncToGenerator","Promise","all","_onEffectCreatedObservable","notifyObservers","allowShaderHotSwapping","markAsUnprocessed","resetCachedMaterial","setEffect","_materialContext","_renderId","getRenderId","_checkScenePerformancePriority","ubo","_uniformBuffer","addUniform","bindForSubMesh","world","_activeEffect","getMeshUniformBuffer","bindToEffect","transferToEffect","Bind","_callbackPluginEventHardBindForSubMesh","toNormalMatrix","_normalMatrix","bindOnlyNormalMatrix","mustRebind","_mustRebind","visibility","bindViewProjection","useUbo","isSync","_forceRebindOnNextCall","diffuseFresnelParameters","updateColor4","leftColor","power","rightColor","bias","opacityFresnelParameters","toLuminance","reflectionFresnelParameters","refractionFresnelParameters","emissiveFresnelParameters","updateFloat2","coordinatesIndex","level","updateFloat","roughness","updateMatrix","getReflectionTextureMatrix","cubeTexture","updateVector3","boundingBoxPosition","updateFloat3","_mirroredCameraPosition","depth","updateFloat4","pointSize","updateColor3","BlackReadOnly","multiplyToRef","setTexture","depthPeelingRenderer","bind","_callbackPluginEventBindForSubMesh","bindEyePosition","_features","needToAlwaysBindUniformBuffers","_needToBindSceneUbo","lightsEnabled","applyFog","fogMode","FOGMODE_NONE","receiveShadows","bindView","_mesh$bakedVertexAnim","bakedVertexAnimationManager","useLogarithmicDepth","applyByPostProcess","_afterBind","update","getAnimatables","results","animations","length","getActiveTextures","activeTextures","hasTexture","texture","dispose","forceDisposeEffect","forceDisposeTextures","_this$_diffuseTexture","_this$_ambientTexture","_this$_opacityTexture","_this$_reflectionText","_this$_emissiveTextur","_this$_specularTextur","_this$_bumpTexture","_this$_lightmapTextur","_this$_refractionText","clone","cloneTexturesOnlyOnce","rootUrl","result","Clone","id","stencil","copyTo","_clonePlugins","Parse","source","material","parse","_ParsePlugins","DetailTextureEnabled","ColorGradingTextureEnabled","prototype","DefaultMaterialFactory"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/standardMaterial.js"],"sourcesContent":["import { __decorate } from \"../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, serializeAsColor3, expandToProperty, serializeAsFresnelParameters, serializeAsTexture } from \"../Misc/decorators.js\";\nimport { SmartArray } from \"../Misc/smartArray.js\";\nimport { Scene } from \"../scene.js\";\nimport { Matrix } from \"../Maths/math.vector.js\";\nimport { Color3 } from \"../Maths/math.color.js\";\nimport { VertexBuffer } from \"../Buffers/buffer.js\";\nimport { PrePassConfiguration } from \"./prePassConfiguration.js\";\nimport { ImageProcessingConfiguration } from \"./imageProcessingConfiguration.js\";\nimport { Material } from \"../Materials/material.js\";\nimport { MaterialDefines } from \"../Materials/materialDefines.js\";\nimport { PushMaterial } from \"./pushMaterial.js\";\nimport { Texture } from \"../Materials/Textures/texture.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { MaterialFlags } from \"./materialFlags.js\";\n\nimport { EffectFallbacks } from \"./effectFallbacks.js\";\nimport { DetailMapConfiguration } from \"./material.detailMapConfiguration.js\";\nimport { addClipPlaneUniforms, bindClipPlane } from \"./clipPlaneMaterialHelper.js\";\nimport { BindBonesParameters, BindFogParameters, BindLights, BindLogDepth, BindMorphTargetParameters, BindTextureMatrix, HandleFallbacksForShadows, PrepareAttributesForBakedVertexAnimation, PrepareAttributesForBones, PrepareAttributesForInstances, PrepareAttributesForMorphTargets, PrepareDefinesForAttributes, PrepareDefinesForFrameBoundValues, PrepareDefinesForLights, PrepareDefinesForMergedUV, PrepareDefinesForMisc, PrepareDefinesForMultiview, PrepareDefinesForOIT, PrepareDefinesForPrePass, PrepareUniformsAndSamplersList, } from \"./materialHelper.functions.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\nimport { MaterialHelperGeometryRendering } from \"./materialHelper.geometryrendering.js\";\nconst onCreatedEffectParameters = { effect: null, subMesh: null };\n/** @internal */\nexport class StandardMaterialDefines extends MaterialDefines {\n /**\n * Initializes the Standard Material defines.\n * @param externalProperties The external properties\n */\n constructor(externalProperties) {\n super(externalProperties);\n this.MAINUV1 = false;\n this.MAINUV2 = false;\n this.MAINUV3 = false;\n this.MAINUV4 = false;\n this.MAINUV5 = false;\n this.MAINUV6 = false;\n this.DIFFUSE = false;\n this.DIFFUSEDIRECTUV = 0;\n this.BAKED_VERTEX_ANIMATION_TEXTURE = false;\n this.AMBIENT = false;\n this.AMBIENTDIRECTUV = 0;\n this.OPACITY = false;\n this.OPACITYDIRECTUV = 0;\n this.OPACITYRGB = false;\n this.REFLECTION = false;\n this.EMISSIVE = false;\n this.EMISSIVEDIRECTUV = 0;\n this.SPECULAR = false;\n this.SPECULARDIRECTUV = 0;\n this.BUMP = false;\n this.BUMPDIRECTUV = 0;\n this.PARALLAX = false;\n this.PARALLAX_RHS = false;\n this.PARALLAXOCCLUSION = false;\n this.SPECULAROVERALPHA = 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.ALPHATEST = false;\n this.DEPTHPREPASS = false;\n this.ALPHAFROMDIFFUSE = false;\n this.POINTSIZE = false;\n this.FOG = false;\n this.SPECULARTERM = false;\n this.DIFFUSEFRESNEL = false;\n this.OPACITYFRESNEL = false;\n this.REFLECTIONFRESNEL = false;\n this.REFRACTIONFRESNEL = false;\n this.EMISSIVEFRESNEL = false;\n this.FRESNEL = false;\n this.NORMAL = false;\n this.TANGENT = false;\n this.UV1 = false;\n this.UV2 = false;\n this.UV3 = false;\n this.UV4 = false;\n this.UV5 = false;\n this.UV6 = false;\n this.VERTEXCOLOR = false;\n this.VERTEXALPHA = false;\n this.NUM_BONE_INFLUENCERS = 0;\n this.BonesPerMesh = 0;\n this.BONETEXTURE = false;\n this.BONES_VELOCITY_ENABLED = false;\n this.INSTANCES = false;\n this.THIN_INSTANCES = false;\n this.INSTANCESCOLOR = false;\n this.GLOSSINESS = false;\n this.ROUGHNESS = false;\n this.EMISSIVEASILLUMINATION = false;\n this.LINKEMISSIVEWITHDIFFUSE = false;\n this.REFLECTIONFRESNELFROMSPECULAR = false;\n this.LIGHTMAP = false;\n this.LIGHTMAPDIRECTUV = 0;\n this.OBJECTSPACE_NORMALMAP = false;\n this.USELIGHTMAPASSHADOWMAP = false;\n this.REFLECTIONMAP_3D = false;\n this.REFLECTIONMAP_SPHERICAL = false;\n this.REFLECTIONMAP_PLANAR = false;\n this.REFLECTIONMAP_CUBIC = false;\n this.USE_LOCAL_REFLECTIONMAP_CUBIC = false;\n this.USE_LOCAL_REFRACTIONMAP_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.REFLECTIONMAP_OPPOSITEZ = false;\n this.INVERTCUBICMAP = false;\n this.LOGARITHMICDEPTH = false;\n this.REFRACTION = false;\n this.REFRACTIONMAP_3D = false;\n this.REFLECTIONOVERALPHA = false;\n this.TWOSIDEDLIGHTING = false;\n this.SHADOWFLOAT = false;\n this.MORPHTARGETS = false;\n this.MORPHTARGETS_NORMAL = false;\n this.MORPHTARGETS_TANGENT = false;\n this.MORPHTARGETS_UV = false;\n this.NUM_MORPH_INFLUENCERS = 0;\n this.MORPHTARGETS_TEXTURE = false;\n this.NONUNIFORMSCALING = false; // https://playground.babylonjs.com#V6DWIH\n this.PREMULTIPLYALPHA = false; // https://playground.babylonjs.com#LNVJJ7\n this.ALPHATEST_AFTERALLALPHACOMPUTATIONS = false;\n this.ALPHABLEND = true;\n this.PREPASS = false;\n this.PREPASS_COLOR = false;\n this.PREPASS_COLOR_INDEX = -1;\n this.PREPASS_IRRADIANCE = false;\n this.PREPASS_IRRADIANCE_INDEX = -1;\n this.PREPASS_ALBEDO = false;\n this.PREPASS_ALBEDO_INDEX = -1;\n this.PREPASS_ALBEDO_SQRT = false;\n this.PREPASS_ALBEDO_SQRT_INDEX = -1;\n this.PREPASS_DEPTH = false;\n this.PREPASS_DEPTH_INDEX = -1;\n this.PREPASS_SCREENSPACE_DEPTH = false;\n this.PREPASS_SCREENSPACE_DEPTH_INDEX = -1;\n this.PREPASS_NORMAL = false;\n this.PREPASS_NORMAL_INDEX = -1;\n this.PREPASS_NORMAL_WORLDSPACE = false;\n this.PREPASS_WORLD_NORMAL = false;\n this.PREPASS_WORLD_NORMAL_INDEX = -1;\n this.PREPASS_POSITION = false;\n this.PREPASS_POSITION_INDEX = -1;\n this.PREPASS_LOCAL_POSITION = false;\n this.PREPASS_LOCAL_POSITION_INDEX = -1;\n this.PREPASS_VELOCITY = false;\n this.PREPASS_VELOCITY_INDEX = -1;\n this.PREPASS_VELOCITY_LINEAR = false;\n this.PREPASS_VELOCITY_LINEAR_INDEX = -1;\n this.PREPASS_REFLECTIVITY = false;\n this.PREPASS_REFLECTIVITY_INDEX = -1;\n this.SCENE_MRT_COUNT = 0;\n this.RGBDLIGHTMAP = false;\n this.RGBDREFLECTION = false;\n this.RGBDREFRACTION = 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.MULTIVIEW = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY = false;\n this.ORDER_INDEPENDENT_TRANSPARENCY_16BITS = false;\n this.CAMERA_ORTHOGRAPHIC = false;\n this.CAMERA_PERSPECTIVE = false;\n /**\n * If the reflection texture on this material is in linear color space\n * @internal\n */\n this.IS_REFLECTION_LINEAR = false;\n /**\n * If the refraction texture on this material is in linear color space\n * @internal\n */\n this.IS_REFRACTION_LINEAR = false;\n this.EXPOSURE = false;\n this.DECAL_AFTER_DETAIL = false;\n this.rebuild();\n }\n setReflectionMode(modeToEnable) {\n const modes = [\n \"REFLECTIONMAP_CUBIC\",\n \"REFLECTIONMAP_EXPLICIT\",\n \"REFLECTIONMAP_PLANAR\",\n \"REFLECTIONMAP_PROJECTION\",\n \"REFLECTIONMAP_PROJECTION\",\n \"REFLECTIONMAP_SKYBOX\",\n \"REFLECTIONMAP_SPHERICAL\",\n \"REFLECTIONMAP_EQUIRECTANGULAR\",\n \"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\",\n \"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\",\n ];\n for (const mode of modes) {\n this[mode] = mode === modeToEnable;\n }\n }\n}\n/**\n * This is the default material used in Babylon. It is the best trade off between quality\n * and performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\n */\nexport class StandardMaterial extends PushMaterial {\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 * Attaches a new image processing configuration to the Standard Material.\n * @param configuration\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._markAllSubMeshesAsImageProcessingDirty();\n });\n }\n }\n /**\n * Can this material render to prepass\n */\n get isPrePassCapable() {\n return !this.disableDepthWrite;\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 adjustmnent 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 * Can this material render to several textures at once\n */\n get canRenderToMRT() {\n return true;\n }\n /**\n * Instantiates a new standard material.\n * This is the default material used in Babylon. It is the best trade off between quality\n * and performances.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction\n * @param name Define the name of the material in the scene\n * @param scene Define the scene the material belong 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 || StandardMaterial.ForceGLSL);\n this._diffuseTexture = null;\n this._ambientTexture = null;\n this._opacityTexture = null;\n this._reflectionTexture = null;\n this._emissiveTexture = null;\n this._specularTexture = null;\n this._bumpTexture = null;\n this._lightmapTexture = null;\n this._refractionTexture = null;\n /**\n * The color of the material lit by the environmental background lighting.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#ambient-color-example\n */\n this.ambientColor = new Color3(0, 0, 0);\n /**\n * The basic color of the material as viewed under a light.\n */\n this.diffuseColor = new Color3(1, 1, 1);\n /**\n * Define how the color and intensity of the highlight given by the light in the material.\n */\n this.specularColor = new Color3(1, 1, 1);\n /**\n * Define the color of the material as if self lit.\n * This will be mixed in the final result even in the absence of light.\n */\n this.emissiveColor = new Color3(0, 0, 0);\n /**\n * Defines how sharp are the highlights in the material.\n * The bigger the value the sharper giving a more glossy feeling to the result.\n * Reversely, the smaller the value the blurrier giving a more rough feeling to the result.\n */\n this.specularPower = 64;\n this._useAlphaFromDiffuseTexture = false;\n this._useEmissiveAsIllumination = false;\n this._linkEmissiveWithDiffuse = false;\n this._useSpecularOverAlpha = false;\n this._useReflectionOverAlpha = false;\n this._disableLighting = false;\n this._useObjectSpaceNormalMap = false;\n this._useParallax = false;\n this._useParallaxOcclusion = false;\n /**\n * Apply a scaling factor that determine which \"depth\" the height map should reprensent. A value between 0.05 and 0.1 is reasonnable in Parallax, you can reach 0.2 using Parallax Occlusion.\n */\n this.parallaxScaleBias = 0.05;\n this._roughness = 0;\n /**\n * In case of refraction, define the value of the index of refraction.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions\n */\n this.indexOfRefraction = 0.98;\n /**\n * Invert the refraction texture alongside the y axis.\n * It can be useful with procedural textures or probe for instance.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions\n */\n this.invertRefractionY = true;\n /**\n * Defines the alpha limits in alpha test mode.\n */\n this.alphaCutOff = 0.4;\n this._useLightmapAsShadowmap = false;\n this._useReflectionFresnelFromSpecular = false;\n this._useGlossinessFromSpecularMapAlpha = false;\n this._maxSimultaneousLights = 4;\n this._invertNormalMapX = false;\n this._invertNormalMapY = false;\n this._twoSidedLighting = false;\n this._applyDecalMapAfterDetailMap = false;\n this._shadersLoaded = false;\n this._renderTargets = new SmartArray(16);\n this._worldViewProjectionMatrix = Matrix.Zero();\n this._globalAmbientColor = new Color3(0, 0, 0);\n this._cacheHasRenderTargetTextures = false;\n this.detailMap = new DetailMapConfiguration(this);\n // Setup the default processing configuration to the scene.\n this._attachImageProcessingConfiguration(null);\n this.prePassConfiguration = new PrePassConfiguration();\n this.getRenderTargetTextures = () => {\n this._renderTargets.reset();\n if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n this._renderTargets.push(this._reflectionTexture);\n }\n if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n this._renderTargets.push(this._refractionTexture);\n }\n this._eventInfo.renderTargets = this._renderTargets;\n this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);\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 (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {\n return true;\n }\n if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {\n return true;\n }\n return this._cacheHasRenderTargetTextures;\n }\n /**\n * Gets the current class name of the material e.g. \"StandardMaterial\"\n * Mainly use in serialization.\n * @returns the class name\n */\n getClassName() {\n return \"StandardMaterial\";\n }\n /**\n * Specifies if the material will require alpha blending\n * @returns a boolean specifying if alpha blending is needed\n */\n needAlphaBlending() {\n if (this._disableAlphaBlending) {\n return false;\n }\n return (this.alpha < 1.0 ||\n this._opacityTexture != null ||\n this._shouldUseAlphaFromDiffuseTexture() ||\n (this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled));\n }\n /**\n * Specifies if this material should be rendered in alpha test mode\n * @returns a boolean specifying if an alpha test is needed.\n */\n needAlphaTesting() {\n if (this._forceAlphaTest) {\n return true;\n }\n return this._hasAlphaChannel() && (this._transparencyMode == null || this._transparencyMode === Material.MATERIAL_ALPHATEST);\n }\n /**\n * @returns whether or not the alpha value of the diffuse texture should be used for alpha blending.\n */\n _shouldUseAlphaFromDiffuseTexture() {\n return this._diffuseTexture != null && this._diffuseTexture.hasAlpha && this._useAlphaFromDiffuseTexture && this._transparencyMode !== Material.MATERIAL_OPAQUE;\n }\n /**\n * @returns whether or not there is a usable alpha channel for transparency.\n */\n _hasAlphaChannel() {\n return (this._diffuseTexture != null && this._diffuseTexture.hasAlpha) || this._opacityTexture != null;\n }\n /**\n * Get the texture used for alpha test purpose.\n * @returns the diffuse texture in case of the standard material.\n */\n getAlphaTestTexture() {\n return this._diffuseTexture;\n }\n /**\n * Get if the submesh is ready to be used and all its information available.\n * Child classes can use it to update shaders\n * @param mesh defines the mesh to check\n * @param subMesh defines which submesh to check\n * @param useInstances specifies that instances should be used\n * @returns a boolean indicating that the submesh is ready or not\n */\n isReadyForSubMesh(mesh, subMesh, useInstances = false) {\n if (!this._uniformBufferLayoutBuilt) {\n this.buildUniformLayout();\n }\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 this._callbackPluginEventGeneric(4 /* MaterialPluginEvent.GetDefineNames */, this._eventInfo);\n subMesh.materialDefines = new StandardMaterialDefines(this._eventInfo.defineNames);\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 defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting);\n // Multiview\n PrepareDefinesForMultiview(scene, defines);\n // PrePass\n const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency;\n PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit);\n // Order independant transparency\n PrepareDefinesForOIT(scene, defines, oit);\n MaterialHelperGeometryRendering.PrepareDefines(engine.currentRenderPassId, mesh, defines);\n // Textures\n if (defines._areTexturesDirty) {\n this._eventInfo.hasRenderTargetTextures = false;\n this._callbackPluginEventHasRenderTargetTextures(this._eventInfo);\n this._cacheHasRenderTargetTextures = this._eventInfo.hasRenderTargetTextures;\n defines._needUVs = false;\n for (let i = 1; i <= 6; ++i) {\n defines[\"MAINUV\" + i] = false;\n }\n if (scene.texturesEnabled) {\n defines.DIFFUSEDIRECTUV = 0;\n defines.BUMPDIRECTUV = 0;\n defines.AMBIENTDIRECTUV = 0;\n defines.OPACITYDIRECTUV = 0;\n defines.EMISSIVEDIRECTUV = 0;\n defines.SPECULARDIRECTUV = 0;\n defines.LIGHTMAPDIRECTUV = 0;\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n if (!this._diffuseTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n PrepareDefinesForMergedUV(this._diffuseTexture, defines, \"DIFFUSE\");\n }\n }\n else {\n defines.DIFFUSE = false;\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n if (!this._ambientTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n PrepareDefinesForMergedUV(this._ambientTexture, defines, \"AMBIENT\");\n }\n }\n else {\n defines.AMBIENT = false;\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n if (!this._opacityTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n PrepareDefinesForMergedUV(this._opacityTexture, defines, \"OPACITY\");\n defines.OPACITYRGB = this._opacityTexture.getAlphaFromRGB;\n }\n }\n else {\n defines.OPACITY = false;\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n if (!this._reflectionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n defines._needNormals = true;\n defines.REFLECTION = true;\n defines.ROUGHNESS = this._roughness > 0;\n defines.REFLECTIONOVERALPHA = this._useReflectionOverAlpha;\n defines.INVERTCUBICMAP = this._reflectionTexture.coordinatesMode === Texture.INVCUBIC_MODE;\n defines.REFLECTIONMAP_3D = this._reflectionTexture.isCube;\n defines.REFLECTIONMAP_OPPOSITEZ =\n defines.REFLECTIONMAP_3D && this.getScene().useRightHandedSystem ? !this._reflectionTexture.invertZ : this._reflectionTexture.invertZ;\n defines.RGBDREFLECTION = this._reflectionTexture.isRGBD;\n switch (this._reflectionTexture.coordinatesMode) {\n case Texture.EXPLICIT_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EXPLICIT\");\n break;\n case Texture.PLANAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_PLANAR\");\n break;\n case Texture.PROJECTION_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_PROJECTION\");\n break;\n case Texture.SKYBOX_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_SKYBOX\");\n break;\n case Texture.SPHERICAL_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_SPHERICAL\");\n break;\n case Texture.EQUIRECTANGULAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR\");\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\");\n break;\n case Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:\n defines.setReflectionMode(\"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\");\n break;\n case Texture.CUBIC_MODE:\n case Texture.INVCUBIC_MODE:\n default:\n defines.setReflectionMode(\"REFLECTIONMAP_CUBIC\");\n break;\n }\n defines.USE_LOCAL_REFLECTIONMAP_CUBIC = this._reflectionTexture.boundingBoxSize ? true : false;\n }\n }\n else {\n defines.REFLECTION = false;\n defines.REFLECTIONMAP_OPPOSITEZ = false;\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n if (!this._emissiveTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n PrepareDefinesForMergedUV(this._emissiveTexture, defines, \"EMISSIVE\");\n }\n }\n else {\n defines.EMISSIVE = false;\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n if (!this._lightmapTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n PrepareDefinesForMergedUV(this._lightmapTexture, defines, \"LIGHTMAP\");\n defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;\n defines.RGBDLIGHTMAP = this._lightmapTexture.isRGBD;\n }\n }\n else {\n defines.LIGHTMAP = false;\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n if (!this._specularTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n PrepareDefinesForMergedUV(this._specularTexture, defines, \"SPECULAR\");\n defines.GLOSSINESS = this._useGlossinessFromSpecularMapAlpha;\n }\n }\n else {\n defines.SPECULAR = false;\n }\n if (scene.getEngine().getCaps().standardDerivatives && this._bumpTexture && StandardMaterial.BumpTextureEnabled) {\n // Bump texture can not be not blocking.\n if (!this._bumpTexture.isReady()) {\n return false;\n }\n else {\n PrepareDefinesForMergedUV(this._bumpTexture, defines, \"BUMP\");\n defines.PARALLAX = this._useParallax;\n defines.PARALLAX_RHS = scene.useRightHandedSystem;\n defines.PARALLAXOCCLUSION = this._useParallaxOcclusion;\n }\n defines.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap;\n }\n else {\n defines.BUMP = false;\n defines.PARALLAX = false;\n defines.PARALLAX_RHS = false;\n defines.PARALLAXOCCLUSION = false;\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n if (!this._refractionTexture.isReadyOrNotBlocking()) {\n return false;\n }\n else {\n defines._needUVs = true;\n defines.REFRACTION = true;\n defines.REFRACTIONMAP_3D = this._refractionTexture.isCube;\n defines.RGBDREFRACTION = this._refractionTexture.isRGBD;\n defines.USE_LOCAL_REFRACTIONMAP_CUBIC = this._refractionTexture.boundingBoxSize ? true : false;\n }\n }\n else {\n defines.REFRACTION = false;\n }\n defines.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting;\n }\n else {\n defines.DIFFUSE = false;\n defines.AMBIENT = false;\n defines.OPACITY = false;\n defines.REFLECTION = false;\n defines.EMISSIVE = false;\n defines.LIGHTMAP = false;\n defines.BUMP = false;\n defines.REFRACTION = false;\n }\n defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();\n defines.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination;\n defines.LINKEMISSIVEWITHDIFFUSE = this._linkEmissiveWithDiffuse;\n defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;\n defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;\n defines.ALPHATEST_AFTERALLALPHACOMPUTATIONS = this.transparencyMode !== null;\n defines.ALPHABLEND = this.transparencyMode === null || this.needAlphaBlendingForMesh(mesh); // check on null for backward compatibility\n }\n this._eventInfo.isReadyForSubMesh = true;\n this._eventInfo.defines = defines;\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);\n if (!this._eventInfo.isReadyForSubMesh) {\n return false;\n }\n if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {\n if (!this._imageProcessingConfiguration.isReady()) {\n return false;\n }\n this._imageProcessingConfiguration.prepareDefines(defines);\n defines.IS_REFLECTION_LINEAR = this.reflectionTexture != null && !this.reflectionTexture.gammaSpace;\n defines.IS_REFRACTION_LINEAR = this.refractionTexture != null && !this.refractionTexture.gammaSpace;\n }\n if (defines._areFresnelDirty) {\n if (StandardMaterial.FresnelEnabled) {\n // Fresnel\n if (this._diffuseFresnelParameters ||\n this._opacityFresnelParameters ||\n this._emissiveFresnelParameters ||\n this._refractionFresnelParameters ||\n this._reflectionFresnelParameters) {\n defines.DIFFUSEFRESNEL = this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled;\n defines.OPACITYFRESNEL = this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;\n defines.REFLECTIONFRESNEL = this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled;\n defines.REFLECTIONFRESNELFROMSPECULAR = this._useReflectionFresnelFromSpecular;\n defines.REFRACTIONFRESNEL = this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled;\n defines.EMISSIVEFRESNEL = this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled;\n defines._needNormals = true;\n defines.FRESNEL = true;\n }\n }\n else {\n defines.FRESNEL = false;\n }\n }\n // Misc.\n PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh) || this._forceAlphaTest, defines, this._applyDecalMapAfterDetailMap);\n // Values that need to be evaluated on every frame\n PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);\n // External config\n this._eventInfo.defines = defines;\n this._eventInfo.mesh = mesh;\n this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo);\n // Attribs\n PrepareDefinesForAttributes(mesh, defines, true, true, true);\n // External config\n this._callbackPluginEventPrepareDefines(this._eventInfo);\n // Get correct effect\n let forceWasNotReadyPreviously = false;\n if (defines.isDirty) {\n const lightDisposed = defines._areLightsDisposed;\n defines.markAsProcessed();\n // Fallbacks\n const fallbacks = new EffectFallbacks();\n if (defines.REFLECTION) {\n fallbacks.addFallback(0, \"REFLECTION\");\n }\n if (defines.SPECULAR) {\n fallbacks.addFallback(0, \"SPECULAR\");\n }\n if (defines.BUMP) {\n fallbacks.addFallback(0, \"BUMP\");\n }\n if (defines.PARALLAX) {\n fallbacks.addFallback(1, \"PARALLAX\");\n }\n if (defines.PARALLAX_RHS) {\n fallbacks.addFallback(1, \"PARALLAX_RHS\");\n }\n if (defines.PARALLAXOCCLUSION) {\n fallbacks.addFallback(0, \"PARALLAXOCCLUSION\");\n }\n if (defines.SPECULAROVERALPHA) {\n fallbacks.addFallback(0, \"SPECULAROVERALPHA\");\n }\n if (defines.FOG) {\n fallbacks.addFallback(1, \"FOG\");\n }\n if (defines.POINTSIZE) {\n fallbacks.addFallback(0, \"POINTSIZE\");\n }\n if (defines.LOGARITHMICDEPTH) {\n fallbacks.addFallback(0, \"LOGARITHMICDEPTH\");\n }\n HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);\n if (defines.SPECULARTERM) {\n fallbacks.addFallback(0, \"SPECULARTERM\");\n }\n if (defines.DIFFUSEFRESNEL) {\n fallbacks.addFallback(1, \"DIFFUSEFRESNEL\");\n }\n if (defines.OPACITYFRESNEL) {\n fallbacks.addFallback(2, \"OPACITYFRESNEL\");\n }\n if (defines.REFLECTIONFRESNEL) {\n fallbacks.addFallback(3, \"REFLECTIONFRESNEL\");\n }\n if (defines.EMISSIVEFRESNEL) {\n fallbacks.addFallback(4, \"EMISSIVEFRESNEL\");\n }\n if (defines.FRESNEL) {\n fallbacks.addFallback(4, \"FRESNEL\");\n }\n if (defines.MULTIVIEW) {\n fallbacks.addFallback(0, \"MULTIVIEW\");\n }\n //Attributes\n const attribs = [VertexBuffer.PositionKind];\n if (defines.NORMAL) {\n attribs.push(VertexBuffer.NormalKind);\n }\n if (defines.TANGENT) {\n attribs.push(VertexBuffer.TangentKind);\n }\n for (let i = 1; i <= 6; ++i) {\n if (defines[\"UV\" + i]) {\n attribs.push(`uv${i === 1 ? \"\" : i}`);\n }\n }\n if (defines.VERTEXCOLOR) {\n attribs.push(VertexBuffer.ColorKind);\n }\n PrepareAttributesForBones(attribs, mesh, defines, fallbacks);\n PrepareAttributesForInstances(attribs, defines);\n PrepareAttributesForMorphTargets(attribs, mesh, defines);\n PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);\n let shaderName = \"default\";\n const uniforms = [\n \"world\",\n \"view\",\n \"viewProjection\",\n \"vEyePosition\",\n \"vLightsType\",\n \"vAmbientColor\",\n \"vDiffuseColor\",\n \"vSpecularColor\",\n \"vEmissiveColor\",\n \"visibility\",\n \"vFogInfos\",\n \"vFogColor\",\n \"pointSize\",\n \"vDiffuseInfos\",\n \"vAmbientInfos\",\n \"vOpacityInfos\",\n \"vReflectionInfos\",\n \"vEmissiveInfos\",\n \"vSpecularInfos\",\n \"vBumpInfos\",\n \"vLightmapInfos\",\n \"vRefractionInfos\",\n \"mBones\",\n \"diffuseMatrix\",\n \"ambientMatrix\",\n \"opacityMatrix\",\n \"reflectionMatrix\",\n \"emissiveMatrix\",\n \"specularMatrix\",\n \"bumpMatrix\",\n \"normalMatrix\",\n \"lightmapMatrix\",\n \"refractionMatrix\",\n \"diffuseLeftColor\",\n \"diffuseRightColor\",\n \"opacityParts\",\n \"reflectionLeftColor\",\n \"reflectionRightColor\",\n \"emissiveLeftColor\",\n \"emissiveRightColor\",\n \"refractionLeftColor\",\n \"refractionRightColor\",\n \"vReflectionPosition\",\n \"vReflectionSize\",\n \"vRefractionPosition\",\n \"vRefractionSize\",\n \"logarithmicDepthConstant\",\n \"vTangentSpaceParams\",\n \"alphaCutOff\",\n \"boneTextureWidth\",\n \"morphTargetTextureInfo\",\n \"morphTargetTextureIndices\",\n ];\n const samplers = [\n \"diffuseSampler\",\n \"ambientSampler\",\n \"opacitySampler\",\n \"reflectionCubeSampler\",\n \"reflection2DSampler\",\n \"emissiveSampler\",\n \"specularSampler\",\n \"bumpSampler\",\n \"lightmapSampler\",\n \"refractionCubeSampler\",\n \"refraction2DSampler\",\n \"boneSampler\",\n \"morphTargets\",\n \"oitDepthSampler\",\n \"oitFrontColorSampler\",\n ];\n const uniformBuffers = [\"Material\", \"Scene\", \"Mesh\"];\n const indexParameters = { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: defines.NUM_MORPH_INFLUENCERS };\n this._eventInfo.fallbacks = fallbacks;\n this._eventInfo.fallbackRank = 0;\n this._eventInfo.defines = defines;\n this._eventInfo.uniforms = uniforms;\n this._eventInfo.attributes = attribs;\n this._eventInfo.samplers = samplers;\n this._eventInfo.uniformBuffersNames = uniformBuffers;\n this._eventInfo.customCode = undefined;\n this._eventInfo.mesh = mesh;\n this._eventInfo.indexParameters = indexParameters;\n this._callbackPluginEventGeneric(128 /* MaterialPluginEvent.PrepareEffect */, this._eventInfo);\n MaterialHelperGeometryRendering.AddUniformsAndSamplers(uniforms, samplers);\n PrePassConfiguration.AddUniforms(uniforms);\n PrePassConfiguration.AddSamplers(samplers);\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 addClipPlaneUniforms(uniforms);\n const csnrOptions = {};\n if (this.customShaderNameResolve) {\n shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);\n }\n const join = defines.toString();\n const previousEffect = subMesh.effect;\n let effect = scene.getEngine().createEffect(shaderName, {\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 processFinalCode: csnrOptions.processFinalCode,\n processCodeAfterIncludes: this._eventInfo.customCode,\n multiTarget: defines.PREPASS,\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/default.vertex.js\"), import(\"../ShadersWGSL/default.fragment.js\")]);\n }\n else {\n await Promise.all([import(\"../Shaders/default.vertex.js\"), import(\"../Shaders/default.fragment.js\")]);\n }\n this._shadersLoaded = true;\n },\n }, engine);\n this._eventInfo.customCode = undefined;\n if (effect) {\n if (this._onEffectCreatedObservable) {\n onCreatedEffectParameters.effect = effect;\n onCreatedEffectParameters.subMesh = subMesh;\n this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);\n }\n // Use previous effect while new one is compiling\n if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {\n effect = previousEffect;\n defines.markAsUnprocessed();\n forceWasNotReadyPreviously = this.isFrozen;\n if (lightDisposed) {\n // re register in case it takes more than one frame.\n defines._areLightsDisposed = true;\n return false;\n }\n }\n else {\n scene.resetCachedMaterial();\n subMesh.setEffect(effect, defines, this._materialContext);\n }\n }\n }\n if (!subMesh.effect || !subMesh.effect.isReady()) {\n return false;\n }\n defines._renderId = scene.getRenderId();\n drawWrapper._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;\n drawWrapper._wasPreviouslyUsingInstances = useInstances;\n this._checkScenePerformancePriority();\n return true;\n }\n /**\n * Builds the material UBO layouts.\n * Used internally during the effect preparation.\n */\n buildUniformLayout() {\n // Order is important !\n const ubo = this._uniformBuffer;\n ubo.addUniform(\"diffuseLeftColor\", 4);\n ubo.addUniform(\"diffuseRightColor\", 4);\n ubo.addUniform(\"opacityParts\", 4);\n ubo.addUniform(\"reflectionLeftColor\", 4);\n ubo.addUniform(\"reflectionRightColor\", 4);\n ubo.addUniform(\"refractionLeftColor\", 4);\n ubo.addUniform(\"refractionRightColor\", 4);\n ubo.addUniform(\"emissiveLeftColor\", 4);\n ubo.addUniform(\"emissiveRightColor\", 4);\n ubo.addUniform(\"vDiffuseInfos\", 2);\n ubo.addUniform(\"vAmbientInfos\", 2);\n ubo.addUniform(\"vOpacityInfos\", 2);\n ubo.addUniform(\"vReflectionInfos\", 2);\n ubo.addUniform(\"vReflectionPosition\", 3);\n ubo.addUniform(\"vReflectionSize\", 3);\n ubo.addUniform(\"vEmissiveInfos\", 2);\n ubo.addUniform(\"vLightmapInfos\", 2);\n ubo.addUniform(\"vSpecularInfos\", 2);\n ubo.addUniform(\"vBumpInfos\", 3);\n ubo.addUniform(\"diffuseMatrix\", 16);\n ubo.addUniform(\"ambientMatrix\", 16);\n ubo.addUniform(\"opacityMatrix\", 16);\n ubo.addUniform(\"reflectionMatrix\", 16);\n ubo.addUniform(\"emissiveMatrix\", 16);\n ubo.addUniform(\"lightmapMatrix\", 16);\n ubo.addUniform(\"specularMatrix\", 16);\n ubo.addUniform(\"bumpMatrix\", 16);\n ubo.addUniform(\"vTangentSpaceParams\", 2);\n ubo.addUniform(\"pointSize\", 1);\n ubo.addUniform(\"alphaCutOff\", 1);\n ubo.addUniform(\"refractionMatrix\", 16);\n ubo.addUniform(\"vRefractionInfos\", 4);\n ubo.addUniform(\"vRefractionPosition\", 3);\n ubo.addUniform(\"vRefractionSize\", 3);\n ubo.addUniform(\"vSpecularColor\", 4);\n ubo.addUniform(\"vEmissiveColor\", 3);\n ubo.addUniform(\"vDiffuseColor\", 4);\n ubo.addUniform(\"vAmbientColor\", 3);\n super.buildUniformLayout();\n }\n /**\n * Binds the submesh to this material by preparing the effect and shader to draw\n * @param world defines the world transformation matrix\n * @param mesh defines the mesh containing the submesh\n * @param subMesh defines the submesh to bind the material to\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 Mesh.\n mesh.getMeshUniformBuffer().bindToEffect(effect, \"Mesh\");\n mesh.transferToEffect(world);\n // Binding unconditionally\n this._uniformBuffer.bindToEffect(effect, \"Material\");\n this.prePassConfiguration.bindForSubMesh(this._activeEffect, scene, mesh, world, this.isFrozen);\n MaterialHelperGeometryRendering.Bind(scene.getEngine().currentRenderPassId, this._activeEffect, mesh, world);\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventHardBindForSubMesh(this._eventInfo);\n // Normal Matrix\n if (defines.OBJECTSPACE_NORMALMAP) {\n world.toNormalMatrix(this._normalMatrix);\n this.bindOnlyNormalMatrix(this._normalMatrix);\n }\n const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);\n // Bones\n BindBonesParameters(mesh, effect);\n const ubo = this._uniformBuffer;\n if (mustRebind) {\n this.bindViewProjection(effect);\n if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {\n if (StandardMaterial.FresnelEnabled && defines.FRESNEL) {\n // Fresnel\n if (this.diffuseFresnelParameters && this.diffuseFresnelParameters.isEnabled) {\n ubo.updateColor4(\"diffuseLeftColor\", this.diffuseFresnelParameters.leftColor, this.diffuseFresnelParameters.power);\n ubo.updateColor4(\"diffuseRightColor\", this.diffuseFresnelParameters.rightColor, this.diffuseFresnelParameters.bias);\n }\n if (this.opacityFresnelParameters && this.opacityFresnelParameters.isEnabled) {\n ubo.updateColor4(\"opacityParts\", new Color3(this.opacityFresnelParameters.leftColor.toLuminance(), this.opacityFresnelParameters.rightColor.toLuminance(), this.opacityFresnelParameters.bias), this.opacityFresnelParameters.power);\n }\n if (this.reflectionFresnelParameters && this.reflectionFresnelParameters.isEnabled) {\n ubo.updateColor4(\"reflectionLeftColor\", this.reflectionFresnelParameters.leftColor, this.reflectionFresnelParameters.power);\n ubo.updateColor4(\"reflectionRightColor\", this.reflectionFresnelParameters.rightColor, this.reflectionFresnelParameters.bias);\n }\n if (this.refractionFresnelParameters && this.refractionFresnelParameters.isEnabled) {\n ubo.updateColor4(\"refractionLeftColor\", this.refractionFresnelParameters.leftColor, this.refractionFresnelParameters.power);\n ubo.updateColor4(\"refractionRightColor\", this.refractionFresnelParameters.rightColor, this.refractionFresnelParameters.bias);\n }\n if (this.emissiveFresnelParameters && this.emissiveFresnelParameters.isEnabled) {\n ubo.updateColor4(\"emissiveLeftColor\", this.emissiveFresnelParameters.leftColor, this.emissiveFresnelParameters.power);\n ubo.updateColor4(\"emissiveRightColor\", this.emissiveFresnelParameters.rightColor, this.emissiveFresnelParameters.bias);\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n ubo.updateFloat2(\"vDiffuseInfos\", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);\n BindTextureMatrix(this._diffuseTexture, ubo, \"diffuse\");\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n ubo.updateFloat2(\"vAmbientInfos\", this._ambientTexture.coordinatesIndex, this._ambientTexture.level);\n BindTextureMatrix(this._ambientTexture, ubo, \"ambient\");\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n ubo.updateFloat2(\"vOpacityInfos\", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);\n BindTextureMatrix(this._opacityTexture, ubo, \"opacity\");\n }\n if (this._hasAlphaChannel()) {\n ubo.updateFloat(\"alphaCutOff\", this.alphaCutOff);\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n ubo.updateFloat2(\"vReflectionInfos\", this._reflectionTexture.level, this.roughness);\n ubo.updateMatrix(\"reflectionMatrix\", this._reflectionTexture.getReflectionTextureMatrix());\n if (this._reflectionTexture.boundingBoxSize) {\n const cubeTexture = this._reflectionTexture;\n ubo.updateVector3(\"vReflectionPosition\", cubeTexture.boundingBoxPosition);\n ubo.updateVector3(\"vReflectionSize\", cubeTexture.boundingBoxSize);\n }\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n ubo.updateFloat2(\"vEmissiveInfos\", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level);\n BindTextureMatrix(this._emissiveTexture, ubo, \"emissive\");\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n ubo.updateFloat2(\"vLightmapInfos\", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level);\n BindTextureMatrix(this._lightmapTexture, ubo, \"lightmap\");\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n ubo.updateFloat2(\"vSpecularInfos\", this._specularTexture.coordinatesIndex, this._specularTexture.level);\n BindTextureMatrix(this._specularTexture, ubo, \"specular\");\n }\n if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {\n ubo.updateFloat3(\"vBumpInfos\", this._bumpTexture.coordinatesIndex, 1.0 / this._bumpTexture.level, this.parallaxScaleBias);\n BindTextureMatrix(this._bumpTexture, ubo, \"bump\");\n if (scene._mirroredCameraPosition) {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);\n }\n else {\n ubo.updateFloat2(\"vTangentSpaceParams\", this._invertNormalMapX ? -1.0 : 1.0, this._invertNormalMapY ? -1.0 : 1.0);\n }\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n let depth = 1.0;\n if (!this._refractionTexture.isCube) {\n ubo.updateMatrix(\"refractionMatrix\", this._refractionTexture.getReflectionTextureMatrix());\n if (this._refractionTexture.depth) {\n depth = this._refractionTexture.depth;\n }\n }\n ubo.updateFloat4(\"vRefractionInfos\", this._refractionTexture.level, this.indexOfRefraction, depth, this.invertRefractionY ? -1 : 1);\n if (this._refractionTexture.boundingBoxSize) {\n const cubeTexture = this._refractionTexture;\n ubo.updateVector3(\"vRefractionPosition\", cubeTexture.boundingBoxPosition);\n ubo.updateVector3(\"vRefractionSize\", cubeTexture.boundingBoxSize);\n }\n }\n }\n // Point size\n if (this.pointsCloud) {\n ubo.updateFloat(\"pointSize\", this.pointSize);\n }\n ubo.updateColor4(\"vSpecularColor\", this.specularColor, this.specularPower);\n ubo.updateColor3(\"vEmissiveColor\", StandardMaterial.EmissiveTextureEnabled ? this.emissiveColor : Color3.BlackReadOnly);\n ubo.updateColor4(\"vDiffuseColor\", this.diffuseColor, this.alpha);\n scene.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor);\n ubo.updateColor3(\"vAmbientColor\", this._globalAmbientColor);\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {\n effect.setTexture(\"diffuseSampler\", this._diffuseTexture);\n }\n if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {\n effect.setTexture(\"ambientSampler\", this._ambientTexture);\n }\n if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {\n effect.setTexture(\"opacitySampler\", this._opacityTexture);\n }\n if (this._reflectionTexture && StandardMaterial.ReflectionTextureEnabled) {\n if (this._reflectionTexture.isCube) {\n effect.setTexture(\"reflectionCubeSampler\", this._reflectionTexture);\n }\n else {\n effect.setTexture(\"reflection2DSampler\", this._reflectionTexture);\n }\n }\n if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {\n effect.setTexture(\"emissiveSampler\", this._emissiveTexture);\n }\n if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {\n effect.setTexture(\"lightmapSampler\", this._lightmapTexture);\n }\n if (this._specularTexture && StandardMaterial.SpecularTextureEnabled) {\n effect.setTexture(\"specularSampler\", this._specularTexture);\n }\n if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && StandardMaterial.BumpTextureEnabled) {\n effect.setTexture(\"bumpSampler\", this._bumpTexture);\n }\n if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {\n if (this._refractionTexture.isCube) {\n effect.setTexture(\"refractionCubeSampler\", this._refractionTexture);\n }\n else {\n effect.setTexture(\"refraction2DSampler\", this._refractionTexture);\n }\n }\n }\n // OIT with depth peeling\n if (this.getScene().useOrderIndependentTransparency && this.needAlphaBlendingForMesh(mesh)) {\n this.getScene().depthPeelingRenderer.bind(effect);\n }\n this._eventInfo.subMesh = subMesh;\n this._callbackPluginEventBindForSubMesh(this._eventInfo);\n // Clip plane\n bindClipPlane(effect, this, scene);\n // Colors\n this.bindEyePosition(effect);\n }\n else if (scene.getEngine()._features.needToAlwaysBindUniformBuffers) {\n this._needToBindSceneUbo = true;\n }\n if (mustRebind || !this.isFrozen) {\n // Lights\n if (scene.lightsEnabled && !this._disableLighting) {\n BindLights(scene, mesh, effect, defines, this._maxSimultaneousLights);\n }\n // View\n if ((scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) ||\n this._reflectionTexture ||\n this._refractionTexture ||\n mesh.receiveShadows ||\n defines.PREPASS) {\n this.bindView(effect);\n }\n // Fog\n BindFogParameters(scene, mesh, effect);\n // Morph targets\n if (defines.NUM_MORPH_INFLUENCERS) {\n BindMorphTargetParameters(mesh, effect);\n }\n if (defines.BAKED_VERTEX_ANIMATION_TEXTURE) {\n mesh.bakedVertexAnimationManager?.bind(effect, defines.INSTANCES);\n }\n // Log. depth\n if (this.useLogarithmicDepth) {\n BindLogDepth(defines, effect, scene);\n }\n // image processing\n if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) {\n this._imageProcessingConfiguration.bind(this._activeEffect);\n }\n }\n this._afterBind(mesh, this._activeEffect, subMesh);\n ubo.update();\n }\n /**\n * Get the list of animatables in the material.\n * @returns the list of animatables object used in the material\n */\n getAnimatables() {\n const results = super.getAnimatables();\n if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) {\n results.push(this._diffuseTexture);\n }\n if (this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0) {\n results.push(this._ambientTexture);\n }\n if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) {\n results.push(this._opacityTexture);\n }\n if (this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0) {\n results.push(this._reflectionTexture);\n }\n if (this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0) {\n results.push(this._emissiveTexture);\n }\n if (this._specularTexture && this._specularTexture.animations && this._specularTexture.animations.length > 0) {\n results.push(this._specularTexture);\n }\n if (this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0) {\n results.push(this._bumpTexture);\n }\n if (this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0) {\n results.push(this._lightmapTexture);\n }\n if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {\n results.push(this._refractionTexture);\n }\n return results;\n }\n /**\n * Gets the active textures from the material\n * @returns an array of textures\n */\n getActiveTextures() {\n const activeTextures = super.getActiveTextures();\n if (this._diffuseTexture) {\n activeTextures.push(this._diffuseTexture);\n }\n if (this._ambientTexture) {\n activeTextures.push(this._ambientTexture);\n }\n if (this._opacityTexture) {\n activeTextures.push(this._opacityTexture);\n }\n if (this._reflectionTexture) {\n activeTextures.push(this._reflectionTexture);\n }\n if (this._emissiveTexture) {\n activeTextures.push(this._emissiveTexture);\n }\n if (this._specularTexture) {\n activeTextures.push(this._specularTexture);\n }\n if (this._bumpTexture) {\n activeTextures.push(this._bumpTexture);\n }\n if (this._lightmapTexture) {\n activeTextures.push(this._lightmapTexture);\n }\n if (this._refractionTexture) {\n activeTextures.push(this._refractionTexture);\n }\n return activeTextures;\n }\n /**\n * Specifies if the material uses a texture\n * @param texture defines the texture to check against the material\n * @returns a boolean specifying if the material uses the texture\n */\n hasTexture(texture) {\n if (super.hasTexture(texture)) {\n return true;\n }\n if (this._diffuseTexture === texture) {\n return true;\n }\n if (this._ambientTexture === texture) {\n return true;\n }\n if (this._opacityTexture === texture) {\n return true;\n }\n if (this._reflectionTexture === texture) {\n return true;\n }\n if (this._emissiveTexture === texture) {\n return true;\n }\n if (this._specularTexture === texture) {\n return true;\n }\n if (this._bumpTexture === texture) {\n return true;\n }\n if (this._lightmapTexture === texture) {\n return true;\n }\n if (this._refractionTexture === texture) {\n return true;\n }\n return false;\n }\n /**\n * Disposes the material\n * @param forceDisposeEffect specifies if effects should be forcefully disposed\n * @param forceDisposeTextures specifies if textures should be forcefully disposed\n */\n dispose(forceDisposeEffect, forceDisposeTextures) {\n if (forceDisposeTextures) {\n this._diffuseTexture?.dispose();\n this._ambientTexture?.dispose();\n this._opacityTexture?.dispose();\n this._reflectionTexture?.dispose();\n this._emissiveTexture?.dispose();\n this._specularTexture?.dispose();\n this._bumpTexture?.dispose();\n this._lightmapTexture?.dispose();\n this._refractionTexture?.dispose();\n }\n if (this._imageProcessingConfiguration && this._imageProcessingObserver) {\n this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);\n }\n super.dispose(forceDisposeEffect, forceDisposeTextures);\n }\n /**\n * Makes a duplicate of the material, and gives it a new name\n * @param name defines the new name for the duplicated material\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\n * @param rootUrl defines the root URL to use to load textures\n * @returns the cloned material\n */\n clone(name, cloneTexturesOnlyOnce = true, rootUrl = \"\") {\n const result = SerializationHelper.Clone(() => new StandardMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });\n result.name = name;\n result.id = name;\n this.stencil.copyTo(result.stencil);\n this._clonePlugins(result, rootUrl);\n return result;\n }\n /**\n * Creates a standard material from parsed material data\n * @param source defines the JSON representation of the material\n * @param scene defines the hosting scene\n * @param rootUrl defines the root URL to use to load textures and relative dependencies\n * @returns a new standard material\n */\n static Parse(source, scene, rootUrl) {\n const material = SerializationHelper.Parse(() => new StandardMaterial(source.name, scene), source, scene, rootUrl);\n if (source.stencil) {\n material.stencil.parse(source.stencil, scene, rootUrl);\n }\n Material._ParsePlugins(source, material, scene, rootUrl);\n return material;\n }\n // Flags used to enable or disable a type of texture for all Standard Materials\n /**\n * Are diffuse textures enabled in the application.\n */\n static get DiffuseTextureEnabled() {\n return MaterialFlags.DiffuseTextureEnabled;\n }\n static set DiffuseTextureEnabled(value) {\n MaterialFlags.DiffuseTextureEnabled = value;\n }\n /**\n * Are detail textures enabled in the application.\n */\n static get DetailTextureEnabled() {\n return MaterialFlags.DetailTextureEnabled;\n }\n static set DetailTextureEnabled(value) {\n MaterialFlags.DetailTextureEnabled = value;\n }\n /**\n * Are ambient textures enabled in the application.\n */\n static get AmbientTextureEnabled() {\n return MaterialFlags.AmbientTextureEnabled;\n }\n static set AmbientTextureEnabled(value) {\n MaterialFlags.AmbientTextureEnabled = value;\n }\n /**\n * Are opacity textures enabled in the application.\n */\n static get OpacityTextureEnabled() {\n return MaterialFlags.OpacityTextureEnabled;\n }\n static set OpacityTextureEnabled(value) {\n MaterialFlags.OpacityTextureEnabled = value;\n }\n /**\n * Are reflection textures enabled in the application.\n */\n static get ReflectionTextureEnabled() {\n return MaterialFlags.ReflectionTextureEnabled;\n }\n static set ReflectionTextureEnabled(value) {\n MaterialFlags.ReflectionTextureEnabled = value;\n }\n /**\n * Are emissive textures enabled in the application.\n */\n static get EmissiveTextureEnabled() {\n return MaterialFlags.EmissiveTextureEnabled;\n }\n static set EmissiveTextureEnabled(value) {\n MaterialFlags.EmissiveTextureEnabled = value;\n }\n /**\n * Are specular textures enabled in the application.\n */\n static get SpecularTextureEnabled() {\n return MaterialFlags.SpecularTextureEnabled;\n }\n static set SpecularTextureEnabled(value) {\n MaterialFlags.SpecularTextureEnabled = value;\n }\n /**\n * Are bump textures enabled in the application.\n */\n static get BumpTextureEnabled() {\n return MaterialFlags.BumpTextureEnabled;\n }\n static set BumpTextureEnabled(value) {\n MaterialFlags.BumpTextureEnabled = value;\n }\n /**\n * Are lightmap textures enabled in the application.\n */\n static get LightmapTextureEnabled() {\n return MaterialFlags.LightmapTextureEnabled;\n }\n static set LightmapTextureEnabled(value) {\n MaterialFlags.LightmapTextureEnabled = value;\n }\n /**\n * Are refraction textures enabled in the application.\n */\n static get RefractionTextureEnabled() {\n return MaterialFlags.RefractionTextureEnabled;\n }\n static set RefractionTextureEnabled(value) {\n MaterialFlags.RefractionTextureEnabled = value;\n }\n /**\n * Are color grading textures enabled in the application.\n */\n static get ColorGradingTextureEnabled() {\n return MaterialFlags.ColorGradingTextureEnabled;\n }\n static set ColorGradingTextureEnabled(value) {\n MaterialFlags.ColorGradingTextureEnabled = value;\n }\n /**\n * Are fresnels enabled in the application.\n */\n static get FresnelEnabled() {\n return MaterialFlags.FresnelEnabled;\n }\n static set FresnelEnabled(value) {\n MaterialFlags.FresnelEnabled = value;\n }\n}\n/**\n * Force all the standard materials to compile to glsl even on WebGPU engines.\n * False by default. This is mostly meant for backward compatibility.\n */\nStandardMaterial.ForceGLSL = false;\n__decorate([\n serializeAsTexture(\"diffuseTexture\")\n], StandardMaterial.prototype, \"_diffuseTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], StandardMaterial.prototype, \"diffuseTexture\", void 0);\n__decorate([\n serializeAsTexture(\"ambientTexture\")\n], StandardMaterial.prototype, \"_ambientTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"ambientTexture\", void 0);\n__decorate([\n serializeAsTexture(\"opacityTexture\")\n], StandardMaterial.prototype, \"_opacityTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], StandardMaterial.prototype, \"opacityTexture\", void 0);\n__decorate([\n serializeAsTexture(\"reflectionTexture\")\n], StandardMaterial.prototype, \"_reflectionTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"reflectionTexture\", void 0);\n__decorate([\n serializeAsTexture(\"emissiveTexture\")\n], StandardMaterial.prototype, \"_emissiveTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"emissiveTexture\", void 0);\n__decorate([\n serializeAsTexture(\"specularTexture\")\n], StandardMaterial.prototype, \"_specularTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"specularTexture\", void 0);\n__decorate([\n serializeAsTexture(\"bumpTexture\")\n], StandardMaterial.prototype, \"_bumpTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"bumpTexture\", void 0);\n__decorate([\n serializeAsTexture(\"lightmapTexture\")\n], StandardMaterial.prototype, \"_lightmapTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"lightmapTexture\", void 0);\n__decorate([\n serializeAsTexture(\"refractionTexture\")\n], StandardMaterial.prototype, \"_refractionTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"refractionTexture\", void 0);\n__decorate([\n serializeAsColor3(\"ambient\")\n], StandardMaterial.prototype, \"ambientColor\", void 0);\n__decorate([\n serializeAsColor3(\"diffuse\")\n], StandardMaterial.prototype, \"diffuseColor\", void 0);\n__decorate([\n serializeAsColor3(\"specular\")\n], StandardMaterial.prototype, \"specularColor\", void 0);\n__decorate([\n serializeAsColor3(\"emissive\")\n], StandardMaterial.prototype, \"emissiveColor\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"specularPower\", void 0);\n__decorate([\n serialize(\"useAlphaFromDiffuseTexture\")\n], StandardMaterial.prototype, \"_useAlphaFromDiffuseTexture\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\n], StandardMaterial.prototype, \"useAlphaFromDiffuseTexture\", void 0);\n__decorate([\n serialize(\"useEmissiveAsIllumination\")\n], StandardMaterial.prototype, \"_useEmissiveAsIllumination\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useEmissiveAsIllumination\", void 0);\n__decorate([\n serialize(\"linkEmissiveWithDiffuse\")\n], StandardMaterial.prototype, \"_linkEmissiveWithDiffuse\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"linkEmissiveWithDiffuse\", void 0);\n__decorate([\n serialize(\"useSpecularOverAlpha\")\n], StandardMaterial.prototype, \"_useSpecularOverAlpha\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useSpecularOverAlpha\", void 0);\n__decorate([\n serialize(\"useReflectionOverAlpha\")\n], StandardMaterial.prototype, \"_useReflectionOverAlpha\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useReflectionOverAlpha\", void 0);\n__decorate([\n serialize(\"disableLighting\")\n], StandardMaterial.prototype, \"_disableLighting\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], StandardMaterial.prototype, \"disableLighting\", void 0);\n__decorate([\n serialize(\"useObjectSpaceNormalMap\")\n], StandardMaterial.prototype, \"_useObjectSpaceNormalMap\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useObjectSpaceNormalMap\", void 0);\n__decorate([\n serialize(\"useParallax\")\n], StandardMaterial.prototype, \"_useParallax\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useParallax\", void 0);\n__decorate([\n serialize(\"useParallaxOcclusion\")\n], StandardMaterial.prototype, \"_useParallaxOcclusion\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useParallaxOcclusion\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"parallaxScaleBias\", void 0);\n__decorate([\n serialize(\"roughness\")\n], StandardMaterial.prototype, \"_roughness\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"roughness\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"indexOfRefraction\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"invertRefractionY\", void 0);\n__decorate([\n serialize()\n], StandardMaterial.prototype, \"alphaCutOff\", void 0);\n__decorate([\n serialize(\"useLightmapAsShadowmap\")\n], StandardMaterial.prototype, \"_useLightmapAsShadowmap\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useLightmapAsShadowmap\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"diffuseFresnelParameters\")\n], StandardMaterial.prototype, \"_diffuseFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"diffuseFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"opacityFresnelParameters\")\n], StandardMaterial.prototype, \"_opacityFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelAndMiscDirty\")\n], StandardMaterial.prototype, \"opacityFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"reflectionFresnelParameters\")\n], StandardMaterial.prototype, \"_reflectionFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"reflectionFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"refractionFresnelParameters\")\n], StandardMaterial.prototype, \"_refractionFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"refractionFresnelParameters\", void 0);\n__decorate([\n serializeAsFresnelParameters(\"emissiveFresnelParameters\")\n], StandardMaterial.prototype, \"_emissiveFresnelParameters\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"emissiveFresnelParameters\", void 0);\n__decorate([\n serialize(\"useReflectionFresnelFromSpecular\")\n], StandardMaterial.prototype, \"_useReflectionFresnelFromSpecular\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")\n], StandardMaterial.prototype, \"useReflectionFresnelFromSpecular\", void 0);\n__decorate([\n serialize(\"useGlossinessFromSpecularMapAlpha\")\n], StandardMaterial.prototype, \"_useGlossinessFromSpecularMapAlpha\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"useGlossinessFromSpecularMapAlpha\", void 0);\n__decorate([\n serialize(\"maxSimultaneousLights\")\n], StandardMaterial.prototype, \"_maxSimultaneousLights\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\n], StandardMaterial.prototype, \"maxSimultaneousLights\", void 0);\n__decorate([\n serialize(\"invertNormalMapX\")\n], StandardMaterial.prototype, \"_invertNormalMapX\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"invertNormalMapX\", void 0);\n__decorate([\n serialize(\"invertNormalMapY\")\n], StandardMaterial.prototype, \"_invertNormalMapY\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"invertNormalMapY\", void 0);\n__decorate([\n serialize(\"twoSidedLighting\")\n], StandardMaterial.prototype, \"_twoSidedLighting\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], StandardMaterial.prototype, \"twoSidedLighting\", void 0);\n__decorate([\n serialize(\"applyDecalMapAfterDetailMap\")\n], StandardMaterial.prototype, \"_applyDecalMapAfterDetailMap\", void 0);\n__decorate([\n expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\n], StandardMaterial.prototype, \"applyDecalMapAfterDetailMap\", void 0);\nRegisterClass(\"BABYLON.StandardMaterial\", StandardMaterial);\nScene.DefaultMaterialFactory = (scene) => {\n return new StandardMaterial(\"default material\", scene);\n};\n"],"mappings":";AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C;AACA,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,4BAA4B,EAAEC,kBAAkB,QAAQ,uBAAuB;AACxI,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,4BAA4B,QAAQ,mCAAmC;AAChF,SAASC,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,eAAe,QAAQ,iCAAiC;AACjE,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,OAAO,QAAQ,kCAAkC;AAC1D,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,aAAa,QAAQ,oBAAoB;AAElD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,sBAAsB,QAAQ,sCAAsC;AAC7E,SAASC,oBAAoB,EAAEC,aAAa,QAAQ,8BAA8B;AAClF,SAASC,mBAAmB,EAAEC,iBAAiB,EAAEC,UAAU,EAAEC,YAAY,EAAEC,yBAAyB,EAAEC,iBAAiB,EAAEC,yBAAyB,EAAEC,wCAAwC,EAAEC,yBAAyB,EAAEC,6BAA6B,EAAEC,gCAAgC,EAAEC,2BAA2B,EAAEC,iCAAiC,EAAEC,uBAAuB,EAAEC,yBAAyB,EAAEC,qBAAqB,EAAEC,0BAA0B,EAAEC,oBAAoB,EAAEC,wBAAwB,EAAEC,8BAA8B,QAAS,+BAA+B;AACvjB,SAASC,mBAAmB,QAAQ,qC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