{"ast":null,"code":"import { NodeMaterialBlock } from \"../../nodeMaterialBlock.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 { NodeMaterialSystemValues } from \"../../Enums/nodeMaterialSystemValues.js\";\nimport { InputBlock } from \"../Input/inputBlock.js\";\n/**\n * Block used to implement TBN matrix\n */\nexport class TBNBlock extends NodeMaterialBlock {\n /**\n * Create a new TBNBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Fragment, true);\n this.registerInput(\"normal\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false);\n this.normal.addExcludedConnectionPointFromAllowedTypes(NodeMaterialBlockConnectionPointTypes.Color4 | NodeMaterialBlockConnectionPointTypes.Vector4 | NodeMaterialBlockConnectionPointTypes.Vector3);\n this.registerInput(\"tangent\", NodeMaterialBlockConnectionPointTypes.Vector4, false);\n this.registerInput(\"world\", NodeMaterialBlockConnectionPointTypes.Matrix, false);\n this.registerOutput(\"TBN\", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.Fragment, new NodeMaterialConnectionPointCustomObject(\"TBN\", this, 1 /* NodeMaterialConnectionPointDirection.Output */, TBNBlock, \"TBNBlock\"));\n this.registerOutput(\"row0\", NodeMaterialBlockConnectionPointTypes.Vector3, NodeMaterialBlockTargets.Fragment);\n this.registerOutput(\"row1\", NodeMaterialBlockConnectionPointTypes.Vector3, NodeMaterialBlockTargets.Fragment);\n this.registerOutput(\"row2\", NodeMaterialBlockConnectionPointTypes.Vector3, NodeMaterialBlockTargets.Fragment);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"TBNBlock\";\n }\n /**\n * Initialize the block and prepare the context for build\n * @param state defines the state that will be used for the build\n */\n initialize(state) {\n state._excludeVariableName(\"tbnNormal\");\n state._excludeVariableName(\"tbnTangent\");\n state._excludeVariableName(\"tbnBitangent\");\n state._excludeVariableName(\"TBN\");\n }\n /**\n * Gets the normal input component\n */\n get normal() {\n return this._inputs[0];\n }\n /**\n * Gets the tangent input component\n */\n get tangent() {\n return this._inputs[1];\n }\n /**\n * Gets the world matrix input component\n */\n get world() {\n return this._inputs[2];\n }\n /**\n * Gets the TBN output component\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n get TBN() {\n return this._outputs[0];\n }\n /**\n * Gets the row0 of the output matrix\n */\n get row0() {\n return this._outputs[1];\n }\n /**\n * Gets the row1 of the output matrix\n */\n get row1() {\n return this._outputs[2];\n }\n /**\n * Gets the row2 of the output matrix\n */\n get row2() {\n return this._outputs[3];\n }\n get target() {\n return NodeMaterialBlockTargets.Fragment;\n }\n set target(value) {}\n autoConfigure(material, additionalFilteringInfo = () => true) {\n if (!this.world.isConnected) {\n let worldInput = material.getInputBlockByPredicate(b => b.isSystemValue && b.systemValue === NodeMaterialSystemValues.World && additionalFilteringInfo(b));\n if (!worldInput) {\n worldInput = new InputBlock(\"world\");\n worldInput.setAsSystemValue(NodeMaterialSystemValues.World);\n }\n worldInput.output.connectTo(this.world);\n }\n if (!this.normal.isConnected) {\n let normalInput = material.getInputBlockByPredicate(b => b.isAttribute && b.name === \"normal\" && additionalFilteringInfo(b));\n if (!normalInput) {\n normalInput = new InputBlock(\"normal\");\n normalInput.setAsAttribute(\"normal\");\n }\n normalInput.output.connectTo(this.normal);\n }\n if (!this.tangent.isConnected) {\n let tangentInput = material.getInputBlockByPredicate(b => b.isAttribute && b.name === \"tangent\" && b.type === NodeMaterialBlockConnectionPointTypes.Vector4 && additionalFilteringInfo(b));\n if (!tangentInput) {\n tangentInput = new InputBlock(\"tangent\");\n tangentInput.setAsAttribute(\"tangent\");\n }\n tangentInput.output.connectTo(this.tangent);\n }\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n var _normal$connectInputB, _normal$connectInputB2, _tangent$connectInput, _tangent$connectInput2;\n const normal = this.normal;\n const tangent = this.tangent;\n let normalAvailable = normal.isConnected;\n if ((_normal$connectInputB = normal.connectInputBlock) !== null && _normal$connectInputB !== void 0 && _normal$connectInputB.isAttribute && !mesh.isVerticesDataPresent((_normal$connectInputB2 = normal.connectInputBlock) === null || _normal$connectInputB2 === void 0 ? void 0 : _normal$connectInputB2.name)) {\n normalAvailable = false;\n }\n let tangentAvailable = tangent.isConnected;\n if ((_tangent$connectInput = tangent.connectInputBlock) !== null && _tangent$connectInput !== void 0 && _tangent$connectInput.isAttribute && !mesh.isVerticesDataPresent((_tangent$connectInput2 = tangent.connectInputBlock) === null || _tangent$connectInput2 === void 0 ? void 0 : _tangent$connectInput2.name)) {\n tangentAvailable = false;\n }\n const useTBNBlock = normalAvailable && tangentAvailable;\n defines.setValue(\"TBNBLOCK\", useTBNBlock, true);\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const normal = this.normal;\n const tangent = this.tangent;\n const world = this.world;\n const TBN = this.TBN;\n const row0 = this.row0;\n const row1 = this.row1;\n const row2 = this.row2;\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n const mat3 = isWebGPU ? \"mat3x3f\" : \"mat3\";\n const fSuffix = isWebGPU ? \"f\" : \"\";\n // Fragment\n if (state.target === NodeMaterialBlockTargets.Fragment) {\n state.compilationString += `\n // ${this.name}\n ${state._declareLocalVar(\"tbnNormal\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${normal.associatedVariableName}).xyz;\n ${state._declareLocalVar(\"tbnTangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${tangent.associatedVariableName}.xyz);\n ${state._declareLocalVar(\"tbnBitangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = cross(tbnNormal, tbnTangent) * ${tangent.associatedVariableName}.w;\n ${isWebGPU ? \"var\" : \"mat3\"} ${TBN.associatedVariableName} = ${mat3}(${world.associatedVariableName}[0].xyz, ${world.associatedVariableName}[1].xyz, ${world.associatedVariableName}[2].xyz) * ${mat3}(tbnTangent, tbnBitangent, tbnNormal);\n `;\n if (row0.hasEndpoints) {\n state.compilationString += state._declareOutput(row0) + ` = vec3${fSuffix}(${TBN.associatedVariableName}[0][0], ${TBN.associatedVariableName}[0][1], ${TBN.associatedVariableName}[0][2]);\\n`;\n }\n if (row1.hasEndpoints) {\n state.compilationString += state._declareOutput(row1) + ` = vec3${fSuffix}(${TBN.associatedVariableName}[1[0], ${TBN.associatedVariableName}[1][1], ${TBN.associatedVariableName}[1][2]);\\n`;\n }\n if (row2.hasEndpoints) {\n state.compilationString += state._declareOutput(row2) + ` = vec3${fSuffix}(${TBN.associatedVariableName}[2][0], ${TBN.associatedVariableName}[2][1], ${TBN.associatedVariableName}[2][2]);\\n`;\n }\n state.sharedData.blocksWithDefines.push(this);\n }\n return this;\n }\n}\nRegisterClass(\"BABYLON.TBNBlock\", TBNBlock);","map":{"version":3,"names":["NodeMaterialBlock","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","RegisterClass","NodeMaterialConnectionPointCustomObject","NodeMaterialSystemValues","InputBlock","TBNBlock","constructor","name","Fragment","registerInput","AutoDetect","normal","addExcludedConnectionPointFromAllowedTypes","Color4","Vector4","Vector3","Matrix","registerOutput","Object","getClassName","initialize","state","_excludeVariableName","_inputs","tangent","world","TBN","_outputs","row0","row1","row2","target","value","autoConfigure","material","additionalFilteringInfo","isConnected","worldInput","getInputBlockByPredicate","b","isSystemValue","systemValue","World","setAsSystemValue","output","connectTo","normalInput","isAttribute","setAsAttribute","tangentInput","type","prepareDefines","mesh","nodeMaterial","defines","_normal$connectInputB","_normal$connectInputB2","_tangent$connectInput","_tangent$connectInput2","normalAvailable","connectInputBlock","isVerticesDataPresent","tangentAvailable","useTBNBlock","setValue","_buildBlock","isWebGPU","shaderLanguage","mat3","fSuffix","compilationString","_declareLocalVar","associatedVariableName","hasEndpoints","_declareOutput","sharedData","blocksWithDefines","push"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/Fragment/TBNBlock.js"],"sourcesContent":["import { NodeMaterialBlock } from \"../../nodeMaterialBlock.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 { NodeMaterialSystemValues } from \"../../Enums/nodeMaterialSystemValues.js\";\nimport { InputBlock } from \"../Input/inputBlock.js\";\n/**\n * Block used to implement TBN matrix\n */\nexport class TBNBlock extends NodeMaterialBlock {\n /**\n * Create a new TBNBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Fragment, true);\n this.registerInput(\"normal\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false);\n this.normal.addExcludedConnectionPointFromAllowedTypes(NodeMaterialBlockConnectionPointTypes.Color4 | NodeMaterialBlockConnectionPointTypes.Vector4 | NodeMaterialBlockConnectionPointTypes.Vector3);\n this.registerInput(\"tangent\", NodeMaterialBlockConnectionPointTypes.Vector4, false);\n this.registerInput(\"world\", NodeMaterialBlockConnectionPointTypes.Matrix, false);\n this.registerOutput(\"TBN\", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.Fragment, new NodeMaterialConnectionPointCustomObject(\"TBN\", this, 1 /* NodeMaterialConnectionPointDirection.Output */, TBNBlock, \"TBNBlock\"));\n this.registerOutput(\"row0\", NodeMaterialBlockConnectionPointTypes.Vector3, NodeMaterialBlockTargets.Fragment);\n this.registerOutput(\"row1\", NodeMaterialBlockConnectionPointTypes.Vector3, NodeMaterialBlockTargets.Fragment);\n this.registerOutput(\"row2\", NodeMaterialBlockConnectionPointTypes.Vector3, NodeMaterialBlockTargets.Fragment);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"TBNBlock\";\n }\n /**\n * Initialize the block and prepare the context for build\n * @param state defines the state that will be used for the build\n */\n initialize(state) {\n state._excludeVariableName(\"tbnNormal\");\n state._excludeVariableName(\"tbnTangent\");\n state._excludeVariableName(\"tbnBitangent\");\n state._excludeVariableName(\"TBN\");\n }\n /**\n * Gets the normal input component\n */\n get normal() {\n return this._inputs[0];\n }\n /**\n * Gets the tangent input component\n */\n get tangent() {\n return this._inputs[1];\n }\n /**\n * Gets the world matrix input component\n */\n get world() {\n return this._inputs[2];\n }\n /**\n * Gets the TBN output component\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n get TBN() {\n return this._outputs[0];\n }\n /**\n * Gets the row0 of the output matrix\n */\n get row0() {\n return this._outputs[1];\n }\n /**\n * Gets the row1 of the output matrix\n */\n get row1() {\n return this._outputs[2];\n }\n /**\n * Gets the row2 of the output matrix\n */\n get row2() {\n return this._outputs[3];\n }\n get target() {\n return NodeMaterialBlockTargets.Fragment;\n }\n set target(value) { }\n autoConfigure(material, additionalFilteringInfo = () => true) {\n if (!this.world.isConnected) {\n let worldInput = material.getInputBlockByPredicate((b) => b.isSystemValue && b.systemValue === NodeMaterialSystemValues.World && additionalFilteringInfo(b));\n if (!worldInput) {\n worldInput = new InputBlock(\"world\");\n worldInput.setAsSystemValue(NodeMaterialSystemValues.World);\n }\n worldInput.output.connectTo(this.world);\n }\n if (!this.normal.isConnected) {\n let normalInput = material.getInputBlockByPredicate((b) => b.isAttribute && b.name === \"normal\" && additionalFilteringInfo(b));\n if (!normalInput) {\n normalInput = new InputBlock(\"normal\");\n normalInput.setAsAttribute(\"normal\");\n }\n normalInput.output.connectTo(this.normal);\n }\n if (!this.tangent.isConnected) {\n let tangentInput = material.getInputBlockByPredicate((b) => b.isAttribute && b.name === \"tangent\" && b.type === NodeMaterialBlockConnectionPointTypes.Vector4 && additionalFilteringInfo(b));\n if (!tangentInput) {\n tangentInput = new InputBlock(\"tangent\");\n tangentInput.setAsAttribute(\"tangent\");\n }\n tangentInput.output.connectTo(this.tangent);\n }\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n const normal = this.normal;\n const tangent = this.tangent;\n let normalAvailable = normal.isConnected;\n if (normal.connectInputBlock?.isAttribute && !mesh.isVerticesDataPresent(normal.connectInputBlock?.name)) {\n normalAvailable = false;\n }\n let tangentAvailable = tangent.isConnected;\n if (tangent.connectInputBlock?.isAttribute && !mesh.isVerticesDataPresent(tangent.connectInputBlock?.name)) {\n tangentAvailable = false;\n }\n const useTBNBlock = normalAvailable && tangentAvailable;\n defines.setValue(\"TBNBLOCK\", useTBNBlock, true);\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const normal = this.normal;\n const tangent = this.tangent;\n const world = this.world;\n const TBN = this.TBN;\n const row0 = this.row0;\n const row1 = this.row1;\n const row2 = this.row2;\n const isWebGPU = state.shaderLanguage === 1 /* ShaderLanguage.WGSL */;\n const mat3 = isWebGPU ? \"mat3x3f\" : \"mat3\";\n const fSuffix = isWebGPU ? \"f\" : \"\";\n // Fragment\n if (state.target === NodeMaterialBlockTargets.Fragment) {\n state.compilationString += `\r\n // ${this.name}\r\n ${state._declareLocalVar(\"tbnNormal\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${normal.associatedVariableName}).xyz;\r\n ${state._declareLocalVar(\"tbnTangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = normalize(${tangent.associatedVariableName}.xyz);\r\n ${state._declareLocalVar(\"tbnBitangent\", NodeMaterialBlockConnectionPointTypes.Vector3)} = cross(tbnNormal, tbnTangent) * ${tangent.associatedVariableName}.w;\r\n ${isWebGPU ? \"var\" : \"mat3\"} ${TBN.associatedVariableName} = ${mat3}(${world.associatedVariableName}[0].xyz, ${world.associatedVariableName}[1].xyz, ${world.associatedVariableName}[2].xyz) * ${mat3}(tbnTangent, tbnBitangent, tbnNormal);\r\n `;\n if (row0.hasEndpoints) {\n state.compilationString +=\n state._declareOutput(row0) +\n ` = vec3${fSuffix}(${TBN.associatedVariableName}[0][0], ${TBN.associatedVariableName}[0][1], ${TBN.associatedVariableName}[0][2]);\\n`;\n }\n if (row1.hasEndpoints) {\n state.compilationString +=\n state._declareOutput(row1) +\n ` = vec3${fSuffix}(${TBN.associatedVariableName}[1[0], ${TBN.associatedVariableName}[1][1], ${TBN.associatedVariableName}[1][2]);\\n`;\n }\n if (row2.hasEndpoints) {\n state.compilationString +=\n state._declareOutput(row2) +\n ` = vec3${fSuffix}(${TBN.associatedVariableName}[2][0], ${TBN.associatedVariableName}[2][1], ${TBN.associatedVariableName}[2][2]);\\n`;\n }\n state.sharedData.blocksWithDefines.push(this);\n }\n return this;\n }\n}\nRegisterClass(\"BABYLON.TBNBlock\", TBNBlock);\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,qCAAqC,QAAQ,sDAAsD;AAC5G,SAASC,wBAAwB,QAAQ,yCAAyC;AAClF,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,uCAAuC,QAAQ,kDAAkD;AAC1G,SAASC,wBAAwB,QAAQ,yCAAyC;AAClF,SAASC,UAAU,QAAQ,wBAAwB;AACnD;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,SAASP,iBAAiB,CAAC;EAC5C;AACJ;AACA;AACA;EACIQ,WAAWA,CAACC,IAAI,EAAE;IACd,KAAK,CAACA,IAAI,EAAEP,wBAAwB,CAACQ,QAAQ,EAAE,IAAI,CAAC;IACpD,IAAI,CAACC,aAAa,CAAC,QAAQ,EAAEV,qCAAqC,CAACW,UAAU,EAAE,KAAK,CAAC;IACrF,IAAI,CAACC,MAAM,CAACC,0CAA0C,CAACb,qCAAqC,CAACc,MAAM,GAAGd,qCAAqC,CAACe,OAAO,GAAGf,qCAAqC,CAACgB,OAAO,CAAC;IACpM,IAAI,CAACN,aAAa,CAAC,SAAS,EAAEV,qCAAq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