03adafbbaf8c42693a12c916a92a4acc74431f2419d7b12843509a86b056c4e6.json 33 KB

1
  1. {"ast":null,"code":"import { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, expandToProperty, serializeAsColor3, serializeAsTexture } from \"../../Misc/decorators.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { MaterialFlags } from \"../../Materials/materialFlags.js\";\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\nimport { MaterialDefines } from \"../materialDefines.js\";\nimport { BindTextureMatrix, PrepareDefinesForMergedUV } from \"../materialHelper.functions.js\";\n/**\n * @internal\n */\nexport class MaterialSheenDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.SHEEN = false;\n this.SHEEN_TEXTURE = false;\n this.SHEEN_GAMMATEXTURE = false;\n this.SHEEN_TEXTURE_ROUGHNESS = false;\n this.SHEEN_TEXTUREDIRECTUV = 0;\n this.SHEEN_TEXTURE_ROUGHNESSDIRECTUV = 0;\n this.SHEEN_LINKWITHALBEDO = false;\n this.SHEEN_ROUGHNESS = false;\n this.SHEEN_ALBEDOSCALING = false;\n this.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n }\n}\n/**\n * Plugin that implements the sheen component of the PBR material.\n */\nexport class PBRSheenConfiguration extends MaterialPluginBase {\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n /**\n * Gets a boolean indicating that the plugin is compatible with a given shader language.\n * @returns true if the plugin is compatible with the shader language\n */\n isCompatible() {\n return true;\n }\n constructor(material, addToPluginList = true) {\n super(material, \"Sheen\", 120, new MaterialSheenDefines(), addToPluginList);\n this._isEnabled = false;\n /**\n * Defines if the material uses sheen.\n */\n this.isEnabled = false;\n this._linkSheenWithAlbedo = false;\n /**\n * Defines if the sheen is linked to the sheen color.\n */\n this.linkSheenWithAlbedo = false;\n /**\n * Defines the sheen intensity.\n */\n this.intensity = 1;\n /**\n * Defines the sheen color.\n */\n this.color = Color3.White();\n this._texture = null;\n /**\n * Stores the sheen tint values in a texture.\n * rgb is tint\n * a is a intensity or roughness if the roughness property has been defined and useRoughnessFromTexture is true (in that case, textureRoughness won't be used)\n * If the roughness property has been defined and useRoughnessFromTexture is false then the alpha channel is not used to modulate roughness\n */\n this.texture = null;\n this._useRoughnessFromMainTexture = true;\n /**\n * Indicates that the alpha channel of the texture property will be used for roughness.\n * Has no effect if the roughness (and texture!) property is not defined\n */\n this.useRoughnessFromMainTexture = true;\n this._roughness = null;\n /**\n * Defines the sheen roughness.\n * It is not taken into account if linkSheenWithAlbedo is true.\n * To stay backward compatible, material roughness is used instead if sheen roughness = null\n */\n this.roughness = null;\n this._textureRoughness = null;\n /**\n * Stores the sheen roughness in a texture.\n * alpha channel is the roughness. This texture won't be used if the texture property is not empty and useRoughnessFromTexture is true\n */\n this.textureRoughness = null;\n this._albedoScaling = false;\n /**\n * If true, the sheen effect is layered above the base BRDF with the albedo-scaling technique.\n * It allows the strength of the sheen effect to not depend on the base color of the material,\n * making it easier to setup and tweak the effect\n */\n this.albedoScaling = false;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n }\n isReadyForSubMesh(defines, scene) {\n if (!this._isEnabled) {\n return true;\n }\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n if (!this._texture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._textureRoughness && MaterialFlags.SheenTextureEnabled) {\n if (!this._textureRoughness.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n }\n return true;\n }\n prepareDefinesBeforeAttributes(defines, scene) {\n if (this._isEnabled) {\n defines.SHEEN = true;\n defines.SHEEN_LINKWITHALBEDO = this._linkSheenWithAlbedo;\n defines.SHEEN_ROUGHNESS = this._roughness !== null;\n defines.SHEEN_ALBEDOSCALING = this._albedoScaling;\n defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = this._useRoughnessFromMainTexture;\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n PrepareDefinesForMergedUV(this._texture, defines, \"SHEEN_TEXTURE\");\n defines.SHEEN_GAMMATEXTURE = this._texture.gammaSpace;\n } else {\n defines.SHEEN_TEXTURE = false;\n }\n if (this._textureRoughness && MaterialFlags.SheenTextureEnabled) {\n PrepareDefinesForMergedUV(this._textureRoughness, defines, \"SHEEN_TEXTURE_ROUGHNESS\");\n } else {\n defines.SHEEN_TEXTURE_ROUGHNESS = false;\n }\n }\n }\n } else {\n defines.SHEEN = false;\n defines.SHEEN_TEXTURE = false;\n defines.SHEEN_TEXTURE_ROUGHNESS = false;\n defines.SHEEN_LINKWITHALBEDO = false;\n defines.SHEEN_ROUGHNESS = false;\n defines.SHEEN_ALBEDOSCALING = false;\n defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n defines.SHEEN_GAMMATEXTURE = false;\n defines.SHEEN_TEXTUREDIRECTUV = 0;\n defines.SHEEN_TEXTURE_ROUGHNESSDIRECTUV = 0;\n }\n }\n bindForSubMesh(uniformBuffer, scene, engine, subMesh) {\n if (!this._isEnabled) {\n return;\n }\n const defines = subMesh.materialDefines;\n const isFrozen = this._material.isFrozen;\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if ((this._texture || this._textureRoughness) && MaterialFlags.SheenTextureEnabled) {\n var _this$_texture$coordi, _this$_texture, _this$_texture$level, _this$_texture2, _this$_textureRoughne, _this$_textureRoughne2, _this$_textureRoughne3, _this$_textureRoughne4;\n uniformBuffer.updateFloat4(\"vSheenInfos\", (_this$_texture$coordi = (_this$_texture = this._texture) === null || _this$_texture === void 0 ? void 0 : _this$_texture.coordinatesIndex) !== null && _this$_texture$coordi !== void 0 ? _this$_texture$coordi : 0, (_this$_texture$level = (_this$_texture2 = this._texture) === null || _this$_texture2 === void 0 ? void 0 : _this$_texture2.level) !== null && _this$_texture$level !== void 0 ? _this$_texture$level : 0, (_this$_textureRoughne = (_this$_textureRoughne2 = this._textureRoughness) === null || _this$_textureRoughne2 === void 0 ? void 0 : _this$_textureRoughne2.coordinatesIndex) !== null && _this$_textureRoughne !== void 0 ? _this$_textureRoughne : 0, (_this$_textureRoughne3 = (_this$_textureRoughne4 = this._textureRoughness) === null || _this$_textureRoughne4 === void 0 ? void 0 : _this$_textureRoughne4.level) !== null && _this$_textureRoughne3 !== void 0 ? _this$_textureRoughne3 : 0);\n if (this._texture) {\n BindTextureMatrix(this._texture, uniformBuffer, \"sheen\");\n }\n if (this._textureRoughness && !defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) {\n BindTextureMatrix(this._textureRoughness, uniformBuffer, \"sheenRoughness\");\n }\n }\n // Sheen\n uniformBuffer.updateFloat4(\"vSheenColor\", this.color.r, this.color.g, this.color.b, this.intensity);\n if (this._roughness !== null) {\n uniformBuffer.updateFloat(\"vSheenRoughness\", this._roughness);\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.setTexture(\"sheenSampler\", this._texture);\n }\n if (this._textureRoughness && !defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.setTexture(\"sheenRoughnessSampler\", this._textureRoughness);\n }\n }\n }\n hasTexture(texture) {\n if (this._texture === texture) {\n return true;\n }\n if (this._textureRoughness === texture) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._texture) {\n activeTextures.push(this._texture);\n }\n if (this._textureRoughness) {\n activeTextures.push(this._textureRoughness);\n }\n }\n getAnimatables(animatables) {\n if (this._texture && this._texture.animations && this._texture.animations.length > 0) {\n animatables.push(this._texture);\n }\n if (this._textureRoughness && this._textureRoughness.animations && this._textureRoughness.animations.length > 0) {\n animatables.push(this._textureRoughness);\n }\n }\n dispose(forceDisposeTextures) {\n if (forceDisposeTextures) {\n var _this$_texture3, _this$_textureRoughne5;\n (_this$_texture3 = this._texture) === null || _this$_texture3 === void 0 || _this$_texture3.dispose();\n (_this$_textureRoughne5 = this._textureRoughness) === null || _this$_textureRoughne5 === void 0 || _this$_textureRoughne5.dispose();\n }\n }\n getClassName() {\n return \"PBRSheenConfiguration\";\n }\n addFallbacks(defines, fallbacks, currentRank) {\n if (defines.SHEEN) {\n fallbacks.addFallback(currentRank++, \"SHEEN\");\n }\n return currentRank;\n }\n getSamplers(samplers) {\n samplers.push(\"sheenSampler\", \"sheenRoughnessSampler\");\n }\n getUniforms() {\n return {\n ubo: [{\n name: \"vSheenColor\",\n size: 4,\n type: \"vec4\"\n }, {\n name: \"vSheenRoughness\",\n size: 1,\n type: \"float\"\n }, {\n name: \"vSheenInfos\",\n size: 4,\n type: \"vec4\"\n }, {\n name: \"sheenMatrix\",\n size: 16,\n type: \"mat4\"\n }, {\n name: \"sheenRoughnessMatrix\",\n size: 16,\n type: \"mat4\"\n }]\n };\n }\n}\n__decorate([serialize(), expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], PBRSheenConfiguration.prototype, \"isEnabled\", void 0);\n__decorate([serialize(), expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], PBRSheenConfiguration.prototype, \"linkSheenWithAlbedo\", void 0);\n__decorate([serialize()], PBRSheenConfiguration.prototype, \"intensity\", void 0);\n__decorate([serializeAsColor3()], PBRSheenConfiguration.prototype, \"color\", void 0);\n__decorate([serializeAsTexture(), expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], PBRSheenConfiguration.prototype, \"texture\", void 0);\n__decorate([serialize(), expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], PBRSheenConfiguration.prototype, \"useRoughnessFromMainTexture\", void 0);\n__decorate([serialize(), expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], PBRSheenConfiguration.prototype, \"roughness\", void 0);\n__decorate([serializeAsTexture(), expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], PBRSheenConfiguration.prototype, \"textureRoughness\", void 0);\n__decorate([serialize(), expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")], PBRSheenConfiguration.prototype, \"albedoScaling\", void 0);","map":{"version":3,"names":["__decorate","serialize","expandToProperty","serializeAsColor3","serializeAsTexture","Color3","MaterialFlags","MaterialPluginBase","MaterialDefines","BindTextureMatrix","PrepareDefinesForMergedUV","MaterialSheenDefines","constructor","arguments","SHEEN","SHEEN_TEXTURE","SHEEN_GAMMATEXTURE","SHEEN_TEXTURE_ROUGHNESS","SHEEN_TEXTUREDIRECTUV","SHEEN_TEXTURE_ROUGHNESSDIRECTUV","SHEEN_LINKWITHALBEDO","SHEEN_ROUGHNESS","SHEEN_ALBEDOSCALING","SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE","PBRSheenConfiguration","_markAllSubMeshesAsTexturesDirty","_enable","_isEnabled","_internalMarkAllSubMeshesAsTexturesDirty","isCompatible","material","addToPluginList","isEnabled","_linkSheenWithAlbedo","linkSheenWithAlbedo","intensity","color","White","_texture","texture","_useRoughnessFromMainTexture","useRoughnessFromMainTexture","_roughness","roughness","_textureRoughness","textureRoughness","_albedoScaling","albedoScaling","_dirtyCallbacks","isReadyForSubMesh","defines","scene","_areTexturesDirty","texturesEnabled","SheenTextureEnabled","isReadyOrNotBlocking","prepareDefinesBeforeAttributes","gammaSpace","bindForSubMesh","uniformBuffer","engine","subMesh","materialDefines","isFrozen","_material","useUbo","isSync","_this$_texture$coordi","_this$_texture","_this$_texture$level","_this$_texture2","_this$_textureRoughne","_this$_textureRoughne2","_this$_textureRoughne3","_this$_textureRoughne4","updateFloat4","coordinatesIndex","level","r","g","b","updateFloat","setTexture","hasTexture","getActiveTextures","activeTextures","push","getAnimatables","animatables","animations","length","dispose","forceDisposeTextures","_this$_texture3","_this$_textureRoughne5","getClassName","addFallbacks","fallbacks","currentRank","addFallback","getSamplers","samplers","getUniforms","ubo","name","size","type","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/PBR/pbrSheenConfiguration.js"],"sourcesContent":["import { __decorate } from \"../../tslib.es6.js\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport { serialize, expandToProperty, serializeAsColor3, serializeAsTexture } from \"../../Misc/decorators.js\";\nimport { Color3 } from \"../../Maths/math.color.js\";\nimport { MaterialFlags } from \"../../Materials/materialFlags.js\";\n\nimport { MaterialPluginBase } from \"../materialPluginBase.js\";\nimport { MaterialDefines } from \"../materialDefines.js\";\nimport { BindTextureMatrix, PrepareDefinesForMergedUV } from \"../materialHelper.functions.js\";\n/**\n * @internal\n */\nexport class MaterialSheenDefines extends MaterialDefines {\n constructor() {\n super(...arguments);\n this.SHEEN = false;\n this.SHEEN_TEXTURE = false;\n this.SHEEN_GAMMATEXTURE = false;\n this.SHEEN_TEXTURE_ROUGHNESS = false;\n this.SHEEN_TEXTUREDIRECTUV = 0;\n this.SHEEN_TEXTURE_ROUGHNESSDIRECTUV = 0;\n this.SHEEN_LINKWITHALBEDO = false;\n this.SHEEN_ROUGHNESS = false;\n this.SHEEN_ALBEDOSCALING = false;\n this.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n }\n}\n/**\n * Plugin that implements the sheen component of the PBR material.\n */\nexport class PBRSheenConfiguration extends MaterialPluginBase {\n /** @internal */\n _markAllSubMeshesAsTexturesDirty() {\n this._enable(this._isEnabled);\n this._internalMarkAllSubMeshesAsTexturesDirty();\n }\n /**\n * Gets a boolean indicating that the plugin is compatible with a given shader language.\n * @returns true if the plugin is compatible with the shader language\n */\n isCompatible() {\n return true;\n }\n constructor(material, addToPluginList = true) {\n super(material, \"Sheen\", 120, new MaterialSheenDefines(), addToPluginList);\n this._isEnabled = false;\n /**\n * Defines if the material uses sheen.\n */\n this.isEnabled = false;\n this._linkSheenWithAlbedo = false;\n /**\n * Defines if the sheen is linked to the sheen color.\n */\n this.linkSheenWithAlbedo = false;\n /**\n * Defines the sheen intensity.\n */\n this.intensity = 1;\n /**\n * Defines the sheen color.\n */\n this.color = Color3.White();\n this._texture = null;\n /**\n * Stores the sheen tint values in a texture.\n * rgb is tint\n * a is a intensity or roughness if the roughness property has been defined and useRoughnessFromTexture is true (in that case, textureRoughness won't be used)\n * If the roughness property has been defined and useRoughnessFromTexture is false then the alpha channel is not used to modulate roughness\n */\n this.texture = null;\n this._useRoughnessFromMainTexture = true;\n /**\n * Indicates that the alpha channel of the texture property will be used for roughness.\n * Has no effect if the roughness (and texture!) property is not defined\n */\n this.useRoughnessFromMainTexture = true;\n this._roughness = null;\n /**\n * Defines the sheen roughness.\n * It is not taken into account if linkSheenWithAlbedo is true.\n * To stay backward compatible, material roughness is used instead if sheen roughness = null\n */\n this.roughness = null;\n this._textureRoughness = null;\n /**\n * Stores the sheen roughness in a texture.\n * alpha channel is the roughness. This texture won't be used if the texture property is not empty and useRoughnessFromTexture is true\n */\n this.textureRoughness = null;\n this._albedoScaling = false;\n /**\n * If true, the sheen effect is layered above the base BRDF with the albedo-scaling technique.\n * It allows the strength of the sheen effect to not depend on the base color of the material,\n * making it easier to setup and tweak the effect\n */\n this.albedoScaling = false;\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];\n }\n isReadyForSubMesh(defines, scene) {\n if (!this._isEnabled) {\n return true;\n }\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n if (!this._texture.isReadyOrNotBlocking()) {\n return false;\n }\n }\n if (this._textureRoughness && MaterialFlags.SheenTextureEnabled) {\n if (!this._textureRoughness.isReadyOrNotBlocking()) {\n return false;\n }\n }\n }\n }\n return true;\n }\n prepareDefinesBeforeAttributes(defines, scene) {\n if (this._isEnabled) {\n defines.SHEEN = true;\n defines.SHEEN_LINKWITHALBEDO = this._linkSheenWithAlbedo;\n defines.SHEEN_ROUGHNESS = this._roughness !== null;\n defines.SHEEN_ALBEDOSCALING = this._albedoScaling;\n defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = this._useRoughnessFromMainTexture;\n if (defines._areTexturesDirty) {\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n PrepareDefinesForMergedUV(this._texture, defines, \"SHEEN_TEXTURE\");\n defines.SHEEN_GAMMATEXTURE = this._texture.gammaSpace;\n }\n else {\n defines.SHEEN_TEXTURE = false;\n }\n if (this._textureRoughness && MaterialFlags.SheenTextureEnabled) {\n PrepareDefinesForMergedUV(this._textureRoughness, defines, \"SHEEN_TEXTURE_ROUGHNESS\");\n }\n else {\n defines.SHEEN_TEXTURE_ROUGHNESS = false;\n }\n }\n }\n }\n else {\n defines.SHEEN = false;\n defines.SHEEN_TEXTURE = false;\n defines.SHEEN_TEXTURE_ROUGHNESS = false;\n defines.SHEEN_LINKWITHALBEDO = false;\n defines.SHEEN_ROUGHNESS = false;\n defines.SHEEN_ALBEDOSCALING = false;\n defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE = false;\n defines.SHEEN_GAMMATEXTURE = false;\n defines.SHEEN_TEXTUREDIRECTUV = 0;\n defines.SHEEN_TEXTURE_ROUGHNESSDIRECTUV = 0;\n }\n }\n bindForSubMesh(uniformBuffer, scene, engine, subMesh) {\n if (!this._isEnabled) {\n return;\n }\n const defines = subMesh.materialDefines;\n const isFrozen = this._material.isFrozen;\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\n if ((this._texture || this._textureRoughness) && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.updateFloat4(\"vSheenInfos\", this._texture?.coordinatesIndex ?? 0, this._texture?.level ?? 0, this._textureRoughness?.coordinatesIndex ?? 0, this._textureRoughness?.level ?? 0);\n if (this._texture) {\n BindTextureMatrix(this._texture, uniformBuffer, \"sheen\");\n }\n if (this._textureRoughness && !defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) {\n BindTextureMatrix(this._textureRoughness, uniformBuffer, \"sheenRoughness\");\n }\n }\n // Sheen\n uniformBuffer.updateFloat4(\"vSheenColor\", this.color.r, this.color.g, this.color.b, this.intensity);\n if (this._roughness !== null) {\n uniformBuffer.updateFloat(\"vSheenRoughness\", this._roughness);\n }\n }\n // Textures\n if (scene.texturesEnabled) {\n if (this._texture && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.setTexture(\"sheenSampler\", this._texture);\n }\n if (this._textureRoughness && !defines.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE && MaterialFlags.SheenTextureEnabled) {\n uniformBuffer.setTexture(\"sheenRoughnessSampler\", this._textureRoughness);\n }\n }\n }\n hasTexture(texture) {\n if (this._texture === texture) {\n return true;\n }\n if (this._textureRoughness === texture) {\n return true;\n }\n return false;\n }\n getActiveTextures(activeTextures) {\n if (this._texture) {\n activeTextures.push(this._texture);\n }\n if (this._textureRoughness) {\n activeTextures.push(this._textureRoughness);\n }\n }\n getAnimatables(animatables) {\n if (this._texture && this._texture.animations && this._texture.animations.length > 0) {\n animatables.push(this._texture);\n }\n if (this._textureRoughness && this._textureRoughness.animations && this._textureRoughness.animations.length > 0) {\n animatables.push(this._textureRoughness);\n }\n }\n dispose(forceDisposeTextures) {\n if (forceDisposeTextures) {\n this._texture?.dispose();\n this._textureRoughness?.dispose();\n }\n }\n getClassName() {\n return \"PBRSheenConfiguration\";\n }\n addFallbacks(defines, fallbacks, currentRank) {\n if (defines.SHEEN) {\n fallbacks.addFallback(currentRank++, \"SHEEN\");\n }\n return currentRank;\n }\n getSamplers(samplers) {\n samplers.push(\"sheenSampler\", \"sheenRoughnessSampler\");\n }\n getUniforms() {\n return {\n ubo: [\n { name: \"vSheenColor\", size: 4, type: \"vec4\" },\n { name: \"vSheenRoughness\", size: 1, type: \"float\" },\n { name: \"vSheenInfos\", size: 4, type: \"vec4\" },\n { name: \"sheenMatrix\", size: 16, type: \"mat4\" },\n { name: \"sheenRoughnessMatrix\", size: 16, type: \"mat4\" },\n ],\n };\n }\n}\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"isEnabled\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"linkSheenWithAlbedo\", void 0);\n__decorate([\n serialize()\n], PBRSheenConfiguration.prototype, \"intensity\", void 0);\n__decorate([\n serializeAsColor3()\n], PBRSheenConfiguration.prototype, \"color\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"texture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"useRoughnessFromMainTexture\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"roughness\", void 0);\n__decorate([\n serializeAsTexture(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"textureRoughness\", void 0);\n__decorate([\n serialize(),\n expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\n], PBRSheenConfiguration.prototype, \"albedoScaling\", void 0);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAC/C;AACA,SAASC,SAAS,EAAEC,gBAAgB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,0BAA0B;AAC7G,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,aAAa,QAAQ,kCAAkC;AAEhE,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,iBAAiB,EAAEC,yBAAyB,QAAQ,gCAAgC;AAC7F;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,SAASH,eAAe,CAAC;EACtDI,WAAWA,CAAA,EAAG;IACV,KAAK,CAAC,GAAGC,SAAS,CAA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