1 |
- {"ast":null,"code":"import { __decorate } from \"../../../../tslib.es6.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeMaterialConnectionPointCustomObject } from \"../../nodeMaterialConnectionPointCustomObject.js\";\nimport { ReflectionTextureBaseBlock } from \"../Dual/reflectionTextureBaseBlock.js\";\nimport { Texture } from \"../../../Textures/texture.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { Logger } from \"../../../../Misc/logger.js\";\n/**\n * Block used to implement the reflection module of the PBR material\n */\nexport class ReflectionBlock extends ReflectionTextureBaseBlock {\n _onGenerateOnlyFragmentCodeChanged() {\n if (this.position.isConnected) {\n this.generateOnlyFragmentCode = !this.generateOnlyFragmentCode;\n Logger.Error(\"The position input must not be connected to be able to switch!\");\n return false;\n }\n this._setTarget();\n return true;\n }\n _setTarget() {\n super._setTarget();\n this.getInputByName(\"position\").target = this.generateOnlyFragmentCode ? NodeMaterialBlockTargets.Fragment : NodeMaterialBlockTargets.Vertex;\n if (this.generateOnlyFragmentCode) {\n this.forceIrradianceInFragment = true;\n }\n }\n /**\n * Create a new ReflectionBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name);\n /**\n * Defines if the material uses spherical harmonics vs spherical polynomials for the\n * diffuse part of the IBL.\n */\n this.useSphericalHarmonics = true;\n /**\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\n */\n this.forceIrradianceInFragment = false;\n this._isUnique = true;\n this.registerInput(\"position\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false, NodeMaterialBlockTargets.Vertex);\n this.registerInput(\"world\", NodeMaterialBlockConnectionPointTypes.Matrix, false, NodeMaterialBlockTargets.Vertex);\n this.registerInput(\"color\", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);\n this.registerOutput(\"reflection\", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.Fragment, new NodeMaterialConnectionPointCustomObject(\"reflection\", this, 1 /* NodeMaterialConnectionPointDirection.Output */, ReflectionBlock, \"ReflectionBlock\"));\n this.position.addExcludedConnectionPointFromAllowedTypes(NodeMaterialBlockConnectionPointTypes.Color3 | NodeMaterialBlockConnectionPointTypes.Vector3 | NodeMaterialBlockConnectionPointTypes.Vector4);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"ReflectionBlock\";\n }\n /**\n * Gets the position input component\n */\n get position() {\n return this._inputs[0];\n }\n /**\n * Gets the world position input component\n */\n get worldPosition() {\n return this.worldPositionConnectionPoint;\n }\n /**\n * Gets the world normal input component\n */\n get worldNormal() {\n return this.worldNormalConnectionPoint;\n }\n /**\n * Gets the world input component\n */\n get world() {\n return this._inputs[1];\n }\n /**\n * Gets the camera (or eye) position component\n */\n get cameraPosition() {\n return this.cameraPositionConnectionPoint;\n }\n /**\n * Gets the view input component\n */\n get view() {\n return this.viewConnectionPoint;\n }\n /**\n * Gets the color input component\n */\n get color() {\n return this._inputs[2];\n }\n /**\n * Gets the reflection object output component\n */\n get reflection() {\n return this._outputs[0];\n }\n /**\n * Returns true if the block has a texture (either its own texture or the environment texture from the scene, if set)\n */\n get hasTexture() {\n return !!this._getTexture();\n }\n /**\n * Gets the reflection color (either the name of the variable if the color input is connected, else a default value)\n */\n get reflectionColor() {\n return this.color.isConnected ? this.color.associatedVariableName : \"vec3(1., 1., 1.)\";\n }\n _getTexture() {\n if (this.texture) {\n return this.texture;\n }\n return this._scene.environmentTexture;\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n super.prepareDefines(mesh, nodeMaterial, defines);\n const reflectionTexture = this._getTexture();\n const reflection = reflectionTexture && reflectionTexture.getTextureMatrix;\n defines.setValue(\"REFLECTION\", reflection, true);\n if (!reflection) {\n return;\n }\n defines.setValue(this._defineLODReflectionAlpha, reflectionTexture.lodLevelInAlpha, true);\n defines.setValue(this._defineLinearSpecularReflection, reflectionTexture.linearSpecularLOD, true);\n defines.setValue(this._defineOppositeZ, this._scene.useRightHandedSystem ? !reflectionTexture.invertZ : reflectionTexture.invertZ, true);\n defines.setValue(\"SPHERICAL_HARMONICS\", this.useSphericalHarmonics, true);\n defines.setValue(\"GAMMAREFLECTION\", reflectionTexture.gammaSpace, true);\n defines.setValue(\"RGBDREFLECTION\", reflectionTexture.isRGBD, true);\n if (reflectionTexture && reflectionTexture.coordinatesMode !== Texture.SKYBOX_MODE) {\n if (reflectionTexture.isCube) {\n defines.setValue(\"USESPHERICALFROMREFLECTIONMAP\", true);\n defines.setValue(\"USEIRRADIANCEMAP\", false);\n if (this.forceIrradianceInFragment || this._scene.getEngine().getCaps().maxVaryingVectors <= 8) {\n defines.setValue(\"USESPHERICALINVERTEX\", false);\n } else {\n defines.setValue(\"USESPHERICALINVERTEX\", true);\n }\n }\n }\n }\n bind(effect, nodeMaterial, mesh, subMesh) {\n super.bind(effect, nodeMaterial, mesh);\n const reflectionTexture = this._getTexture();\n if (!reflectionTexture || !subMesh) {\n return;\n }\n if (reflectionTexture.isCube) {\n effect.setTexture(this._cubeSamplerName, reflectionTexture);\n } else {\n effect.setTexture(this._2DSamplerName, reflectionTexture);\n }\n const width = reflectionTexture.getSize().width;\n effect.setFloat3(this._vReflectionMicrosurfaceInfosName, width, reflectionTexture.lodGenerationScale, reflectionTexture.lodGenerationOffset);\n effect.setFloat2(this._vReflectionFilteringInfoName, width, Math.log2(width));\n const defines = subMesh.materialDefines;\n const polynomials = reflectionTexture.sphericalPolynomial;\n if (defines.USESPHERICALFROMREFLECTIONMAP && polynomials) {\n if (defines.SPHERICAL_HARMONICS) {\n const preScaledHarmonics = polynomials.preScaledHarmonics;\n effect.setVector3(\"vSphericalL00\", preScaledHarmonics.l00);\n effect.setVector3(\"vSphericalL1_1\", preScaledHarmonics.l1_1);\n effect.setVector3(\"vSphericalL10\", preScaledHarmonics.l10);\n effect.setVector3(\"vSphericalL11\", preScaledHarmonics.l11);\n effect.setVector3(\"vSphericalL2_2\", preScaledHarmonics.l2_2);\n effect.setVector3(\"vSphericalL2_1\", preScaledHarmonics.l2_1);\n effect.setVector3(\"vSphericalL20\", preScaledHarmonics.l20);\n effect.setVector3(\"vSphericalL21\", preScaledHarmonics.l21);\n effect.setVector3(\"vSphericalL22\", preScaledHarmonics.l22);\n } else {\n effect.setFloat3(\"vSphericalX\", polynomials.x.x, polynomials.x.y, polynomials.x.z);\n effect.setFloat3(\"vSphericalY\", polynomials.y.x, polynomials.y.y, polynomials.y.z);\n effect.setFloat3(\"vSphericalZ\", polynomials.z.x, polynomials.z.y, polynomials.z.z);\n effect.setFloat3(\"vSphericalXX_ZZ\", polynomials.xx.x - polynomials.zz.x, polynomials.xx.y - polynomials.zz.y, polynomials.xx.z - polynomials.zz.z);\n effect.setFloat3(\"vSphericalYY_ZZ\", polynomials.yy.x - polynomials.zz.x, polynomials.yy.y - polynomials.zz.y, polynomials.yy.z - polynomials.zz.z);\n effect.setFloat3(\"vSphericalZZ\", polynomials.zz.x, polynomials.zz.y, polynomials.zz.z);\n effect.setFloat3(\"vSphericalXY\", polynomials.xy.x, polynomials.xy.y, polynomials.xy.z);\n effect.setFloat3(\"vSphericalYZ\", polynomials.yz.x, polynomials.yz.y, polynomials.yz.z);\n effect.setFloat3(\"vSphericalZX\", polynomials.zx.x, polynomials.zx.y, polynomials.zx.z);\n }\n }\n }\n /**\n * Gets the code to inject in the vertex shader\n * @param state current state of the node material building\n * @returns the shader code\n */\n handleVertexSide(state) {\n let code = super.handleVertexSide(state);\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n state._emitFunctionFromInclude(\"harmonicsFunctions\", `//${this.name}`, {\n replaceStrings: [{\n search: /uniform vec3 vSphericalL00;[\\s\\S]*?uniform vec3 vSphericalL22;/g,\n replace: \"\"\n }, {\n search: /uniform vec3 vSphericalX;[\\s\\S]*?uniform vec3 vSphericalZX;/g,\n replace: \"\"\n }]\n });\n const reflectionVectorName = state._getFreeVariableName(\"reflectionVector\");\n this._vEnvironmentIrradianceName = state._getFreeVariableName(\"vEnvironmentIrradiance\");\n state._emitVaryingFromString(this._vEnvironmentIrradianceName, NodeMaterialBlockConnectionPointTypes.Vector3, \"defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\");\n state._emitUniformFromString(\"vSphericalL00\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL1_1\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL10\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL11\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL2_2\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL2_1\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL20\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL21\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL22\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalX\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalY\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalXX_ZZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalYY_ZZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalZZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalXY\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalYZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalZX\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n code += `#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\n ${state._declareLocalVar(reflectionVectorName, NodeMaterialBlockConnectionPointTypes.Vector3)} = (${(isWebGPU ? \"uniforms.\" : \"\") + this._reflectionMatrixName} * vec4${state.fSuffix}(normalize(${this.worldNormal.associatedVariableName}).xyz, 0)).xyz;\n #ifdef ${this._defineOppositeZ}\n ${reflectionVectorName}.z *= -1.0;\n #endif\n ${isWebGPU ? \"vertexOutputs.\" : \"\"}${this._vEnvironmentIrradianceName} = computeEnvironmentIrradiance(${reflectionVectorName});\n #endif\\n`;\n return code;\n }\n /**\n * Gets the main code of the block (fragment side)\n * @param state current state of the node material building\n * @param normalVarName name of the existing variable corresponding to the normal\n * @returns the shader code\n */\n getCode(state, normalVarName) {\n let code = \"\";\n this.handleFragmentSideInits(state);\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n state._emitFunctionFromInclude(\"harmonicsFunctions\", `//${this.name}`, {\n replaceStrings: [{\n search: /uniform vec3 vSphericalL00;[\\s\\S]*?uniform vec3 vSphericalL22;/g,\n replace: \"\"\n }, {\n search: /uniform vec3 vSphericalX;[\\s\\S]*?uniform vec3 vSphericalZX;/g,\n replace: \"\"\n }]\n });\n if (!isWebGPU) {\n state._emitFunction(\"sampleReflection\", `\n #ifdef ${this._define3DName}\n #define sampleReflection(s, c) textureCube(s, c)\n #else\n #define sampleReflection(s, c) texture2D(s, c)\n #endif\\n`, `//${this.name}`);\n state._emitFunction(\"sampleReflectionLod\", `\n #ifdef ${this._define3DName}\n #define sampleReflectionLod(s, c, l) textureCubeLodEXT(s, c, l)\n #else\n #define sampleReflectionLod(s, c, l) texture2DLodEXT(s, c, l)\n #endif\\n`, `//${this.name}`);\n }\n const computeReflectionCoordsFunc = isWebGPU ? `\n fn computeReflectionCoordsPBR(worldPos: vec4f, worldNormal: vec3f) -> vec3f {\n ${this.handleFragmentSideCodeReflectionCoords(state, \"worldNormal\", \"worldPos\", true, true)}\n return ${this._reflectionVectorName};\n }\\n` : `\n vec3 computeReflectionCoordsPBR(vec4 worldPos, vec3 worldNormal) {\n ${this.handleFragmentSideCodeReflectionCoords(state, \"worldNormal\", \"worldPos\", true, true)}\n return ${this._reflectionVectorName};\n }\\n`;\n state._emitFunction(\"computeReflectionCoordsPBR\", computeReflectionCoordsFunc, `//${this.name}`);\n this._vReflectionMicrosurfaceInfosName = state._getFreeVariableName(\"vReflectionMicrosurfaceInfos\");\n state._emitUniformFromString(this._vReflectionMicrosurfaceInfosName, NodeMaterialBlockConnectionPointTypes.Vector3);\n this._vReflectionInfosName = state._getFreeVariableName(\"vReflectionInfos\");\n this._vReflectionFilteringInfoName = state._getFreeVariableName(\"vReflectionFilteringInfo\");\n state._emitUniformFromString(this._vReflectionFilteringInfoName, NodeMaterialBlockConnectionPointTypes.Vector2);\n code += `#ifdef REFLECTION\n ${state._declareLocalVar(this._vReflectionInfosName, NodeMaterialBlockConnectionPointTypes.Vector2)} = vec2${state.fSuffix}(1., 0.);\n\n ${isWebGPU ? \"var reflectionOut: reflectionOutParams\" : \"reflectionOutParams reflectionOut\"};\n\n reflectionOut = reflectionBlock(\n ${this.generateOnlyFragmentCode ? this._worldPositionNameInFragmentOnlyMode : (isWebGPU ? \"input.\" : \"\") + \"v_\" + this.worldPosition.associatedVariableName}.xyz\n , ${normalVarName}\n , alphaG\n , ${(isWebGPU ? \"uniforms.\" : \"\") + this._vReflectionMicrosurfaceInfosName}\n , ${this._vReflectionInfosName}\n , ${this.reflectionColor}\n #ifdef ANISOTROPIC\n ,anisotropicOut\n #endif\n #if defined(${this._defineLODReflectionAlpha}) && !defined(${this._defineSkyboxName})\n ,NdotVUnclamped\n #endif\n #ifdef ${this._defineLinearSpecularReflection}\n , roughness\n #endif\n #ifdef ${this._define3DName}\n , ${this._cubeSamplerName}\n ${isWebGPU ? `, ${this._cubeSamplerName}Sampler` : \"\"}\n #else\n , ${this._2DSamplerName}\n ${isWebGPU ? `, ${this._2DSamplerName}Sampler` : \"\"}\n #endif\n #if defined(NORMAL) && defined(USESPHERICALINVERTEX)\n , ${isWebGPU ? \"input.\" : \"\"}${this._vEnvironmentIrradianceName}\n #endif\n #ifdef USESPHERICALFROMREFLECTIONMAP\n #if !defined(NORMAL) || !defined(USESPHERICALINVERTEX)\n , ${this._reflectionMatrixName}\n #endif\n #endif\n #ifdef USEIRRADIANCEMAP\n , irradianceSampler // ** not handled **\n ${isWebGPU ? `, irradianceSamplerSampler` : \"\"}\n #endif\n #ifndef LODBASEDMICROSFURACE\n #ifdef ${this._define3DName}\n , ${this._cubeSamplerName}\n ${isWebGPU ? `, ${this._cubeSamplerName}Sampler` : \"\"}\n , ${this._cubeSamplerName}\n ${isWebGPU ? `, ${this._cubeSamplerName}Sampler` : \"\"}\n #else\n , ${this._2DSamplerName}\n ${isWebGPU ? `, ${this._2DSamplerName}Sampler` : \"\"}\n , ${this._2DSamplerName} \n ${isWebGPU ? `, ${this._2DSamplerName}Sampler` : \"\"}\n #endif\n #endif\n #ifdef REALTIME_FILTERING\n , ${this._vReflectionFilteringInfoName}\n #endif\n );\n #endif\\n`;\n return code;\n }\n _buildBlock(state) {\n this._scene = state.sharedData.scene;\n if (state.target !== NodeMaterialBlockTargets.Fragment) {\n this._defineLODReflectionAlpha = state._getFreeDefineName(\"LODINREFLECTIONALPHA\");\n this._defineLinearSpecularReflection = state._getFreeDefineName(\"LINEARSPECULARREFLECTION\");\n }\n return this;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n if (this.texture) {\n codeString += `${this._codeVariableName}.texture.gammaSpace = ${this.texture.gammaSpace};\\n`;\n }\n codeString += `${this._codeVariableName}.useSphericalHarmonics = ${this.useSphericalHarmonics};\\n`;\n codeString += `${this._codeVariableName}.forceIrradianceInFragment = ${this.forceIrradianceInFragment};\\n`;\n return codeString;\n }\n serialize() {\n var _this$texture$gammaSp, _this$texture;\n const serializationObject = super.serialize();\n serializationObject.useSphericalHarmonics = this.useSphericalHarmonics;\n serializationObject.forceIrradianceInFragment = this.forceIrradianceInFragment;\n serializationObject.gammaSpace = (_this$texture$gammaSp = (_this$texture = this.texture) === null || _this$texture === void 0 ? void 0 : _this$texture.gammaSpace) !== null && _this$texture$gammaSp !== void 0 ? _this$texture$gammaSp : true;\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n super._deserialize(serializationObject, scene, rootUrl);\n this.useSphericalHarmonics = serializationObject.useSphericalHarmonics;\n this.forceIrradianceInFragment = serializationObject.forceIrradianceInFragment;\n if (this.texture) {\n this.texture.gammaSpace = serializationObject.gammaSpace;\n }\n }\n}\n__decorate([editableInPropertyPage(\"Spherical Harmonics\", 0 /* PropertyTypeForEdition.Boolean */, \"ADVANCED\", {\n embedded: true,\n notifiers: {\n update: true\n }\n})], ReflectionBlock.prototype, \"useSphericalHarmonics\", void 0);\n__decorate([editableInPropertyPage(\"Force irradiance in fragment\", 0 /* PropertyTypeForEdition.Boolean */, \"ADVANCED\", {\n embedded: true,\n notifiers: {\n update: true\n }\n})], ReflectionBlock.prototype, \"forceIrradianceInFragment\", void 0);\nRegisterClass(\"BABYLON.ReflectionBlock\", ReflectionBlock);","map":{"version":3,"names":["__decorate","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","RegisterClass","NodeMaterialConnectionPointCustomObject","ReflectionTextureBaseBlock","Texture","editableInPropertyPage","Logger","ReflectionBlock","_onGenerateOnlyFragmentCodeChanged","position","isConnected","generateOnlyFragmentCode","Error","_setTarget","getInputByName","target","Fragment","Vertex","forceIrradianceInFragment","constructor","name","useSphericalHarmonics","_isUnique","registerInput","AutoDetect","Matrix","Color3","registerOutput","Object","addExcludedConnectionPointFromAllowedTypes","Vector3","Vector4","getClassName","_inputs","worldPosition","worldPositionConnectionPoint","worldNormal","worldNormalConnectionPoint","world","cameraPosition","cameraPositionConnectionPoint","view","viewConnectionPoint","color","reflection","_outputs","hasTexture","_getTexture","reflectionColor","associatedVariableName","texture","_scene","environmentTexture","prepareDefines","mesh","nodeMaterial","defines","reflectionTexture","getTextureMatrix","setValue","_defineLODReflectionAlpha","lodLevelInAlpha","_defineLinearSpecularReflection","linearSpecularLOD","_defineOppositeZ","useRightHandedSystem","invertZ","gammaSpace","isRGBD","coordinatesMode","SKYBOX_MODE","isCube","getEngine","getCaps","maxVaryingVectors","bind","effect","subMesh","setTexture","_cubeSamplerName","_2DSamplerName","width","getSize","setFloat3","_vReflectionMicrosurfaceInfosName","lodGenerationScale","lodGenerationOffset","setFloat2","_vReflectionFilteringInfoName","Math","log2","materialDefines","polynomials","sphericalPolynomial","USESPHERICALFROMREFLECTIONMAP","SPHERICAL_HARMONICS","preScaledHarmonics","setVector3","l00","l1_1","l10","l11","l2_2","l2_1","l20","l21","l22","x","y","z","xx","zz","yy","xy","yz","zx","handleVertexSide","state","code","isWebGPU","shaderLanguage","_emitFunctionFromInclude","replaceStrings","search","replace","reflectionVectorName","_getFreeVariableName","_vEnvironmentIrradianceName","_emitVaryingFromString","_emitUniformFromString","_declareLocalVar","_reflectionMatrixName","fSuffix","getCode","normalVarName","handleFragmentSideInits","_emitFunction","_define3DName","computeReflectionCoordsFunc","handleFragmentSideCodeReflectionCoords","_reflectionVectorName","_vReflectionInfosName","Vector2","_worldPositionNameInFragmentOnlyMode","_defineSkyboxName","_buildBlock","sharedData","scene","_getFreeDefineName","_dumpPropertiesCode","codeString","_codeVariableName","serialize","_this$texture$gammaSp","_this$texture","serializationObject","_deserialize","rootUrl","embedded","notifiers","update","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/PBR/reflectionBlock.js"],"sourcesContent":["import { __decorate } from \"../../../../tslib.es6.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeMaterialConnectionPointCustomObject } from \"../../nodeMaterialConnectionPointCustomObject.js\";\nimport { ReflectionTextureBaseBlock } from \"../Dual/reflectionTextureBaseBlock.js\";\nimport { Texture } from \"../../../Textures/texture.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { Logger } from \"../../../../Misc/logger.js\";\n/**\n * Block used to implement the reflection module of the PBR material\n */\nexport class ReflectionBlock extends ReflectionTextureBaseBlock {\n _onGenerateOnlyFragmentCodeChanged() {\n if (this.position.isConnected) {\n this.generateOnlyFragmentCode = !this.generateOnlyFragmentCode;\n Logger.Error(\"The position input must not be connected to be able to switch!\");\n return false;\n }\n this._setTarget();\n return true;\n }\n _setTarget() {\n super._setTarget();\n this.getInputByName(\"position\").target = this.generateOnlyFragmentCode ? NodeMaterialBlockTargets.Fragment : NodeMaterialBlockTargets.Vertex;\n if (this.generateOnlyFragmentCode) {\n this.forceIrradianceInFragment = true;\n }\n }\n /**\n * Create a new ReflectionBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name);\n /**\n * Defines if the material uses spherical harmonics vs spherical polynomials for the\n * diffuse part of the IBL.\n */\n this.useSphericalHarmonics = true;\n /**\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\n */\n this.forceIrradianceInFragment = false;\n this._isUnique = true;\n this.registerInput(\"position\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false, NodeMaterialBlockTargets.Vertex);\n this.registerInput(\"world\", NodeMaterialBlockConnectionPointTypes.Matrix, false, NodeMaterialBlockTargets.Vertex);\n this.registerInput(\"color\", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);\n this.registerOutput(\"reflection\", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.Fragment, new NodeMaterialConnectionPointCustomObject(\"reflection\", this, 1 /* NodeMaterialConnectionPointDirection.Output */, ReflectionBlock, \"ReflectionBlock\"));\n this.position.addExcludedConnectionPointFromAllowedTypes(NodeMaterialBlockConnectionPointTypes.Color3 | NodeMaterialBlockConnectionPointTypes.Vector3 | NodeMaterialBlockConnectionPointTypes.Vector4);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"ReflectionBlock\";\n }\n /**\n * Gets the position input component\n */\n get position() {\n return this._inputs[0];\n }\n /**\n * Gets the world position input component\n */\n get worldPosition() {\n return this.worldPositionConnectionPoint;\n }\n /**\n * Gets the world normal input component\n */\n get worldNormal() {\n return this.worldNormalConnectionPoint;\n }\n /**\n * Gets the world input component\n */\n get world() {\n return this._inputs[1];\n }\n /**\n * Gets the camera (or eye) position component\n */\n get cameraPosition() {\n return this.cameraPositionConnectionPoint;\n }\n /**\n * Gets the view input component\n */\n get view() {\n return this.viewConnectionPoint;\n }\n /**\n * Gets the color input component\n */\n get color() {\n return this._inputs[2];\n }\n /**\n * Gets the reflection object output component\n */\n get reflection() {\n return this._outputs[0];\n }\n /**\n * Returns true if the block has a texture (either its own texture or the environment texture from the scene, if set)\n */\n get hasTexture() {\n return !!this._getTexture();\n }\n /**\n * Gets the reflection color (either the name of the variable if the color input is connected, else a default value)\n */\n get reflectionColor() {\n return this.color.isConnected ? this.color.associatedVariableName : \"vec3(1., 1., 1.)\";\n }\n _getTexture() {\n if (this.texture) {\n return this.texture;\n }\n return this._scene.environmentTexture;\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n super.prepareDefines(mesh, nodeMaterial, defines);\n const reflectionTexture = this._getTexture();\n const reflection = reflectionTexture && reflectionTexture.getTextureMatrix;\n defines.setValue(\"REFLECTION\", reflection, true);\n if (!reflection) {\n return;\n }\n defines.setValue(this._defineLODReflectionAlpha, reflectionTexture.lodLevelInAlpha, true);\n defines.setValue(this._defineLinearSpecularReflection, reflectionTexture.linearSpecularLOD, true);\n defines.setValue(this._defineOppositeZ, this._scene.useRightHandedSystem ? !reflectionTexture.invertZ : reflectionTexture.invertZ, true);\n defines.setValue(\"SPHERICAL_HARMONICS\", this.useSphericalHarmonics, true);\n defines.setValue(\"GAMMAREFLECTION\", reflectionTexture.gammaSpace, true);\n defines.setValue(\"RGBDREFLECTION\", reflectionTexture.isRGBD, true);\n if (reflectionTexture && reflectionTexture.coordinatesMode !== Texture.SKYBOX_MODE) {\n if (reflectionTexture.isCube) {\n defines.setValue(\"USESPHERICALFROMREFLECTIONMAP\", true);\n defines.setValue(\"USEIRRADIANCEMAP\", false);\n if (this.forceIrradianceInFragment || this._scene.getEngine().getCaps().maxVaryingVectors <= 8) {\n defines.setValue(\"USESPHERICALINVERTEX\", false);\n }\n else {\n defines.setValue(\"USESPHERICALINVERTEX\", true);\n }\n }\n }\n }\n bind(effect, nodeMaterial, mesh, subMesh) {\n super.bind(effect, nodeMaterial, mesh);\n const reflectionTexture = this._getTexture();\n if (!reflectionTexture || !subMesh) {\n return;\n }\n if (reflectionTexture.isCube) {\n effect.setTexture(this._cubeSamplerName, reflectionTexture);\n }\n else {\n effect.setTexture(this._2DSamplerName, reflectionTexture);\n }\n const width = reflectionTexture.getSize().width;\n effect.setFloat3(this._vReflectionMicrosurfaceInfosName, width, reflectionTexture.lodGenerationScale, reflectionTexture.lodGenerationOffset);\n effect.setFloat2(this._vReflectionFilteringInfoName, width, Math.log2(width));\n const defines = subMesh.materialDefines;\n const polynomials = reflectionTexture.sphericalPolynomial;\n if (defines.USESPHERICALFROMREFLECTIONMAP && polynomials) {\n if (defines.SPHERICAL_HARMONICS) {\n const preScaledHarmonics = polynomials.preScaledHarmonics;\n effect.setVector3(\"vSphericalL00\", preScaledHarmonics.l00);\n effect.setVector3(\"vSphericalL1_1\", preScaledHarmonics.l1_1);\n effect.setVector3(\"vSphericalL10\", preScaledHarmonics.l10);\n effect.setVector3(\"vSphericalL11\", preScaledHarmonics.l11);\n effect.setVector3(\"vSphericalL2_2\", preScaledHarmonics.l2_2);\n effect.setVector3(\"vSphericalL2_1\", preScaledHarmonics.l2_1);\n effect.setVector3(\"vSphericalL20\", preScaledHarmonics.l20);\n effect.setVector3(\"vSphericalL21\", preScaledHarmonics.l21);\n effect.setVector3(\"vSphericalL22\", preScaledHarmonics.l22);\n }\n else {\n effect.setFloat3(\"vSphericalX\", polynomials.x.x, polynomials.x.y, polynomials.x.z);\n effect.setFloat3(\"vSphericalY\", polynomials.y.x, polynomials.y.y, polynomials.y.z);\n effect.setFloat3(\"vSphericalZ\", polynomials.z.x, polynomials.z.y, polynomials.z.z);\n effect.setFloat3(\"vSphericalXX_ZZ\", polynomials.xx.x - polynomials.zz.x, polynomials.xx.y - polynomials.zz.y, polynomials.xx.z - polynomials.zz.z);\n effect.setFloat3(\"vSphericalYY_ZZ\", polynomials.yy.x - polynomials.zz.x, polynomials.yy.y - polynomials.zz.y, polynomials.yy.z - polynomials.zz.z);\n effect.setFloat3(\"vSphericalZZ\", polynomials.zz.x, polynomials.zz.y, polynomials.zz.z);\n effect.setFloat3(\"vSphericalXY\", polynomials.xy.x, polynomials.xy.y, polynomials.xy.z);\n effect.setFloat3(\"vSphericalYZ\", polynomials.yz.x, polynomials.yz.y, polynomials.yz.z);\n effect.setFloat3(\"vSphericalZX\", polynomials.zx.x, polynomials.zx.y, polynomials.zx.z);\n }\n }\n }\n /**\n * Gets the code to inject in the vertex shader\n * @param state current state of the node material building\n * @returns the shader code\n */\n handleVertexSide(state) {\n let code = super.handleVertexSide(state);\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n state._emitFunctionFromInclude(\"harmonicsFunctions\", `//${this.name}`, {\n replaceStrings: [\n { search: /uniform vec3 vSphericalL00;[\\s\\S]*?uniform vec3 vSphericalL22;/g, replace: \"\" },\n { search: /uniform vec3 vSphericalX;[\\s\\S]*?uniform vec3 vSphericalZX;/g, replace: \"\" },\n ],\n });\n const reflectionVectorName = state._getFreeVariableName(\"reflectionVector\");\n this._vEnvironmentIrradianceName = state._getFreeVariableName(\"vEnvironmentIrradiance\");\n state._emitVaryingFromString(this._vEnvironmentIrradianceName, NodeMaterialBlockConnectionPointTypes.Vector3, \"defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\");\n state._emitUniformFromString(\"vSphericalL00\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL1_1\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL10\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL11\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL2_2\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL2_1\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL20\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL21\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalL22\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\");\n state._emitUniformFromString(\"vSphericalX\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalY\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalXX_ZZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalYY_ZZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalZZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalXY\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalYZ\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n state._emitUniformFromString(\"vSphericalZX\", NodeMaterialBlockConnectionPointTypes.Vector3, \"SPHERICAL_HARMONICS\", true);\n code += `#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\r\n ${state._declareLocalVar(reflectionVectorName, NodeMaterialBlockConnectionPointTypes.Vector3)} = (${(isWebGPU ? \"uniforms.\" : \"\") + this._reflectionMatrixName} * vec4${state.fSuffix}(normalize(${this.worldNormal.associatedVariableName}).xyz, 0)).xyz;\r\n #ifdef ${this._defineOppositeZ}\r\n ${reflectionVectorName}.z *= -1.0;\r\n #endif\r\n ${isWebGPU ? \"vertexOutputs.\" : \"\"}${this._vEnvironmentIrradianceName} = computeEnvironmentIrradiance(${reflectionVectorName});\r\n #endif\\n`;\n return code;\n }\n /**\n * Gets the main code of the block (fragment side)\n * @param state current state of the node material building\n * @param normalVarName name of the existing variable corresponding to the normal\n * @returns the shader code\n */\n getCode(state, normalVarName) {\n let code = \"\";\n this.handleFragmentSideInits(state);\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n state._emitFunctionFromInclude(\"harmonicsFunctions\", `//${this.name}`, {\n replaceStrings: [\n { search: /uniform vec3 vSphericalL00;[\\s\\S]*?uniform vec3 vSphericalL22;/g, replace: \"\" },\n { search: /uniform vec3 vSphericalX;[\\s\\S]*?uniform vec3 vSphericalZX;/g, replace: \"\" },\n ],\n });\n if (!isWebGPU) {\n state._emitFunction(\"sampleReflection\", `\r\n #ifdef ${this._define3DName}\r\n #define sampleReflection(s, c) textureCube(s, c)\r\n #else\r\n #define sampleReflection(s, c) texture2D(s, c)\r\n #endif\\n`, `//${this.name}`);\n state._emitFunction(\"sampleReflectionLod\", `\r\n #ifdef ${this._define3DName}\r\n #define sampleReflectionLod(s, c, l) textureCubeLodEXT(s, c, l)\r\n #else\r\n #define sampleReflectionLod(s, c, l) texture2DLodEXT(s, c, l)\r\n #endif\\n`, `//${this.name}`);\n }\n const computeReflectionCoordsFunc = isWebGPU\n ? `\r\n fn computeReflectionCoordsPBR(worldPos: vec4f, worldNormal: vec3f) -> vec3f {\r\n ${this.handleFragmentSideCodeReflectionCoords(state, \"worldNormal\", \"worldPos\", true, true)}\r\n return ${this._reflectionVectorName};\r\n }\\n`\n : `\r\n vec3 computeReflectionCoordsPBR(vec4 worldPos, vec3 worldNormal) {\r\n ${this.handleFragmentSideCodeReflectionCoords(state, \"worldNormal\", \"worldPos\", true, true)}\r\n return ${this._reflectionVectorName};\r\n }\\n`;\n state._emitFunction(\"computeReflectionCoordsPBR\", computeReflectionCoordsFunc, `//${this.name}`);\n this._vReflectionMicrosurfaceInfosName = state._getFreeVariableName(\"vReflectionMicrosurfaceInfos\");\n state._emitUniformFromString(this._vReflectionMicrosurfaceInfosName, NodeMaterialBlockConnectionPointTypes.Vector3);\n this._vReflectionInfosName = state._getFreeVariableName(\"vReflectionInfos\");\n this._vReflectionFilteringInfoName = state._getFreeVariableName(\"vReflectionFilteringInfo\");\n state._emitUniformFromString(this._vReflectionFilteringInfoName, NodeMaterialBlockConnectionPointTypes.Vector2);\n code += `#ifdef REFLECTION\r\n ${state._declareLocalVar(this._vReflectionInfosName, NodeMaterialBlockConnectionPointTypes.Vector2)} = vec2${state.fSuffix}(1., 0.);\r\n\r\n ${isWebGPU ? \"var reflectionOut: reflectionOutParams\" : \"reflectionOutParams reflectionOut\"};\r\n\r\n reflectionOut = reflectionBlock(\r\n ${this.generateOnlyFragmentCode ? this._worldPositionNameInFragmentOnlyMode : (isWebGPU ? \"input.\" : \"\") + \"v_\" + this.worldPosition.associatedVariableName}.xyz\r\n , ${normalVarName}\r\n , alphaG\r\n , ${(isWebGPU ? \"uniforms.\" : \"\") + this._vReflectionMicrosurfaceInfosName}\r\n , ${this._vReflectionInfosName}\r\n , ${this.reflectionColor}\r\n #ifdef ANISOTROPIC\r\n ,anisotropicOut\r\n #endif\r\n #if defined(${this._defineLODReflectionAlpha}) && !defined(${this._defineSkyboxName})\r\n ,NdotVUnclamped\r\n #endif\r\n #ifdef ${this._defineLinearSpecularReflection}\r\n , roughness\r\n #endif\r\n #ifdef ${this._define3DName}\r\n , ${this._cubeSamplerName}\r\n ${isWebGPU ? `, ${this._cubeSamplerName}Sampler` : \"\"}\r\n #else\r\n , ${this._2DSamplerName}\r\n ${isWebGPU ? `, ${this._2DSamplerName}Sampler` : \"\"}\r\n #endif\r\n #if defined(NORMAL) && defined(USESPHERICALINVERTEX)\r\n , ${isWebGPU ? \"input.\" : \"\"}${this._vEnvironmentIrradianceName}\r\n #endif\r\n #ifdef USESPHERICALFROMREFLECTIONMAP\r\n #if !defined(NORMAL) || !defined(USESPHERICALINVERTEX)\r\n , ${this._reflectionMatrixName}\r\n #endif\r\n #endif\r\n #ifdef USEIRRADIANCEMAP\r\n , irradianceSampler // ** not handled **\r\n ${isWebGPU ? `, irradianceSamplerSampler` : \"\"}\r\n #endif\r\n #ifndef LODBASEDMICROSFURACE\r\n #ifdef ${this._define3DName}\r\n , ${this._cubeSamplerName}\r\n ${isWebGPU ? `, ${this._cubeSamplerName}Sampler` : \"\"}\r\n , ${this._cubeSamplerName}\r\n ${isWebGPU ? `, ${this._cubeSamplerName}Sampler` : \"\"}\r\n #else\r\n , ${this._2DSamplerName}\r\n ${isWebGPU ? `, ${this._2DSamplerName}Sampler` : \"\"}\r\n , ${this._2DSamplerName} \r\n ${isWebGPU ? `, ${this._2DSamplerName}Sampler` : \"\"}\r\n #endif\r\n #endif\r\n #ifdef REALTIME_FILTERING\r\n , ${this._vReflectionFilteringInfoName}\r\n #endif\r\n );\r\n #endif\\n`;\n return code;\n }\n _buildBlock(state) {\n this._scene = state.sharedData.scene;\n if (state.target !== NodeMaterialBlockTargets.Fragment) {\n this._defineLODReflectionAlpha = state._getFreeDefineName(\"LODINREFLECTIONALPHA\");\n this._defineLinearSpecularReflection = state._getFreeDefineName(\"LINEARSPECULARREFLECTION\");\n }\n return this;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n if (this.texture) {\n codeString += `${this._codeVariableName}.texture.gammaSpace = ${this.texture.gammaSpace};\\n`;\n }\n codeString += `${this._codeVariableName}.useSphericalHarmonics = ${this.useSphericalHarmonics};\\n`;\n codeString += `${this._codeVariableName}.forceIrradianceInFragment = ${this.forceIrradianceInFragment};\\n`;\n return codeString;\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.useSphericalHarmonics = this.useSphericalHarmonics;\n serializationObject.forceIrradianceInFragment = this.forceIrradianceInFragment;\n serializationObject.gammaSpace = this.texture?.gammaSpace ?? true;\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n super._deserialize(serializationObject, scene, rootUrl);\n this.useSphericalHarmonics = serializationObject.useSphericalHarmonics;\n this.forceIrradianceInFragment = serializationObject.forceIrradianceInFragment;\n if (this.texture) {\n this.texture.gammaSpace = serializationObject.gammaSpace;\n }\n }\n}\n__decorate([\n editableInPropertyPage(\"Spherical Harmonics\", 0 /* PropertyTypeForEdition.Boolean */, \"ADVANCED\", { embedded: true, notifiers: { update: true } })\n], ReflectionBlock.prototype, \"useSphericalHarmonics\", void 0);\n__decorate([\n editableInPropertyPage(\"Force irradiance in fragment\", 0 /* PropertyTypeForEdition.Boolean */, \"ADVANCED\", { embedded: true, notifiers: { update: true } })\n], ReflectionBlock.prototype, \"forceIrradianceInFragment\", void 0);\nRegisterClass(\"BABYLON.ReflectionBlock\", ReflectionBlock);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,qCAAqC,QAAQ,sDAAsD;AAC5G,SAASC,wBAAwB,QAAQ,yCAAyC;AAClF,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,uCAAuC,QAAQ,kDAAkD;AAC1G,SAASC,0BAA0B,QAAQ,uCAAuC;AAClF,SAASC,OAAO,QAAQ,8BAA8B;AACtD,SAASC,sBAAsB,QAAQ,yCAAyC;AAChF,SAASC,MAAM,QAAQ,4BAA4B;AACnD;AACA;AACA;AACA,OAAO,MAAMC,eAAe,SAASJ,0BAA0B,CAAC;EAC5DK,kCAAkCA,CAAA,EAAG;IACjC,IAAI,IAAI,CAACC,QAAQ,CAACC,WAAW,EAAE;MAC3B,IAAI,CAACC,wBAAwB,GAAG,CAAC,IAAI,CAACA,wBAAwB;MAC9DL,MAAM,CAACM,KAAK,CAAC,gEAAgE,CAAC;MAC9E,OAAO,KAAK;IAChB;IACA,IAAI,CAACC,UAAU,CAAC,CAAC;IACjB,OAAO,IAAI;EACf;EACAA,UAAUA,CAAA,EAAG;IACT,KAAK,CAACA,UAAU,CAAC,CAAC;IAClB,IAAI,CAACC,cAAc,CAAC,UAAU,CAAC,CAACC,MAAM,GAAG,IAAI,CAACJ,wBAAwB,GAAGX,wBAAwB,CAACgB,QAAQ,GAAGhB,wBAAwB,CAACiB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