1 |
- {"ast":null,"code":"import { __decorate } from \"../../../tslib.es6.js\";\nimport { NodeMaterialBlock } from \"../nodeMaterialBlock.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../Enums/nodeMaterialBlockTargets.js\";\nimport { NodeMaterial } from \"../nodeMaterial.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { Texture } from \"../../Textures/texture.js\";\nimport \"../../../Shaders/ShadersInclude/helperFunctions.js\";\nimport { ImageSourceBlock } from \"./Dual/imageSourceBlock.js\";\nimport { NodeMaterialConnectionPointCustomObject } from \"../nodeMaterialConnectionPointCustomObject.js\";\nimport { EngineStore } from \"../../../Engines/engineStore.js\";\nimport { editableInPropertyPage } from \"../../../Decorators/nodeDecorator.js\";\n/**\n * Block used to read a texture with triplanar mapping (see \"boxmap\" in https://iquilezles.org/articles/biplanar/)\n */\nexport class TriPlanarBlock extends NodeMaterialBlock {\n /**\n * Gets or sets the texture associated with the node\n */\n get texture() {\n if (this.source.isConnected) {\n var _this$source$connecte;\n return ((_this$source$connecte = this.source.connectedPoint) === null || _this$source$connecte === void 0 ? void 0 : _this$source$connecte.ownerBlock).texture;\n }\n return this._texture;\n }\n set texture(texture) {\n var _texture$getScene;\n if (this._texture === texture) {\n return;\n }\n const scene = (_texture$getScene = texture === null || texture === void 0 ? void 0 : texture.getScene()) !== null && _texture$getScene !== void 0 ? _texture$getScene : EngineStore.LastCreatedScene;\n if (!texture && scene) {\n scene.markAllMaterialsAsDirty(1, mat => {\n return mat.hasTexture(this._texture);\n });\n }\n this._texture = texture;\n if (texture && scene) {\n scene.markAllMaterialsAsDirty(1, mat => {\n return mat.hasTexture(texture);\n });\n }\n }\n /**\n * Gets the textureY associated with the node\n */\n get textureY() {\n if (this.sourceY.isConnected) {\n var _this$sourceY$connect;\n return ((_this$sourceY$connect = this.sourceY.connectedPoint) === null || _this$sourceY$connect === void 0 ? void 0 : _this$sourceY$connect.ownerBlock).texture;\n }\n return null;\n }\n /**\n * Gets the textureZ associated with the node\n */\n get textureZ() {\n var _this$sourceZ;\n if ((_this$sourceZ = this.sourceZ) !== null && _this$sourceZ !== void 0 && _this$sourceZ.isConnected) {\n var _this$sourceY$connect2;\n return ((_this$sourceY$connect2 = this.sourceY.connectedPoint) === null || _this$sourceY$connect2 === void 0 ? void 0 : _this$sourceY$connect2.ownerBlock).texture;\n }\n return null;\n }\n _getImageSourceBlock(connectionPoint) {\n return connectionPoint !== null && connectionPoint !== void 0 && connectionPoint.isConnected ? connectionPoint.connectedPoint.ownerBlock : null;\n }\n /**\n * Gets the sampler name associated with this texture\n */\n get samplerName() {\n const imageSourceBlock = this._getImageSourceBlock(this.source);\n if (imageSourceBlock) {\n return imageSourceBlock.samplerName;\n }\n return this._samplerName;\n }\n /**\n * Gets the samplerY name associated with this texture\n */\n get samplerYName() {\n var _this$_getImageSource, _this$_getImageSource2;\n return (_this$_getImageSource = (_this$_getImageSource2 = this._getImageSourceBlock(this.sourceY)) === null || _this$_getImageSource2 === void 0 ? void 0 : _this$_getImageSource2.samplerName) !== null && _this$_getImageSource !== void 0 ? _this$_getImageSource : null;\n }\n /**\n * Gets the samplerZ name associated with this texture\n */\n get samplerZName() {\n var _this$_getImageSource3, _this$_getImageSource4;\n return (_this$_getImageSource3 = (_this$_getImageSource4 = this._getImageSourceBlock(this.sourceZ)) === null || _this$_getImageSource4 === void 0 ? void 0 : _this$_getImageSource4.samplerName) !== null && _this$_getImageSource3 !== void 0 ? _this$_getImageSource3 : null;\n }\n /**\n * Gets a boolean indicating that this block is linked to an ImageSourceBlock\n */\n get hasImageSource() {\n return this.source.isConnected;\n }\n /**\n * Gets or sets a boolean indicating if content needs to be converted to gamma space\n */\n set convertToGammaSpace(value) {\n if (value === this._convertToGammaSpace) {\n return;\n }\n this._convertToGammaSpace = value;\n if (this.texture) {\n var _this$texture$getScen;\n const scene = (_this$texture$getScen = this.texture.getScene()) !== null && _this$texture$getScen !== void 0 ? _this$texture$getScen : EngineStore.LastCreatedScene;\n scene === null || scene === void 0 || scene.markAllMaterialsAsDirty(1, mat => {\n return mat.hasTexture(this.texture);\n });\n }\n }\n get convertToGammaSpace() {\n return this._convertToGammaSpace;\n }\n /**\n * Gets or sets a boolean indicating if content needs to be converted to linear space\n */\n set convertToLinearSpace(value) {\n if (value === this._convertToLinearSpace) {\n return;\n }\n this._convertToLinearSpace = value;\n if (this.texture) {\n var _this$texture$getScen2;\n const scene = (_this$texture$getScen2 = this.texture.getScene()) !== null && _this$texture$getScen2 !== void 0 ? _this$texture$getScen2 : EngineStore.LastCreatedScene;\n scene === null || scene === void 0 || scene.markAllMaterialsAsDirty(1, mat => {\n return mat.hasTexture(this.texture);\n });\n }\n }\n get convertToLinearSpace() {\n return this._convertToLinearSpace;\n }\n /**\n * Create a new TriPlanarBlock\n * @param name defines the block name\n * @param hideSourceZ defines a boolean indicating that normal Z should not be used (false by default)\n */\n constructor(name, hideSourceZ = false) {\n super(name, NodeMaterialBlockTargets.Neutral);\n /**\n * Project the texture(s) for a better fit to a cube\n */\n this.projectAsCube = false;\n this._convertToGammaSpace = false;\n this._convertToLinearSpace = false;\n /**\n * Gets or sets a boolean indicating if multiplication of texture with level should be disabled\n */\n this.disableLevelMultiplication = false;\n this.registerInput(\"position\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false);\n this.registerInput(\"normal\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false);\n this.registerInput(\"sharpness\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"source\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"source\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, ImageSourceBlock, \"ImageSourceBlock\"));\n this.registerInput(\"sourceY\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"sourceY\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, ImageSourceBlock, \"ImageSourceBlock\"));\n if (!hideSourceZ) {\n this.registerInput(\"sourceZ\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"sourceZ\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, ImageSourceBlock, \"ImageSourceBlock\"));\n }\n this.registerOutput(\"rgba\", NodeMaterialBlockConnectionPointTypes.Color4, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"rgb\", NodeMaterialBlockConnectionPointTypes.Color3, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"r\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"g\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"b\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"a\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"level\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this._inputs[0].addExcludedConnectionPointFromAllowedTypes(NodeMaterialBlockConnectionPointTypes.Color3 | NodeMaterialBlockConnectionPointTypes.Vector3 | NodeMaterialBlockConnectionPointTypes.Vector4);\n this._inputs[1].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 \"TriPlanarBlock\";\n }\n /**\n * Gets the position input component\n */\n get position() {\n return this._inputs[0];\n }\n /**\n * Gets the normal input component\n */\n get normal() {\n return this._inputs[1];\n }\n /**\n * Gets the sharpness input component\n */\n get sharpness() {\n return this._inputs[2];\n }\n /**\n * Gets the source input component\n */\n get source() {\n return this._inputs[3];\n }\n /**\n * Gets the sourceY input component\n */\n get sourceY() {\n return this._inputs[4];\n }\n /**\n * Gets the sourceZ input component\n */\n get sourceZ() {\n return this._inputs[5];\n }\n /**\n * Gets the rgba output component\n */\n get rgba() {\n return this._outputs[0];\n }\n /**\n * Gets the rgb output component\n */\n get rgb() {\n return this._outputs[1];\n }\n /**\n * Gets the r output component\n */\n get r() {\n return this._outputs[2];\n }\n /**\n * Gets the g output component\n */\n get g() {\n return this._outputs[3];\n }\n /**\n * Gets the b output component\n */\n get b() {\n return this._outputs[4];\n }\n /**\n * Gets the a output component\n */\n get a() {\n return this._outputs[5];\n }\n /**\n * Gets the level output component\n */\n get level() {\n return this._outputs[6];\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n if (!defines._areTexturesDirty) {\n return;\n }\n const toGamma = this.convertToGammaSpace && this.texture && !this.texture.gammaSpace;\n const toLinear = this.convertToLinearSpace && this.texture && this.texture.gammaSpace;\n // Not a bug... Name defines the texture space not the required conversion\n defines.setValue(this._linearDefineName, toGamma, true);\n defines.setValue(this._gammaDefineName, toLinear, true);\n }\n isReady() {\n if (this.texture && !this.texture.isReadyOrNotBlocking()) {\n return false;\n }\n return true;\n }\n bind(effect) {\n if (!this.texture) {\n return;\n }\n effect.setFloat(this._textureInfoName, this.texture.level);\n if (!this._imageSource) {\n effect.setTexture(this._samplerName, this.texture);\n }\n }\n _samplerFunc(state) {\n if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n return \"textureSample\";\n }\n return \"texture2D\";\n }\n _generateTextureSample(textureName, uv, state) {\n if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n return `${this._samplerFunc(state)}(${textureName},${textureName + `Sampler`}, ${uv})`;\n }\n return `${this._samplerFunc(state)}(${textureName}, ${uv})`;\n }\n _generateTextureLookup(state) {\n var _this$samplerYName, _this$samplerZName;\n const samplerName = this.samplerName;\n const samplerYName = (_this$samplerYName = this.samplerYName) !== null && _this$samplerYName !== void 0 ? _this$samplerYName : samplerName;\n const samplerZName = (_this$samplerZName = this.samplerZName) !== null && _this$samplerZName !== void 0 ? _this$samplerZName : samplerName;\n const sharpness = this.sharpness.isConnected ? this.sharpness.associatedVariableName : \"1.0\";\n const x = state._getFreeVariableName(\"x\");\n const y = state._getFreeVariableName(\"y\");\n const z = state._getFreeVariableName(\"z\");\n const w = state._getFreeVariableName(\"w\");\n const n = state._getFreeVariableName(\"n\");\n const uvx = state._getFreeVariableName(\"uvx\");\n const uvy = state._getFreeVariableName(\"uvy\");\n const uvz = state._getFreeVariableName(\"uvz\");\n state.compilationString += `\n ${state._declareLocalVar(n, NodeMaterialBlockConnectionPointTypes.Vector3)} = ${this.normal.associatedVariableName}.xyz;\n\n ${state._declareLocalVar(uvx, NodeMaterialBlockConnectionPointTypes.Vector2)} = ${this.position.associatedVariableName}.yz;\n ${state._declareLocalVar(uvy, NodeMaterialBlockConnectionPointTypes.Vector2)} = ${this.position.associatedVariableName}.zx;\n ${state._declareLocalVar(uvz, NodeMaterialBlockConnectionPointTypes.Vector2)} = ${this.position.associatedVariableName}.xy;\n `;\n if (this.projectAsCube) {\n state.compilationString += `\n ${uvx}.xy = ${uvx}.yx;\n\n if (${n}.x >= 0.0) {\n ${uvx}.x = -${uvx}.x;\n }\n if (${n}.y < 0.0) {\n ${uvy}.y = -${uvy}.y;\n }\n if (${n}.z < 0.0) {\n ${uvz}.x = -${uvz}.x;\n }\n `;\n }\n const suffix = state.fSuffix;\n state.compilationString += `\n ${state._declareLocalVar(x, NodeMaterialBlockConnectionPointTypes.Vector4)} = ${this._generateTextureSample(samplerName, uvx, state)};\n ${state._declareLocalVar(y, NodeMaterialBlockConnectionPointTypes.Vector4)} = ${this._generateTextureSample(samplerYName, uvy, state)};\n ${state._declareLocalVar(z, NodeMaterialBlockConnectionPointTypes.Vector4)} = ${this._generateTextureSample(samplerZName, uvz, state)};\n \n // blend weights\n ${state._declareLocalVar(w, NodeMaterialBlockConnectionPointTypes.Vector3)} = pow(abs(${n}), vec3${suffix}(${sharpness}));\n\n // blend and return\n ${state._declareLocalVar(this._tempTextureRead, NodeMaterialBlockConnectionPointTypes.Vector4)} = (${x}*${w}.x + ${y}*${w}.y + ${z}*${w}.z) / (${w}.x + ${w}.y + ${w}.z); \n `;\n }\n _generateConversionCode(state, output, swizzle) {\n let vecSpecifier = \"\";\n if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */ && (output.type === NodeMaterialBlockConnectionPointTypes.Vector3 || output.type === NodeMaterialBlockConnectionPointTypes.Color3)) {\n vecSpecifier = \"Vec3\";\n }\n if (swizzle !== \"a\") {\n // no conversion if the output is \"a\" (alpha)\n if (!this.texture || !this.texture.gammaSpace) {\n state.compilationString += `#ifdef ${this._linearDefineName}\n ${output.associatedVariableName} = toGammaSpace${vecSpecifier}(${output.associatedVariableName});\n #endif\n `;\n }\n state.compilationString += `#ifdef ${this._gammaDefineName}\n ${output.associatedVariableName} = toLinearSpace${vecSpecifier}(${output.associatedVariableName});\n #endif\n `;\n }\n }\n _writeOutput(state, output, swizzle) {\n let complement = \"\";\n if (!this.disableLevelMultiplication) {\n complement = ` * ${state.shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"uniforms.\" : \"\"}${this._textureInfoName}`;\n }\n state.compilationString += `${state._declareOutput(output)} = ${this._tempTextureRead}.${swizzle}${complement};\\n`;\n this._generateConversionCode(state, output, swizzle);\n }\n _buildBlock(state) {\n super._buildBlock(state);\n if (this.source.isConnected) {\n this._imageSource = this.source.connectedPoint.ownerBlock;\n } else {\n this._imageSource = null;\n }\n this._textureInfoName = state._getFreeVariableName(\"textureInfoName\");\n this.level.associatedVariableName = (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"uniforms.\" : \"\") + this._textureInfoName;\n this._tempTextureRead = state._getFreeVariableName(\"tempTextureRead\");\n this._linearDefineName = state._getFreeDefineName(\"ISLINEAR\");\n this._gammaDefineName = state._getFreeDefineName(\"ISGAMMA\");\n if (!this._imageSource) {\n this._samplerName = state._getFreeVariableName(this.name + \"Texture\");\n state._emit2DSampler(this._samplerName);\n }\n // Declarations\n state.sharedData.blockingBlocks.push(this);\n state.sharedData.textureBlocks.push(this);\n state.sharedData.blocksWithDefines.push(this);\n state.sharedData.bindableBlocks.push(this);\n const comments = `//${this.name}`;\n state._emitFunctionFromInclude(\"helperFunctions\", comments);\n state._emitUniformFromString(this._textureInfoName, NodeMaterialBlockConnectionPointTypes.Float);\n this._generateTextureLookup(state);\n for (const output of this._outputs) {\n if (output.hasEndpoints && output.name !== \"level\") {\n this._writeOutput(state, output, output.name);\n }\n }\n return this;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n codeString += `${this._codeVariableName}.convertToGammaSpace = ${this.convertToGammaSpace};\\n`;\n codeString += `${this._codeVariableName}.convertToLinearSpace = ${this.convertToLinearSpace};\\n`;\n codeString += `${this._codeVariableName}.disableLevelMultiplication = ${this.disableLevelMultiplication};\\n`;\n codeString += `${this._codeVariableName}.projectAsCube = ${this.projectAsCube};\\n`;\n if (!this.texture) {\n return codeString;\n }\n codeString += `${this._codeVariableName}.texture = new BABYLON.Texture(\"${this.texture.name}\", null, ${this.texture.noMipmap}, ${this.texture.invertY}, ${this.texture.samplingMode});\\n`;\n codeString += `${this._codeVariableName}.texture.wrapU = ${this.texture.wrapU};\\n`;\n codeString += `${this._codeVariableName}.texture.wrapV = ${this.texture.wrapV};\\n`;\n codeString += `${this._codeVariableName}.texture.uAng = ${this.texture.uAng};\\n`;\n codeString += `${this._codeVariableName}.texture.vAng = ${this.texture.vAng};\\n`;\n codeString += `${this._codeVariableName}.texture.wAng = ${this.texture.wAng};\\n`;\n codeString += `${this._codeVariableName}.texture.uOffset = ${this.texture.uOffset};\\n`;\n codeString += `${this._codeVariableName}.texture.vOffset = ${this.texture.vOffset};\\n`;\n codeString += `${this._codeVariableName}.texture.uScale = ${this.texture.uScale};\\n`;\n codeString += `${this._codeVariableName}.texture.vScale = ${this.texture.vScale};\\n`;\n codeString += `${this._codeVariableName}.texture.coordinatesMode = ${this.texture.coordinatesMode};\\n`;\n return codeString;\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.convertToGammaSpace = this.convertToGammaSpace;\n serializationObject.convertToLinearSpace = this.convertToLinearSpace;\n serializationObject.disableLevelMultiplication = this.disableLevelMultiplication;\n serializationObject.projectAsCube = this.projectAsCube;\n if (!this.hasImageSource && this.texture && !this.texture.isRenderTarget && this.texture.getClassName() !== \"VideoTexture\") {\n serializationObject.texture = this.texture.serialize();\n }\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n super._deserialize(serializationObject, scene, rootUrl);\n this.convertToGammaSpace = serializationObject.convertToGammaSpace;\n this.convertToLinearSpace = !!serializationObject.convertToLinearSpace;\n this.disableLevelMultiplication = !!serializationObject.disableLevelMultiplication;\n this.projectAsCube = !!serializationObject.projectAsCube;\n if (serializationObject.texture && !NodeMaterial.IgnoreTexturesAtLoadTime && serializationObject.texture.url !== undefined) {\n rootUrl = serializationObject.texture.url.indexOf(\"data:\") === 0 ? \"\" : rootUrl;\n this.texture = Texture.Parse(serializationObject.texture, scene, rootUrl);\n }\n }\n}\n__decorate([editableInPropertyPage(\"Project as cube\", 0 /* PropertyTypeForEdition.Boolean */, \"ADVANCED\", {\n embedded: true,\n notifiers: {\n update: true\n }\n})], TriPlanarBlock.prototype, \"projectAsCube\", void 0);\nRegisterClass(\"BABYLON.TriPlanarBlock\", TriPlanarBlock);","map":{"version":3,"names":["__decorate","NodeMaterialBlock","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","NodeMaterial","RegisterClass","Texture","ImageSourceBlock","NodeMaterialConnectionPointCustomObject","EngineStore","editableInPropertyPage","TriPlanarBlock","texture","source","isConnected","_this$source$connecte","connectedPoint","ownerBlock","_texture","_texture$getScene","scene","getScene","LastCreatedScene","markAllMaterialsAsDirty","mat","hasTexture","textureY","sourceY","_this$sourceY$connect","textureZ","_this$sourceZ","sourceZ","_this$sourceY$connect2","_getImageSourceBlock","connectionPoint","samplerName","imageSourceBlock","_samplerName","samplerYName","_this$_getImageSource","_this$_getImageSource2","samplerZName","_this$_getImageSource3","_this$_getImageSource4","hasImageSource","convertToGammaSpace","value","_convertToGammaSpace","_this$texture$getScen","convertToLinearSpace","_convertToLinearSpace","_this$texture$getScen2","constructor","name","hideSourceZ","Neutral","projectAsCube","disableLevelMultiplication","registerInput","AutoDetect","Float","Object","VertexAndFragment","registerOutput","Color4","Color3","_inputs","addExcludedConnectionPointFromAllowedTypes","Vector3","Vector4","getClassName","position","normal","sharpness","rgba","_outputs","rgb","r","g","b","a","level","prepareDefines","mesh","nodeMaterial","defines","_areTexturesDirty","toGamma","gammaSpace","toLinear","setValue","_linearDefineName","_gammaDefineName","isReady","isReadyOrNotBlocking","bind","effect","setFloat","_textureInfoName","_imageSource","setTexture","_samplerFunc","state","shaderLanguage","_generateTextureSample","textureName","uv","_generateTextureLookup","_this$samplerYName","_this$samplerZName","associatedVariableName","x","_getFreeVariableName","y","z","w","n","uvx","uvy","uvz","compilationString","_declareLocalVar","Vector2","suffix","fSuffix","_tempTextureRead","_generateConversionCode","output","swizzle","vecSpecifier","type","_writeOutput","complement","_declareOutput","_buildBlock","_getFreeDefineName","_emit2DSampler","sharedData","blockingBlocks","push","textureBlocks","blocksWithDefines","bindableBlocks","comments","_emitFunctionFromInclude","_emitUniformFromString","hasEndpoints","_dumpPropertiesCode","codeString","_codeVariableName","noMipmap","invertY","samplingMode","wrapU","wrapV","uAng","vAng","wAng","uOffset","vOffset","uScale","vScale","coordinatesMode","serialize","serializationObject","isRenderTarget","_deserialize","rootUrl","IgnoreTexturesAtLoadTime","url","undefined","indexOf","Parse","embedded","notifiers","update","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/triPlanarBlock.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 { NodeMaterial } from \"../nodeMaterial.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { Texture } from \"../../Textures/texture.js\";\n\nimport \"../../../Shaders/ShadersInclude/helperFunctions.js\";\nimport { ImageSourceBlock } from \"./Dual/imageSourceBlock.js\";\nimport { NodeMaterialConnectionPointCustomObject } from \"../nodeMaterialConnectionPointCustomObject.js\";\nimport { EngineStore } from \"../../../Engines/engineStore.js\";\nimport { editableInPropertyPage } from \"../../../Decorators/nodeDecorator.js\";\n/**\n * Block used to read a texture with triplanar mapping (see \"boxmap\" in https://iquilezles.org/articles/biplanar/)\n */\nexport class TriPlanarBlock extends NodeMaterialBlock {\n /**\n * Gets or sets the texture associated with the node\n */\n get texture() {\n if (this.source.isConnected) {\n return (this.source.connectedPoint?.ownerBlock).texture;\n }\n return this._texture;\n }\n set texture(texture) {\n if (this._texture === texture) {\n return;\n }\n const scene = texture?.getScene() ?? EngineStore.LastCreatedScene;\n if (!texture && scene) {\n scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this._texture);\n });\n }\n this._texture = texture;\n if (texture && scene) {\n scene.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(texture);\n });\n }\n }\n /**\n * Gets the textureY associated with the node\n */\n get textureY() {\n if (this.sourceY.isConnected) {\n return (this.sourceY.connectedPoint?.ownerBlock).texture;\n }\n return null;\n }\n /**\n * Gets the textureZ associated with the node\n */\n get textureZ() {\n if (this.sourceZ?.isConnected) {\n return (this.sourceY.connectedPoint?.ownerBlock).texture;\n }\n return null;\n }\n _getImageSourceBlock(connectionPoint) {\n return connectionPoint?.isConnected ? connectionPoint.connectedPoint.ownerBlock : null;\n }\n /**\n * Gets the sampler name associated with this texture\n */\n get samplerName() {\n const imageSourceBlock = this._getImageSourceBlock(this.source);\n if (imageSourceBlock) {\n return imageSourceBlock.samplerName;\n }\n return this._samplerName;\n }\n /**\n * Gets the samplerY name associated with this texture\n */\n get samplerYName() {\n return this._getImageSourceBlock(this.sourceY)?.samplerName ?? null;\n }\n /**\n * Gets the samplerZ name associated with this texture\n */\n get samplerZName() {\n return this._getImageSourceBlock(this.sourceZ)?.samplerName ?? null;\n }\n /**\n * Gets a boolean indicating that this block is linked to an ImageSourceBlock\n */\n get hasImageSource() {\n return this.source.isConnected;\n }\n /**\n * Gets or sets a boolean indicating if content needs to be converted to gamma space\n */\n set convertToGammaSpace(value) {\n if (value === this._convertToGammaSpace) {\n return;\n }\n this._convertToGammaSpace = value;\n if (this.texture) {\n const scene = this.texture.getScene() ?? EngineStore.LastCreatedScene;\n scene?.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this.texture);\n });\n }\n }\n get convertToGammaSpace() {\n return this._convertToGammaSpace;\n }\n /**\n * Gets or sets a boolean indicating if content needs to be converted to linear space\n */\n set convertToLinearSpace(value) {\n if (value === this._convertToLinearSpace) {\n return;\n }\n this._convertToLinearSpace = value;\n if (this.texture) {\n const scene = this.texture.getScene() ?? EngineStore.LastCreatedScene;\n scene?.markAllMaterialsAsDirty(1, (mat) => {\n return mat.hasTexture(this.texture);\n });\n }\n }\n get convertToLinearSpace() {\n return this._convertToLinearSpace;\n }\n /**\n * Create a new TriPlanarBlock\n * @param name defines the block name\n * @param hideSourceZ defines a boolean indicating that normal Z should not be used (false by default)\n */\n constructor(name, hideSourceZ = false) {\n super(name, NodeMaterialBlockTargets.Neutral);\n /**\n * Project the texture(s) for a better fit to a cube\n */\n this.projectAsCube = false;\n this._convertToGammaSpace = false;\n this._convertToLinearSpace = false;\n /**\n * Gets or sets a boolean indicating if multiplication of texture with level should be disabled\n */\n this.disableLevelMultiplication = false;\n this.registerInput(\"position\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false);\n this.registerInput(\"normal\", NodeMaterialBlockConnectionPointTypes.AutoDetect, false);\n this.registerInput(\"sharpness\", NodeMaterialBlockConnectionPointTypes.Float, true);\n this.registerInput(\"source\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"source\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, ImageSourceBlock, \"ImageSourceBlock\"));\n this.registerInput(\"sourceY\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"sourceY\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, ImageSourceBlock, \"ImageSourceBlock\"));\n if (!hideSourceZ) {\n this.registerInput(\"sourceZ\", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject(\"sourceZ\", this, 0 /* NodeMaterialConnectionPointDirection.Input */, ImageSourceBlock, \"ImageSourceBlock\"));\n }\n this.registerOutput(\"rgba\", NodeMaterialBlockConnectionPointTypes.Color4, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"rgb\", NodeMaterialBlockConnectionPointTypes.Color3, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"r\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"g\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"b\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"a\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this.registerOutput(\"level\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);\n this._inputs[0].addExcludedConnectionPointFromAllowedTypes(NodeMaterialBlockConnectionPointTypes.Color3 | NodeMaterialBlockConnectionPointTypes.Vector3 | NodeMaterialBlockConnectionPointTypes.Vector4);\n this._inputs[1].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 \"TriPlanarBlock\";\n }\n /**\n * Gets the position input component\n */\n get position() {\n return this._inputs[0];\n }\n /**\n * Gets the normal input component\n */\n get normal() {\n return this._inputs[1];\n }\n /**\n * Gets the sharpness input component\n */\n get sharpness() {\n return this._inputs[2];\n }\n /**\n * Gets the source input component\n */\n get source() {\n return this._inputs[3];\n }\n /**\n * Gets the sourceY input component\n */\n get sourceY() {\n return this._inputs[4];\n }\n /**\n * Gets the sourceZ input component\n */\n get sourceZ() {\n return this._inputs[5];\n }\n /**\n * Gets the rgba output component\n */\n get rgba() {\n return this._outputs[0];\n }\n /**\n * Gets the rgb output component\n */\n get rgb() {\n return this._outputs[1];\n }\n /**\n * Gets the r output component\n */\n get r() {\n return this._outputs[2];\n }\n /**\n * Gets the g output component\n */\n get g() {\n return this._outputs[3];\n }\n /**\n * Gets the b output component\n */\n get b() {\n return this._outputs[4];\n }\n /**\n * Gets the a output component\n */\n get a() {\n return this._outputs[5];\n }\n /**\n * Gets the level output component\n */\n get level() {\n return this._outputs[6];\n }\n prepareDefines(mesh, nodeMaterial, defines) {\n if (!defines._areTexturesDirty) {\n return;\n }\n const toGamma = this.convertToGammaSpace && this.texture && !this.texture.gammaSpace;\n const toLinear = this.convertToLinearSpace && this.texture && this.texture.gammaSpace;\n // Not a bug... Name defines the texture space not the required conversion\n defines.setValue(this._linearDefineName, toGamma, true);\n defines.setValue(this._gammaDefineName, toLinear, true);\n }\n isReady() {\n if (this.texture && !this.texture.isReadyOrNotBlocking()) {\n return false;\n }\n return true;\n }\n bind(effect) {\n if (!this.texture) {\n return;\n }\n effect.setFloat(this._textureInfoName, this.texture.level);\n if (!this._imageSource) {\n effect.setTexture(this._samplerName, this.texture);\n }\n }\n _samplerFunc(state) {\n if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n return \"textureSample\";\n }\n return \"texture2D\";\n }\n _generateTextureSample(textureName, uv, state) {\n if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {\n return `${this._samplerFunc(state)}(${textureName},${textureName + `Sampler`}, ${uv})`;\n }\n return `${this._samplerFunc(state)}(${textureName}, ${uv})`;\n }\n _generateTextureLookup(state) {\n const samplerName = this.samplerName;\n const samplerYName = this.samplerYName ?? samplerName;\n const samplerZName = this.samplerZName ?? samplerName;\n const sharpness = this.sharpness.isConnected ? this.sharpness.associatedVariableName : \"1.0\";\n const x = state._getFreeVariableName(\"x\");\n const y = state._getFreeVariableName(\"y\");\n const z = state._getFreeVariableName(\"z\");\n const w = state._getFreeVariableName(\"w\");\n const n = state._getFreeVariableName(\"n\");\n const uvx = state._getFreeVariableName(\"uvx\");\n const uvy = state._getFreeVariableName(\"uvy\");\n const uvz = state._getFreeVariableName(\"uvz\");\n state.compilationString += `\r\n ${state._declareLocalVar(n, NodeMaterialBlockConnectionPointTypes.Vector3)} = ${this.normal.associatedVariableName}.xyz;\r\n\r\n ${state._declareLocalVar(uvx, NodeMaterialBlockConnectionPointTypes.Vector2)} = ${this.position.associatedVariableName}.yz;\r\n ${state._declareLocalVar(uvy, NodeMaterialBlockConnectionPointTypes.Vector2)} = ${this.position.associatedVariableName}.zx;\r\n ${state._declareLocalVar(uvz, NodeMaterialBlockConnectionPointTypes.Vector2)} = ${this.position.associatedVariableName}.xy;\r\n `;\n if (this.projectAsCube) {\n state.compilationString += `\r\n ${uvx}.xy = ${uvx}.yx;\r\n\r\n if (${n}.x >= 0.0) {\r\n ${uvx}.x = -${uvx}.x;\r\n }\r\n if (${n}.y < 0.0) {\r\n ${uvy}.y = -${uvy}.y;\r\n }\r\n if (${n}.z < 0.0) {\r\n ${uvz}.x = -${uvz}.x;\r\n }\r\n `;\n }\n const suffix = state.fSuffix;\n state.compilationString += `\r\n ${state._declareLocalVar(x, NodeMaterialBlockConnectionPointTypes.Vector4)} = ${this._generateTextureSample(samplerName, uvx, state)};\r\n ${state._declareLocalVar(y, NodeMaterialBlockConnectionPointTypes.Vector4)} = ${this._generateTextureSample(samplerYName, uvy, state)};\r\n ${state._declareLocalVar(z, NodeMaterialBlockConnectionPointTypes.Vector4)} = ${this._generateTextureSample(samplerZName, uvz, state)};\r\n \r\n // blend weights\r\n ${state._declareLocalVar(w, NodeMaterialBlockConnectionPointTypes.Vector3)} = pow(abs(${n}), vec3${suffix}(${sharpness}));\r\n\r\n // blend and return\r\n ${state._declareLocalVar(this._tempTextureRead, NodeMaterialBlockConnectionPointTypes.Vector4)} = (${x}*${w}.x + ${y}*${w}.y + ${z}*${w}.z) / (${w}.x + ${w}.y + ${w}.z); \r\n `;\n }\n _generateConversionCode(state, output, swizzle) {\n let vecSpecifier = \"\";\n if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */ &&\n (output.type === NodeMaterialBlockConnectionPointTypes.Vector3 || output.type === NodeMaterialBlockConnectionPointTypes.Color3)) {\n vecSpecifier = \"Vec3\";\n }\n if (swizzle !== \"a\") {\n // no conversion if the output is \"a\" (alpha)\n if (!this.texture || !this.texture.gammaSpace) {\n state.compilationString += `#ifdef ${this._linearDefineName}\r\n ${output.associatedVariableName} = toGammaSpace${vecSpecifier}(${output.associatedVariableName});\r\n #endif\r\n `;\n }\n state.compilationString += `#ifdef ${this._gammaDefineName}\r\n ${output.associatedVariableName} = toLinearSpace${vecSpecifier}(${output.associatedVariableName});\r\n #endif\r\n `;\n }\n }\n _writeOutput(state, output, swizzle) {\n let complement = \"\";\n if (!this.disableLevelMultiplication) {\n complement = ` * ${state.shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"uniforms.\" : \"\"}${this._textureInfoName}`;\n }\n state.compilationString += `${state._declareOutput(output)} = ${this._tempTextureRead}.${swizzle}${complement};\\n`;\n this._generateConversionCode(state, output, swizzle);\n }\n _buildBlock(state) {\n super._buildBlock(state);\n if (this.source.isConnected) {\n this._imageSource = this.source.connectedPoint.ownerBlock;\n }\n else {\n this._imageSource = null;\n }\n this._textureInfoName = state._getFreeVariableName(\"textureInfoName\");\n this.level.associatedVariableName = (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"uniforms.\" : \"\") + this._textureInfoName;\n this._tempTextureRead = state._getFreeVariableName(\"tempTextureRead\");\n this._linearDefineName = state._getFreeDefineName(\"ISLINEAR\");\n this._gammaDefineName = state._getFreeDefineName(\"ISGAMMA\");\n if (!this._imageSource) {\n this._samplerName = state._getFreeVariableName(this.name + \"Texture\");\n state._emit2DSampler(this._samplerName);\n }\n // Declarations\n state.sharedData.blockingBlocks.push(this);\n state.sharedData.textureBlocks.push(this);\n state.sharedData.blocksWithDefines.push(this);\n state.sharedData.bindableBlocks.push(this);\n const comments = `//${this.name}`;\n state._emitFunctionFromInclude(\"helperFunctions\", comments);\n state._emitUniformFromString(this._textureInfoName, NodeMaterialBlockConnectionPointTypes.Float);\n this._generateTextureLookup(state);\n for (const output of this._outputs) {\n if (output.hasEndpoints && output.name !== \"level\") {\n this._writeOutput(state, output, output.name);\n }\n }\n return this;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n codeString += `${this._codeVariableName}.convertToGammaSpace = ${this.convertToGammaSpace};\\n`;\n codeString += `${this._codeVariableName}.convertToLinearSpace = ${this.convertToLinearSpace};\\n`;\n codeString += `${this._codeVariableName}.disableLevelMultiplication = ${this.disableLevelMultiplication};\\n`;\n codeString += `${this._codeVariableName}.projectAsCube = ${this.projectAsCube};\\n`;\n if (!this.texture) {\n return codeString;\n }\n codeString += `${this._codeVariableName}.texture = new BABYLON.Texture(\"${this.texture.name}\", null, ${this.texture.noMipmap}, ${this.texture.invertY}, ${this.texture.samplingMode});\\n`;\n codeString += `${this._codeVariableName}.texture.wrapU = ${this.texture.wrapU};\\n`;\n codeString += `${this._codeVariableName}.texture.wrapV = ${this.texture.wrapV};\\n`;\n codeString += `${this._codeVariableName}.texture.uAng = ${this.texture.uAng};\\n`;\n codeString += `${this._codeVariableName}.texture.vAng = ${this.texture.vAng};\\n`;\n codeString += `${this._codeVariableName}.texture.wAng = ${this.texture.wAng};\\n`;\n codeString += `${this._codeVariableName}.texture.uOffset = ${this.texture.uOffset};\\n`;\n codeString += `${this._codeVariableName}.texture.vOffset = ${this.texture.vOffset};\\n`;\n codeString += `${this._codeVariableName}.texture.uScale = ${this.texture.uScale};\\n`;\n codeString += `${this._codeVariableName}.texture.vScale = ${this.texture.vScale};\\n`;\n codeString += `${this._codeVariableName}.texture.coordinatesMode = ${this.texture.coordinatesMode};\\n`;\n return codeString;\n }\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.convertToGammaSpace = this.convertToGammaSpace;\n serializationObject.convertToLinearSpace = this.convertToLinearSpace;\n serializationObject.disableLevelMultiplication = this.disableLevelMultiplication;\n serializationObject.projectAsCube = this.projectAsCube;\n if (!this.hasImageSource && this.texture && !this.texture.isRenderTarget && this.texture.getClassName() !== \"VideoTexture\") {\n serializationObject.texture = this.texture.serialize();\n }\n return serializationObject;\n }\n _deserialize(serializationObject, scene, rootUrl) {\n super._deserialize(serializationObject, scene, rootUrl);\n this.convertToGammaSpace = serializationObject.convertToGammaSpace;\n this.convertToLinearSpace = !!serializationObject.convertToLinearSpace;\n this.disableLevelMultiplication = !!serializationObject.disableLevelMultiplication;\n this.projectAsCube = !!serializationObject.projectAsCube;\n if (serializationObject.texture && !NodeMaterial.IgnoreTexturesAtLoadTime && serializationObject.texture.url !== undefined) {\n rootUrl = serializationObject.texture.url.indexOf(\"data:\") === 0 ? \"\" : rootUrl;\n this.texture = Texture.Parse(serializationObject.texture, scene, rootUrl);\n }\n }\n}\n__decorate([\n editableInPropertyPage(\"Project as cube\", 0 /* PropertyTypeForEdition.Boolean */, \"ADVANCED\", { embedded: true, notifiers: { update: true } })\n], TriPlanarBlock.prototype, \"projectAsCube\", void 0);\nRegisterClass(\"BABYLON.TriPlanarB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