{"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\";\nimport { NodeMaterialBlock } from \"../../nodeMaterialBlock.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { InputBlock } from \"../Input/inputBlock.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { NodeMaterialConnectionPointCustomObject } from \"../../nodeMaterialConnectionPointCustomObject.js\";\nimport { TBNBlock } from \"./TBNBlock.js\";\n\n/**\n * Block used to perturb normals based on a normal map\n */\nexport class PerturbNormalBlock extends NodeMaterialBlock {\n /**\n * Create a new PerturbNormalBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Fragment);\n this._tangentSpaceParameterName = \"\";\n this._tangentCorrectionFactorName = \"\";\n this._worldMatrixName = \"\";\n /** Gets or sets a boolean indicating that normal should be inverted on X axis */\n this.invertX = false;\n /** Gets or sets a boolean indicating that normal should be inverted on Y axis */\n this.invertY = false;\n /** Gets or sets a boolean indicating that parallax occlusion should be enabled */\n this.useParallaxOcclusion = false;\n /** Gets or sets a boolean indicating that sampling mode is in Object space */\n this.useObjectSpaceNormalMap = false;\n this._isUnique = true;\n // Vertex\n this.registerInput(\"worldPosition\", NodeMaterialBlockConnectionPointTypes.Vector4, false);\n this.registerInput(\"worldNormal\", NodeMaterialBlockConnectionPointTypes.Vector4, false);\n this.registerInput(\"worldTangent\", NodeMaterialBlockConnectionPointTypes.Vector4, true);\n this.registerInput(\"uv\", NodeMaterialBlockConnectionPointTypes.Vector2, false);\n this.registerInput(\"normalMapColor\", NodeMaterialBlockConnectionPointTypes.Color3, false);\n this.registerInput(\"strength\", NodeMaterialBlockConnectionPointTypes.Float, false);\n this.registerInput(\"viewDirection\", NodeMaterialBlockConnectionPointTypes.Vector3, true);\n this.registerInput(\"parallaxScale\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"parallaxHeight\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"TBN\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"TBN\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, TBNBlock, \"TBNBlock\"));\n this.registerInput(\"world\", NodeMaterialBlockConnectionPointTypes.Matrix, true);\n // Fragment\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.Vector4);\n this.registerOutput(\"uvOffset\", NodeMaterialBlockConnectionPointTypes.Vector2);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"PerturbNormalBlock\";\n }\n /**\n * Gets the world position input component\n */\n get worldPosition() {\n return this._inputs[0];\n }\n /**\n * Gets the world normal input component\n */\n get worldNormal() {\n return this._inputs[1];\n }\n /**\n * Gets the world tangent input component\n */\n get worldTangent() {\n return this._inputs[2];\n }\n /**\n * Gets the uv input component\n */\n get uv() {\n return this._inputs[3];\n }\n /**\n * Gets the normal map color input component\n */\n get normalMapColor() {\n return this._inputs[4];\n }\n /**\n * Gets the strength input component\n */\n get strength() {\n return this._inputs[5];\n }\n /**\n * Gets the view direction input component\n */\n get viewDirection() {\n return this._inputs[6];\n }\n /**\n * Gets the parallax scale input component\n */\n get parallaxScale() {\n return this._inputs[7];\n }\n /**\n * Gets the parallax height input component\n */\n get parallaxHeight() {\n return this._inputs[8];\n }\n /**\n * Gets the TBN input component\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n get TBN() {\n return this._inputs[9];\n }\n /**\n * Gets the World input component\n */\n get world() {\n return this._inputs[10];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n /**\n * Gets the uv offset output component\n */\n get uvOffset() {\n return this._outputs[1];\n }\n initialize(state) {\n this._initShaderSourceAsync(state.shaderLanguage);\n }\n _initShaderSourceAsync(shaderLanguage) {\n var _this = this;\n return _asyncToGenerator(function* () {\n _this._codeIsReady = false;\n if (shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n yield Promise.all([import(\"../../../../ShadersWGSL/ShadersInclude/bumpFragment.js\"), import(\"../../../../ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js\"), import(\"../../../../ShadersWGSL/ShadersInclude/bumpFragmentFunctions.js\")]);\n } else {\n yield Promise.all([import(\"../../../../Shaders/ShadersInclude/bumpFragment.js\"), import(\"../../../../Shaders/ShadersInclude/bumpFragmentMainFunctions.js\"), import(\"../../../../Shaders/ShadersInclude/bumpFragmentFunctions.js\")]);\n }\n _this._codeIsReady = true;\n _this.onCodeIsReadyObservable.notifyObservers(_this);\n })();\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n const normalSamplerName = this.normalMapColor.connectedPoint._ownerBlock.samplerName;\n const useParallax = this.viewDirection.isConnected && (this.useParallaxOcclusion && normalSamplerName || !this.useParallaxOcclusion && this.parallaxHeight.isConnected);\n defines.setValue(\"BUMP\", true);\n defines.setValue(\"PARALLAX\", useParallax, true);\n defines.setValue(\"PARALLAX_RHS\", nodeMaterial.getScene().useRightHandedSystem, true);\n defines.setValue(\"PARALLAXOCCLUSION\", this.useParallaxOcclusion, true);\n defines.setValue(\"OBJECTSPACE_NORMALMAP\", this.useObjectSpaceNormalMap, true);\n }\n bind(effect, nodeMaterial, mesh) {\n if (nodeMaterial.getScene()._mirroredCameraPosition) {\n effect.setFloat2(this._tangentSpaceParameterName, this.invertX ? 1.0 : -1.0, this.invertY ? 1.0 : -1.0);\n } else {\n effect.setFloat2(this._tangentSpaceParameterName, this.invertX ? -1.0 : 1.0, this.invertY ? -1.0 : 1.0);\n }\n if (mesh) {\n effect.setFloat(this._tangentCorrectionFactorName, mesh.getWorldMatrix().determinant() < 0 ? -1 : 1);\n if (this.useObjectSpaceNormalMap && !this.world.isConnected) {\n // World default to the mesh world matrix\n effect.setMatrix(this._worldMatrixName, mesh.getWorldMatrix());\n }\n }\n }\n autoConfigure(material, additionalFilteringInfo = () => true) {\n if (!this.uv.isConnected) {\n let uvInput = material.getInputBlockByPredicate(b => b.isAttribute && b.name === \"uv\" && additionalFilteringInfo(b));\n if (!uvInput) {\n uvInput = new InputBlock(\"uv\");\n uvInput.setAsAttribute();\n }\n uvInput.output.connectTo(this.uv);\n }\n if (!this.strength.isConnected) {\n const strengthInput = new InputBlock(\"strength\");\n strengthInput.value = 1.0;\n strengthInput.output.connectTo(this.strength);\n }\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const comments = `//${this.name}`;\n const uv = this.uv;\n const worldPosition = this.worldPosition;\n const worldNormal = this.worldNormal;\n const worldTangent = this.worldTangent;\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n const mat3 = isWebGPU ? \"mat3x3f\" : \"mat3\";\n const fSuffix = isWebGPU ? \"f\" : \"\";\n const uniformPrefix = isWebGPU ? \"uniforms.\" : \"\";\n state.sharedData.blocksWithDefines.push(this);\n state.sharedData.bindableBlocks.push(this);\n this._tangentSpaceParameterName = state._getFreeDefineName(\"tangentSpaceParameter\");\n state._emitUniformFromString(this._tangentSpaceParameterName, NodeMaterialBlockConnectionPointTypes.Vector2);\n this._tangentCorrectionFactorName = state._getFreeDefineName(\"tangentCorrectionFactor\");\n state._emitUniformFromString(this._tangentCorrectionFactorName, NodeMaterialBlockConnectionPointTypes.Float);\n this._worldMatrixName = state._getFreeDefineName(\"perturbNormalWorldMatrix\");\n state._emitUniformFromString(this._worldMatrixName, NodeMaterialBlockConnectionPointTypes.Matrix);\n let normalSamplerName = null;\n if (this.normalMapColor.connectedPoint) {\n normalSamplerName = this.normalMapColor.connectedPoint._ownerBlock.samplerName;\n }\n const useParallax = this.viewDirection.isConnected && (this.useParallaxOcclusion && normalSamplerName || !this.useParallaxOcclusion && this.parallaxHeight.isConnected);\n const replaceForParallaxInfos = !this.parallaxScale.isConnectedToInputBlock ? \"0.05\" : this.parallaxScale.connectInputBlock.isConstant ? state._emitFloat(this.parallaxScale.connectInputBlock.value) : this.parallaxScale.associatedVariableName;\n const replaceForBumpInfos = this.strength.isConnectedToInputBlock && this.strength.connectInputBlock.isConstant ? `\\n#if !defined(NORMALXYSCALE)\\n1.0/\\n#endif\\n${state._emitFloat(this.strength.connectInputBlock.value)}` : `\\n#if !defined(NORMALXYSCALE)\\n1.0/\\n#endif\\n${this.strength.associatedVariableName}`;\n if (!isWebGPU) {\n state._emitExtension(\"derivatives\", \"#extension GL_OES_standard_derivatives : enable\");\n }\n const tangentReplaceString = {\n search: /defined\\(TANGENT\\)/g,\n replace: worldTangent.isConnected ? \"defined(TANGENT)\" : \"defined(IGNORE)\"\n };\n const tbnVarying = {\n search: /varying mat3 vTBN;/g,\n replace: \"\"\n };\n const normalMatrixReplaceString = {\n search: /uniform mat4 normalMatrix;/g,\n replace: \"\"\n };\n const TBN = this.TBN;\n if (TBN.isConnected) {\n state.compilationString += `\n #ifdef TBNBLOCK\n ${isWebGPU ? \"var\" : \"mat3\"} vTBN = ${TBN.associatedVariableName};\n #endif\n `;\n } else if (worldTangent.isConnected) {\n state.compilationString += `${state._declareLocalVar(\"tbnNormal\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${worldNormal.associatedVariableName}.xyz);\\n`;\n state.compilationString += `${state._declareLocalVar(\"tbnTangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${worldTangent.associatedVariableName}.xyz);\\n`;\n state.compilationString += `${state._declareLocalVar(\"tbnBitangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = cross(tbnNormal, tbnTangent) * ${isWebGPU ? \"uniforms.\" : \"\"}${this._tangentCorrectionFactorName};\\n`;\n state.compilationString += `${isWebGPU ? \"var\" : \"mat3\"} vTBN = ${mat3}(tbnTangent, tbnBitangent, tbnNormal);\\n`;\n }\n let replaceStrings = [tangentReplaceString, tbnVarying, normalMatrixReplaceString];\n if (isWebGPU) {\n replaceStrings.push({\n search: /varying vTBN0: vec3f;/g,\n replace: \"\"\n });\n replaceStrings.push({\n search: /varying vTBN1: vec3f;/g,\n replace: \"\"\n });\n replaceStrings.push({\n search: /varying vTBN2: vec3f;/g,\n replace: \"\"\n });\n }\n state._emitFunctionFromInclude(\"bumpFragmentMainFunctions\", comments, {\n replaceStrings: replaceStrings\n });\n const replaceString0 = isWebGPU ? \"fn parallaxOcclusion(vViewDirCoT: vec3f, vNormalCoT: vec3f, texCoord: vec2f, parallaxScale:f32, bump: texture_2d, bumpSampler: sampler)\" : \"#define inline\\nvec2 parallaxOcclusion(vec3 vViewDirCoT, vec3 vNormalCoT, vec2 texCoord, float parallaxScale, sampler2D bumpSampler)\";\n const searchExp0 = isWebGPU ? /fn parallaxOcclusion\\(vViewDirCoT: vec3f,vNormalCoT: vec3f,texCoord: vec2f,parallaxScale: f32\\)/g : /vec2 parallaxOcclusion\\(vec3 vViewDirCoT,vec3 vNormalCoT,vec2 texCoord,float parallaxScale\\)/g;\n const replaceString1 = isWebGPU ? \"fn parallaxOffset(viewDir: vec3f, heightScale: f32, height_: f32)\" : \"vec2 parallaxOffset(vec3 viewDir, float heightScale, float height_)\";\n const searchExp1 = isWebGPU ? /fn parallaxOffset\\(viewDir: vec3f,heightScale: f32\\)/g : /vec2 parallaxOffset\\(vec3 viewDir,float heightScale\\)/g;\n state._emitFunctionFromInclude(\"bumpFragmentFunctions\", comments, {\n replaceStrings: [{\n search: /#include\\(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_SAMPLERNAME_,bump\\)/g,\n replace: \"\"\n }, {\n search: /uniform sampler2D bumpSampler;/g,\n replace: \"\"\n }, {\n search: searchExp0,\n replace: replaceString0\n }, {\n search: searchExp1,\n replace: replaceString1\n }, {\n search: /texture.+?bumpSampler,vBumpUV\\)\\.w/g,\n replace: \"height_\"\n }]\n });\n const normalRead = isWebGPU ? `textureSample(${normalSamplerName}, ${normalSamplerName + `Sampler`}` : `texture2D(${normalSamplerName}`;\n const uvForPerturbNormal = !useParallax || !normalSamplerName ? this.normalMapColor.associatedVariableName : `${normalRead}, ${uv.associatedVariableName} + uvOffset).xyz`;\n const tempOutput = state._getFreeVariableName(\"tempOutput\");\n state.compilationString += state._declareLocalVar(tempOutput, NodeMaterialBlockConnectionPointTypes.Vector3) + ` = vec3${fSuffix}(0.);\\n`;\n replaceStrings = [{\n search: new RegExp(`texture.+?bumpSampler${isWebGPU ? \"Sampler,fragmentInputs.\" : \",\"}vBumpUV\\\\)`, \"g\"),\n replace: `${uvForPerturbNormal}`\n }, {\n search: /#define CUSTOM_FRAGMENT_BUMP_FRAGMENT/g,\n replace: `${state._declareLocalVar(\"normalMatrix\", NodeMaterialBlockConnectionPointTypes.Matrix)} = toNormalMatrix(${this.world.isConnected ? this.world.associatedVariableName : this._worldMatrixName});`\n }, {\n search: new RegExp(`perturbNormal\\\\(TBN,texture.+?bumpSampler${isWebGPU ? \"Sampler,fragmentInputs.\" : \",\"}vBumpUV\\\\+uvOffset\\\\).xyz,${isWebGPU ? \"uniforms.\" : \"\"}vBumpInfos.y\\\\)`, \"g\"),\n replace: `perturbNormal(TBN, ${uvForPerturbNormal}, vBumpInfos.y)`\n }, {\n search: /parallaxOcclusion\\(invTBN\\*-viewDirectionW,invTBN\\*normalW,vBumpUV,vBumpInfos.z\\)/g,\n replace: `parallaxOcclusion((invTBN * -viewDirectionW), (invTBN * normalW), vBumpUV, vBumpInfos.z, ${isWebGPU ? useParallax && this.useParallaxOcclusion ? `${normalSamplerName}, ${normalSamplerName + `Sampler`}` : \"bump, bumpSampler\" : useParallax && this.useParallaxOcclusion ? normalSamplerName : \"bumpSampler\"})`\n }, {\n search: /parallaxOffset\\(invTBN\\*viewDirectionW,vBumpInfos\\.z\\)/g,\n replace: `parallaxOffset(invTBN * viewDirectionW, vBumpInfos.z, ${useParallax ? this.parallaxHeight.associatedVariableName : \"0.\"})`\n }, {\n search: /vBumpInfos.y/g,\n replace: replaceForBumpInfos\n }, {\n search: /vBumpInfos.z/g,\n replace: replaceForParallaxInfos\n }, {\n search: /normalW=/g,\n replace: tempOutput + \" = \"\n }, {\n search: /mat3\\(normalMatrix\\)\\*normalW/g,\n replace: `${mat3}(normalMatrix) * ` + tempOutput\n }, {\n search: /normalW/g,\n replace: worldNormal.associatedVariableName + \".xyz\"\n }, {\n search: /viewDirectionW/g,\n replace: useParallax ? this.viewDirection.associatedVariableName : `vec3${fSuffix}(0.)`\n }, tangentReplaceString];\n if (isWebGPU) {\n replaceStrings.push({\n search: /fragmentInputs.vBumpUV/g,\n replace: uv.associatedVariableName\n });\n replaceStrings.push({\n search: /input.vPositionW/g,\n replace: worldPosition.associatedVariableName + \".xyz\"\n });\n replaceStrings.push({\n search: /uniforms.vTangentSpaceParams/g,\n replace: uniformPrefix + this._tangentSpaceParameterName\n });\n replaceStrings.push({\n search: /var TBN: mat3x3f=mat3x3\\(input.vTBN0,input.vTBN1,input.vTBN2\\);/g,\n replace: `var TBN = vTBN;`\n });\n } else {\n replaceStrings.push({\n search: /vBumpUV/g,\n replace: uv.associatedVariableName\n });\n replaceStrings.push({\n search: /vPositionW/g,\n replace: worldPosition.associatedVariableName + \".xyz\"\n });\n replaceStrings.push({\n search: /vTangentSpaceParams/g,\n replace: uniformPrefix + this._tangentSpaceParameterName\n });\n }\n state.compilationString += state._emitCodeFromInclude(\"bumpFragment\", comments, {\n replaceStrings: replaceStrings\n });\n state.compilationString += state._declareOutput(this.output) + ` = vec4${fSuffix}(${tempOutput}, 0.);\\n`;\n return this;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.invertX = ${this.invertX};\\n`;\n codeString += `${this._codeVariableName}.invertY = ${this.invertY};\\n`;\n codeString += `${this._codeVariableName}.useParallaxOcclusion = ${this.useParallaxOcclusion};\\n`;\n codeString += `${this._codeVariableName}.useObjectSpaceNormalMap = ${this.useObjectSpaceNormalMap};\\n`;\n return codeString;\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.invertX = this.invertX;\n serializationObject.invertY = this.invertY;\n serializationObject.useParallaxOcclusion = this.useParallaxOcclusion;\n serializationObject.useObjectSpaceNormalMap = this.useObjectSpaceNormalMap;\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n super._deserialize(serializationObject, scene, rootUrl);\n this.invertX = serializationObject.invertX;\n this.invertY = serializationObject.invertY;\n this.useParallaxOcclusion = !!serializationObject.useParallaxOcclusion;\n this.useObjectSpaceNormalMap = !!serializationObject.useObjectSpaceNormalMap;\n }\n}\n__decorate([editableInPropertyPage(\"Invert X axis\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\", {\n embedded: true,\n notifiers: {\n update: false\n }\n})], PerturbNormalBlock.prototype, \"invertX\", void 0);\n__decorate([editableInPropertyPage(\"Invert Y axis\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\", {\n embedded: true,\n notifiers: {\n update: false\n }\n})], PerturbNormalBlock.prototype, \"invertY\", void 0);\n__decorate([editableInPropertyPage(\"Use parallax occlusion\", 0 /* PropertyTypeForEdition.Boolean */, undefined, {\n embedded: true,\n notifiers: {\n update: false\n }\n})], PerturbNormalBlock.prototype, \"useParallaxOcclusion\", void 0);\n__decorate([editableInPropertyPage(\"Object Space Mode\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\", {\n embedded: true,\n notifiers: {\n update: false\n }\n})], PerturbNormalBlock.prototype, \"useObjectSpaceNormalMap\", void 0);\nRegisterClass(\"BABYLON.PerturbNormalBlock\", PerturbNormalBlock);","map":{"version":3,"names":["__decorate","NodeMaterialBlock","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","RegisterClass","InputBlock","editableInPropertyPage","NodeMaterialConnectionPointCustomObject","TBNBlock","PerturbNormalBlock","constructor","name","Fragment","_tangentSpaceParameterName","_tangentCorrectionFactorName","_worldMatrixName","invertX","invertY","useParallaxOcclusion","useObjectSpaceNormalMap","_isUnique","registerInput","Vector4","Vector2","Color3","Float","Vector3","Object","VertexAndFragment","Matrix","registerOutput","getClassName","worldPosition","_inputs","worldNormal","worldTangent","uv","normalMapColor","strength","viewDirection","parallaxScale","parallaxHeight","TBN","world","output","_outputs","uvOffset","initialize","state","_initShaderSourceAsync","shaderLanguage","_this","_asyncToGenerator","_codeIsReady","Promise","all","onCodeIsReadyObservable","notifyObservers","prepareDefines","mesh","nodeMaterial","defines","normalSamplerName","connectedPoint","_ownerBlock","samplerName","useParallax","isConnected","setValue","getScene","useRightHandedSystem","bind","effect","_mirroredCameraPosition","setFloat2","setFloat","getWorldMatrix","determinant","setMatrix","autoConfigure","material","additionalFilteringInfo","uvInput","getInputBlockByPredicate","b","isAttribute","setAsAttribute","connectTo","strengthInput","value","_buildBlock","comments","isWebGPU","mat3","fSuffix","uniformPrefix","sharedData","blocksWithDefines","push","bindableBlocks","_getFreeDefineName","_emitUniformFromString","replaceForParallaxInfos","isConnectedToInputBlock","connectInputBlock","isConstant","_emitFloat","associatedVariableName","replaceForBumpInfos","_emitExtension","tangentReplaceString","search","replace","tbnVarying","normalMatrixReplaceString","compilationString","_declareLocalVar","replaceStrings","_emitFunctionFromInclude","replaceString0","searchExp0","replaceString1","searchExp1","normalRead","uvForPerturbNormal","tempOutput","_getFreeVariableName","RegExp","_emitCodeFromInclude","_declareOutput","_dumpPropertiesCode","codeString","_codeVariableName","serialize","serializationObject","_deserialize","scene","rootUrl","embedded","notifiers","update","prototype","undefined"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/Fragment/perturbNormalBlock.js"],"sourcesContent":["import { __decorate } from \"../../../../tslib.es6.js\";\nimport { NodeMaterialBlock } from \"../../nodeMaterialBlock.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { InputBlock } from \"../Input/inputBlock.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { NodeMaterialConnectionPointCustomObject } from \"../../nodeMaterialConnectionPointCustomObject.js\";\nimport { TBNBlock } from \"./TBNBlock.js\";\n\n/**\n * Block used to perturb normals based on a normal map\n */\nexport class PerturbNormalBlock extends NodeMaterialBlock {\n /**\n * Create a new PerturbNormalBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Fragment);\n this._tangentSpaceParameterName = \"\";\n this._tangentCorrectionFactorName = \"\";\n this._worldMatrixName = \"\";\n /** Gets or sets a boolean indicating that normal should be inverted on X axis */\n this.invertX = false;\n /** Gets or sets a boolean indicating that normal should be inverted on Y axis */\n this.invertY = false;\n /** Gets or sets a boolean indicating that parallax occlusion should be enabled */\n this.useParallaxOcclusion = false;\n /** Gets or sets a boolean indicating that sampling mode is in Object space */\n this.useObjectSpaceNormalMap = false;\n this._isUnique = true;\n // Vertex\n this.registerInput(\"worldPosition\", NodeMaterialBlockConnectionPointTypes.Vector4, false);\n this.registerInput(\"worldNormal\", NodeMaterialBlockConnectionPointTypes.Vector4, false);\n this.registerInput(\"worldTangent\", NodeMaterialBlockConnectionPointTypes.Vector4, true);\n this.registerInput(\"uv\", NodeMaterialBlockConnectionPointTypes.Vector2, false);\n this.registerInput(\"normalMapColor\", NodeMaterialBlockConnectionPointTypes.Color3, false);\n this.registerInput(\"strength\", NodeMaterialBlockConnectionPointTypes.Float, false);\n this.registerInput(\"viewDirection\", NodeMaterialBlockConnectionPointTypes.Vector3, true);\n this.registerInput(\"parallaxScale\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"parallaxHeight\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"TBN\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"TBN\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, TBNBlock, \"TBNBlock\"));\n this.registerInput(\"world\", NodeMaterialBlockConnectionPointTypes.Matrix, true);\n // Fragment\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.Vector4);\n this.registerOutput(\"uvOffset\", NodeMaterialBlockConnectionPointTypes.Vector2);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"PerturbNormalBlock\";\n }\n /**\n * Gets the world position input component\n */\n get worldPosition() {\n return this._inputs[0];\n }\n /**\n * Gets the world normal input component\n */\n get worldNormal() {\n return this._inputs[1];\n }\n /**\n * Gets the world tangent input component\n */\n get worldTangent() {\n return this._inputs[2];\n }\n /**\n * Gets the uv input component\n */\n get uv() {\n return this._inputs[3];\n }\n /**\n * Gets the normal map color input component\n */\n get normalMapColor() {\n return this._inputs[4];\n }\n /**\n * Gets the strength input component\n */\n get strength() {\n return this._inputs[5];\n }\n /**\n * Gets the view direction input component\n */\n get viewDirection() {\n return this._inputs[6];\n }\n /**\n * Gets the parallax scale input component\n */\n get parallaxScale() {\n return this._inputs[7];\n }\n /**\n * Gets the parallax height input component\n */\n get parallaxHeight() {\n return this._inputs[8];\n }\n /**\n * Gets the TBN input component\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n get TBN() {\n return this._inputs[9];\n }\n /**\n * Gets the World input component\n */\n get world() {\n return this._inputs[10];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n /**\n * Gets the uv offset output component\n */\n get uvOffset() {\n return this._outputs[1];\n }\n initialize(state) {\n this._initShaderSourceAsync(state.shaderLanguage);\n }\n async _initShaderSourceAsync(shaderLanguage) {\n this._codeIsReady = false;\n if (shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n await Promise.all([\n import(\"../../../../ShadersWGSL/ShadersInclude/bumpFragment.js\"),\n import(\"../../../../ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js\"),\n import(\"../../../../ShadersWGSL/ShadersInclude/bumpFragmentFunctions.js\"),\n ]);\n }\n else {\n await Promise.all([\n import(\"../../../../Shaders/ShadersInclude/bumpFragment.js\"),\n import(\"../../../../Shaders/ShadersInclude/bumpFragmentMainFunctions.js\"),\n import(\"../../../../Shaders/ShadersInclude/bumpFragmentFunctions.js\"),\n ]);\n }\n this._codeIsReady = true;\n this.onCodeIsReadyObservable.notifyObservers(this);\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n const normalSamplerName = this.normalMapColor.connectedPoint._ownerBlock.samplerName;\n const useParallax = this.viewDirection.isConnected && ((this.useParallaxOcclusion && normalSamplerName) || (!this.useParallaxOcclusion && this.parallaxHeight.isConnected));\n defines.setValue(\"BUMP\", true);\n defines.setValue(\"PARALLAX\", useParallax, true);\n defines.setValue(\"PARALLAX_RHS\", nodeMaterial.getScene().useRightHandedSystem, true);\n defines.setValue(\"PARALLAXOCCLUSION\", this.useParallaxOcclusion, true);\n defines.setValue(\"OBJECTSPACE_NORMALMAP\", this.useObjectSpaceNormalMap, true);\n }\n bind(effect, nodeMaterial, mesh) {\n if (nodeMaterial.getScene()._mirroredCameraPosition) {\n effect.setFloat2(this._tangentSpaceParameterName, this.invertX ? 1.0 : -1.0, this.invertY ? 1.0 : -1.0);\n }\n else {\n effect.setFloat2(this._tangentSpaceParameterName, this.invertX ? -1.0 : 1.0, this.invertY ? -1.0 : 1.0);\n }\n if (mesh) {\n effect.setFloat(this._tangentCorrectionFactorName, mesh.getWorldMatrix().determinant() < 0 ? -1 : 1);\n if (this.useObjectSpaceNormalMap && !this.world.isConnected) {\n // World default to the mesh world matrix\n effect.setMatrix(this._worldMatrixName, mesh.getWorldMatrix());\n }\n }\n }\n autoConfigure(material, additionalFilteringInfo = () => true) {\n if (!this.uv.isConnected) {\n let uvInput = material.getInputBlockByPredicate((b) => b.isAttribute && b.name === \"uv\" && additionalFilteringInfo(b));\n if (!uvInput) {\n uvInput = new InputBlock(\"uv\");\n uvInput.setAsAttribute();\n }\n uvInput.output.connectTo(this.uv);\n }\n if (!this.strength.isConnected) {\n const strengthInput = new InputBlock(\"strength\");\n strengthInput.value = 1.0;\n strengthInput.output.connectTo(this.strength);\n }\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const comments = `//${this.name}`;\n const uv = this.uv;\n const worldPosition = this.worldPosition;\n const worldNormal = this.worldNormal;\n const worldTangent = this.worldTangent;\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n const mat3 = isWebGPU ? \"mat3x3f\" : \"mat3\";\n const fSuffix = isWebGPU ? \"f\" : \"\";\n const uniformPrefix = isWebGPU ? \"uniforms.\" : \"\";\n state.sharedData.blocksWithDefines.push(this);\n state.sharedData.bindableBlocks.push(this);\n this._tangentSpaceParameterName = state._getFreeDefineName(\"tangentSpaceParameter\");\n state._emitUniformFromString(this._tangentSpaceParameterName, NodeMaterialBlockConnectionPointTypes.Vector2);\n this._tangentCorrectionFactorName = state._getFreeDefineName(\"tangentCorrectionFactor\");\n state._emitUniformFromString(this._tangentCorrectionFactorName, NodeMaterialBlockConnectionPointTypes.Float);\n this._worldMatrixName = state._getFreeDefineName(\"perturbNormalWorldMatrix\");\n state._emitUniformFromString(this._worldMatrixName, NodeMaterialBlockConnectionPointTypes.Matrix);\n let normalSamplerName = null;\n if (this.normalMapColor.connectedPoint) {\n normalSamplerName = this.normalMapColor.connectedPoint._ownerBlock.samplerName;\n }\n const useParallax = this.viewDirection.isConnected && ((this.useParallaxOcclusion && normalSamplerName) || (!this.useParallaxOcclusion && this.parallaxHeight.isConnected));\n const replaceForParallaxInfos = !this.parallaxScale.isConnectedToInputBlock\n ? \"0.05\"\n : this.parallaxScale.connectInputBlock.isConstant\n ? state._emitFloat(this.parallaxScale.connectInputBlock.value)\n : this.parallaxScale.associatedVariableName;\n const replaceForBumpInfos = this.strength.isConnectedToInputBlock && this.strength.connectInputBlock.isConstant\n ? `\\n#if !defined(NORMALXYSCALE)\\n1.0/\\n#endif\\n${state._emitFloat(this.strength.connectInputBlock.value)}`\n : `\\n#if !defined(NORMALXYSCALE)\\n1.0/\\n#endif\\n${this.strength.associatedVariableName}`;\n if (!isWebGPU) {\n state._emitExtension(\"derivatives\", \"#extension GL_OES_standard_derivatives : enable\");\n }\n const tangentReplaceString = { search: /defined\\(TANGENT\\)/g, replace: worldTangent.isConnected ? \"defined(TANGENT)\" : \"defined(IGNORE)\" };\n const tbnVarying = { search: /varying mat3 vTBN;/g, replace: \"\" };\n const normalMatrixReplaceString = { search: /uniform mat4 normalMatrix;/g, replace: \"\" };\n const TBN = this.TBN;\n if (TBN.isConnected) {\n state.compilationString += `\r\n #ifdef TBNBLOCK\r\n ${isWebGPU ? \"var\" : \"mat3\"} vTBN = ${TBN.associatedVariableName};\r\n #endif\r\n `;\n }\n else if (worldTangent.isConnected) {\n state.compilationString += `${state._declareLocalVar(\"tbnNormal\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${worldNormal.associatedVariableName}.xyz);\\n`;\n state.compilationString += `${state._declareLocalVar(\"tbnTangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${worldTangent.associatedVariableName}.xyz);\\n`;\n state.compilationString += `${state._declareLocalVar(\"tbnBitangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = cross(tbnNormal, tbnTangent) * ${isWebGPU ? \"uniforms.\" : \"\"}${this._tangentCorrectionFactorName};\\n`;\n state.compilationString += `${isWebGPU ? \"var\" : \"mat3\"} vTBN = ${mat3}(tbnTangent, tbnBitangent, tbnNormal);\\n`;\n }\n let replaceStrings = [tangentReplaceString, tbnVarying, normalMatrixReplaceString];\n if (isWebGPU) {\n replaceStrings.push({ search: /varying vTBN0: vec3f;/g, replace: \"\" });\n replaceStrings.push({ search: /varying vTBN1: vec3f;/g, replace: \"\" });\n replaceStrings.push({ search: /varying vTBN2: vec3f;/g, replace: \"\" });\n }\n state._emitFunctionFromInclude(\"bumpFragmentMainFunctions\", comments, {\n replaceStrings: replaceStrings,\n });\n const replaceString0 = isWebGPU\n ? \"fn parallaxOcclusion(vViewDirCoT: vec3f, vNormalCoT: vec3f, texCoord: vec2f, parallaxScale:f32, bump: texture_2d, bumpSampler: sampler)\"\n : \"#define inline\\nvec2 parallaxOcclusion(vec3 vViewDirCoT, vec3 vNormalCoT, vec2 texCoord, float parallaxScale, sampler2D bumpSampler)\";\n const searchExp0 = isWebGPU\n ? /fn parallaxOcclusion\\(vViewDirCoT: vec3f,vNormalCoT: vec3f,texCoord: vec2f,parallaxScale: f32\\)/g\n : /vec2 parallaxOcclusion\\(vec3 vViewDirCoT,vec3 vNormalCoT,vec2 texCoord,float parallaxScale\\)/g;\n const replaceString1 = isWebGPU\n ? \"fn parallaxOffset(viewDir: vec3f, heightScale: f32, height_: f32)\"\n : \"vec2 parallaxOffset(vec3 viewDir, float heightScale, float height_)\";\n const searchExp1 = isWebGPU ? /fn parallaxOffset\\(viewDir: vec3f,heightScale: f32\\)/g : /vec2 parallaxOffset\\(vec3 viewDir,float heightScale\\)/g;\n state._emitFunctionFromInclude(\"bumpFragmentFunctions\", comments, {\n replaceStrings: [\n { search: /#include\\(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_SAMPLERNAME_,bump\\)/g, replace: \"\" },\n { search: /uniform sampler2D bumpSampler;/g, replace: \"\" },\n {\n search: searchExp0,\n replace: replaceString0,\n },\n { search: searchExp1, replace: replaceString1 },\n { search: /texture.+?bumpSampler,vBumpUV\\)\\.w/g, replace: \"height_\" },\n ],\n });\n const normalRead = isWebGPU ? `textureSample(${normalSamplerName}, ${normalSamplerName + `Sampler`}` : `texture2D(${normalSamplerName}`;\n const uvForPerturbNormal = !useParallax || !normalSamplerName ? this.normalMapColor.associatedVariableName : `${normalRead}, ${uv.associatedVariableName} + uvOffset).xyz`;\n const tempOutput = state._getFreeVariableName(\"tempOutput\");\n state.compilationString += state._declareLocalVar(tempOutput, NodeMaterialBlockConnectionPointTypes.Vector3) + ` = vec3${fSuffix}(0.);\\n`;\n replaceStrings = [\n { search: new RegExp(`texture.+?bumpSampler${isWebGPU ? \"Sampler,fragmentInputs.\" : \",\"}vBumpUV\\\\)`, \"g\"), replace: `${uvForPerturbNormal}` },\n {\n search: /#define CUSTOM_FRAGMENT_BUMP_FRAGMENT/g,\n replace: `${state._declareLocalVar(\"normalMatrix\", NodeMaterialBlockConnectionPointTypes.Matrix)} = toNormalMatrix(${this.world.isConnected ? this.world.associatedVariableName : this._worldMatrixName});`,\n },\n {\n search: new RegExp(`perturbNormal\\\\(TBN,texture.+?bumpSampler${isWebGPU ? \"Sampler,fragmentInputs.\" : \",\"}vBumpUV\\\\+uvOffset\\\\).xyz,${isWebGPU ? \"uniforms.\" : \"\"}vBumpInfos.y\\\\)`, \"g\"),\n replace: `perturbNormal(TBN, ${uvForPerturbNormal}, vBumpInfos.y)`,\n },\n {\n search: /parallaxOcclusion\\(invTBN\\*-viewDirectionW,invTBN\\*normalW,vBumpUV,vBumpInfos.z\\)/g,\n replace: `parallaxOcclusion((invTBN * -viewDirectionW), (invTBN * normalW), vBumpUV, vBumpInfos.z, ${isWebGPU\n ? useParallax && this.useParallaxOcclusion\n ? `${normalSamplerName}, ${normalSamplerName + `Sampler`}`\n : \"bump, bumpSampler\"\n : useParallax && this.useParallaxOcclusion\n ? normalSamplerName\n : \"bumpSampler\"})`,\n },\n {\n search: /parallaxOffset\\(invTBN\\*viewDirectionW,vBumpInfos\\.z\\)/g,\n replace: `parallaxOffset(invTBN * viewDirectionW, vBumpInfos.z, ${useParallax ? this.parallaxHeight.associatedVariableName : \"0.\"})`,\n },\n { search: /vBumpInfos.y/g, replace: replaceForBumpInfos },\n { search: /vBumpInfos.z/g, replace: replaceForParallaxInfos },\n { search: /normalW=/g, replace: tempOutput + \" = \" },\n { search: /mat3\\(normalMatrix\\)\\*normalW/g, replace: `${mat3}(normalMatrix) * ` + tempOutput },\n { search: /normalW/g, replace: worldNormal.associatedVariableName + \".xyz\" },\n { search: /viewDirectionW/g, replace: useParallax ? this.viewDirection.associatedVariableName : `vec3${fSuffix}(0.)` },\n tangentReplaceString,\n ];\n if (isWebGPU) {\n replaceStrings.push({ search: /fragmentInputs.vBumpUV/g, replace: uv.associatedVariableName });\n replaceStrings.push({ search: /input.vPositionW/g, replace: worldPosition.associatedVariableName + \".xyz\" });\n replaceStrings.push({ search: /uniforms.vTangentSpaceParams/g, replace: uniformPrefix + this._tangentSpaceParameterName });\n replaceStrings.push({ search: /var TBN: mat3x3f=mat3x3\\(input.vTBN0,input.vTBN1,input.vTBN2\\);/g, replace: `var TBN = vTBN;` });\n }\n else {\n replaceStrings.push({ search: /vBumpUV/g, replace: uv.associatedVariableName });\n replaceStrings.push({ search: /vPositionW/g, replace: worldPosition.associatedVariableName + \".xyz\" });\n replaceStrings.push({ search: /vTangentSpaceParams/g, replace: uniformPrefix + this._tangentSpaceParameterName });\n }\n state.compilationString += state._emitCodeFromInclude(\"bumpFragment\", comments, {\n replaceStrings: replaceStrings,\n });\n state.compilationString += state._declareOutput(this.output) + ` = vec4${fSuffix}(${tempOutput}, 0.);\\n`;\n return this;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.invertX = ${this.invertX};\\n`;\n codeString += `${this._codeVariableName}.invertY = ${this.invertY};\\n`;\n codeString += `${this._codeVariableName}.useParallaxOcclusion = ${this.useParallaxOcclusion};\\n`;\n codeString += `${this._codeVariableName}.useObjectSpaceNormalMap = ${this.useObjectSpaceNormalMap};\\n`;\n return codeString;\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.invertX = this.invertX;\n serializationObject.invertY = this.invertY;\n serializationObject.useParallaxOcclusion = this.useParallaxOcclusion;\n serializationObject.useObjectSpaceNormalMap = this.useObjectSpaceNormalMap;\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n super._deserialize(serializationObject, scene, rootUrl);\n this.invertX = serializationObject.invertX;\n this.invertY = serializationObject.invertY;\n this.useParallaxOcclusion = !!serializationObject.useParallaxOcclusion;\n this.useObjectSpaceNormalMap = !!serializationObject.useObjectSpaceNormalMap;\n }\n}\n__decorate([\n editableInPropertyPage(\"Invert X axis\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\", { embedded: true, notifiers: { update: false } })\n], PerturbNormalBlock.prototype, \"invertX\", void 0);\n__decorate([\n editableInPropertyPage(\"Invert Y axis\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\", { embedded: true, notifiers: { update: false } })\n], PerturbNormalBlock.prototype, \"invertY\", void 0);\n__decorate([\n editableInPropertyPage(\"Use parallax occlusion\", 0 /* PropertyTypeForEdition.Boolean */, undefined, { embedded: true, notifiers: { update: false } })\n], PerturbNormalBlock.prototype, \"useParallaxOcclusion\", void 0);\n__decorate([\n editableInPropertyPage(\"Object Space Mode\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\", { embedded: true, notifiers: { update: false } })\n], PerturbNormalBlock.prototype, \"useObjectSpaceNormalMap\", void 0);\nRegisterClass(\"BABYLON.PerturbNormalBlock\", PerturbNormalBlock);\n"],"mappings":";AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,qCAAqC,QAAQ,sDAAsD;AAC5G,SAASC,wBAAwB,QAAQ,yCAAyC;AAClF,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,sBAAsB,QAAQ,yCAAyC;AAChF,SAASC,uCAAuC,QAAQ,kDAAkD;AAC1G,SAASC,QAAQ,QAAQ,eAAe;;AAExC;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,SAASR,iBAAiB,CAAC;EACtD;AACJ;AACA;AACA;EACIS,WAAWA,CAACC,IAAI,EAAE;IACd,KAAK,CAACA,IAAI,EAAER,wBAAwB,CAACS,QAAQ,CAAC;IAC9C,IAAI,CAACC,0BAA0B,GAAG,EAAE;IACpC,IAAI,CA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