da74db398ad395ef3ba49e1441ee01a3edd399a6f1eab8e198f496cc829982d8.json 87 KB

1
  1. {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { Engine } from \"../../Engines/engine.js\";\nimport { ShaderMaterial } from \"../../Materials/shaderMaterial.js\";\nimport { MultiRenderTarget } from \"../../Materials/Textures/multiRenderTarget.js\";\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Matrix, Vector3, Vector4 } from \"../../Maths/math.vector.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { PostProcess } from \"../../PostProcesses/postProcess.js\";\nimport { ProceduralTexture } from \"../../Materials/Textures/Procedurals/proceduralTexture.js\";\nimport { EffectRenderer, EffectWrapper } from \"../../Materials/effectRenderer.js\";\n/**\n * Voxel-based shadow rendering for IBL's.\n * This should not be instanciated directly, as it is part of a scene component\n * @internal\n * #8R5SSE#222\n */\nexport class _IblShadowsVoxelRenderer {\n /**\n * Return the voxel grid texture.\n * @returns The voxel grid texture.\n */\n getVoxelGrid() {\n if (this._triPlanarVoxelization) {\n return this._voxelGridRT;\n } else {\n return this._voxelGridZaxis;\n }\n }\n /**\n * The debug pass post process\n * @returns The debug pass post process\n */\n getDebugPassPP() {\n if (!this._voxelDebugPass) {\n this._createDebugPass();\n }\n return this._voxelDebugPass;\n }\n /**\n * Whether to use tri-planar voxelization. More expensive, but can help with artifacts.\n */\n get triPlanarVoxelization() {\n return this._triPlanarVoxelization;\n }\n /**\n * Whether to use tri-planar voxelization. More expensive, but can help with artifacts.\n */\n set triPlanarVoxelization(enabled) {\n if (this._triPlanarVoxelization === enabled) {\n return;\n }\n this._triPlanarVoxelization = enabled;\n this._disposeVoxelTextures();\n this._createTextures();\n }\n /**\n * Set the matrix to use for scaling the world space to voxel space\n * @param matrix The matrix to use for scaling the world space to voxel space\n */\n setWorldScaleMatrix(matrix) {\n this._invWorldScaleMatrix = matrix;\n }\n /**\n * @returns Whether voxelization is currently happening.\n */\n isVoxelizationInProgress() {\n return this._voxelizationInProgress;\n }\n /**\n * Resolution of the voxel grid. The final resolution will be 2^resolutionExp.\n */\n get voxelResolutionExp() {\n return this._voxelResolutionExp;\n }\n /**\n * Resolution of the voxel grid. The final resolution will be 2^resolutionExp.\n */\n set voxelResolutionExp(resolutionExp) {\n if (this._voxelResolutionExp === resolutionExp && this._voxelGridZaxis) {\n return;\n }\n this._voxelResolutionExp = Math.round(Math.min(Math.max(resolutionExp, 3), 9));\n this._voxelResolution = Math.pow(2.0, this._voxelResolutionExp);\n this._disposeVoxelTextures();\n this._createTextures();\n }\n /**\n * Shows only the voxels that were rendered along a particular axis (while using triPlanarVoxelization).\n * If not set, the combined voxel grid will be shown.\n * Note: This only works when the debugMipNumber is set to 0 because we don't generate mips for each axis.\n * @param axis The axis to show (0 = x, 1 = y, 2 = z)\n */\n set voxelDebugAxis(axis) {\n this._voxelDebugAxis = axis;\n }\n get voxelDebugAxis() {\n return this._voxelDebugAxis;\n }\n /**\n * Sets params that control the position and scaling of the debug display on the screen.\n * @param x Screen X offset of the debug display (0-1)\n * @param y Screen Y offset of the debug display (0-1)\n * @param widthScale X scale of the debug display (0-1)\n * @param heightScale Y scale of the debug display (0-1)\n */\n setDebugDisplayParams(x, y, widthScale, heightScale) {\n this._debugSizeParams.set(x, y, widthScale, heightScale);\n }\n /**\n * The mip level to show in the debug display\n * @param mipNum The mip level to show in the debug display\n */\n setDebugMipNumber(mipNum) {\n this._debugMipNumber = mipNum;\n }\n /**\n * Sets the name of the debug pass\n */\n get debugPassName() {\n return this._debugPassName;\n }\n /**\n * Enable or disable the debug view for this pass\n */\n get voxelDebugEnabled() {\n return this._voxelDebugEnabled;\n }\n set voxelDebugEnabled(enabled) {\n if (this._voxelDebugEnabled === enabled) {\n return;\n }\n this._voxelDebugEnabled = enabled;\n if (enabled) {\n this._voxelSlabDebugRT = new RenderTargetTexture(\"voxelSlabDebug\", {\n width: this._engine.getRenderWidth(),\n height: this._engine.getRenderHeight()\n }, this._scene, {\n generateDepthBuffer: true,\n generateMipMaps: false,\n type: 0,\n format: 5,\n samplingMode: 1\n });\n this._voxelSlabDebugRT.noPrePassRenderer = true;\n }\n if (this._voxelSlabDebugRT) {\n this._removeVoxelRTs([this._voxelSlabDebugRT]);\n }\n // Add the slab debug RT if needed.\n if (this._voxelDebugEnabled) {\n this._addRTsForRender([this._voxelSlabDebugRT], this._includedMeshes, this._voxelDebugAxis, 1, true);\n this._setDebugBindingsBound = this._setDebugBindings.bind(this);\n this._scene.onBeforeRenderObservable.add(this._setDebugBindingsBound);\n } else {\n this._scene.onBeforeRenderObservable.removeCallback(this._setDebugBindingsBound);\n }\n }\n /**\n * Creates the debug post process effect for this pass\n */\n _createDebugPass() {\n const isWebGPU = this._engine.isWebGPU;\n if (!this._voxelDebugPass) {\n const debugOptions = {\n width: this._engine.getRenderWidth(),\n height: this._engine.getRenderHeight(),\n textureFormat: 5,\n textureType: 0,\n samplingMode: 1,\n uniforms: [\"sizeParams\", \"mipNumber\"],\n samplers: [\"voxelTexture\", \"voxelSlabTexture\"],\n engine: this._engine,\n reusable: false,\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializations: (useWebGPU, list) => {\n if (this._isVoxelGrid3D) {\n if (useWebGPU) {\n list.push(import(\"../../ShadersWGSL/iblVoxelGrid3dDebug.fragment.js\"));\n } else {\n list.push(import(\"../../Shaders/iblVoxelGrid3dDebug.fragment.js\"));\n }\n return;\n }\n if (useWebGPU) {\n list.push(import(\"../../ShadersWGSL/iblVoxelGrid2dArrayDebug.fragment.js\"));\n } else {\n list.push(import(\"../../Shaders/iblVoxelGrid2dArrayDebug.fragment.js\"));\n }\n }\n };\n this._voxelDebugPass = new PostProcess(this.debugPassName, this._isVoxelGrid3D ? \"iblVoxelGrid3dDebug\" : \"iblVoxelGrid2dArrayDebug\", debugOptions);\n this._voxelDebugPass.onApplyObservable.add(effect => {\n if (this._voxelDebugAxis === 0) {\n effect.setTexture(\"voxelTexture\", this._voxelGridXaxis);\n } else if (this._voxelDebugAxis === 1) {\n effect.setTexture(\"voxelTexture\", this._voxelGridYaxis);\n } else if (this._voxelDebugAxis === 2) {\n effect.setTexture(\"voxelTexture\", this._voxelGridZaxis);\n } else {\n effect.setTexture(\"voxelTexture\", this.getVoxelGrid());\n }\n effect.setTexture(\"voxelSlabTexture\", this._voxelSlabDebugRT);\n effect.setVector4(\"sizeParams\", this._debugSizeParams);\n effect.setFloat(\"mipNumber\", this._debugMipNumber);\n });\n }\n }\n /**\n * Instanciates the voxel renderer\n * @param scene Scene to attach to\n * @param iblShadowsRenderPipeline The render pipeline this pass is associated with\n * @param resolutionExp Resolution of the voxel grid. The final resolution will be 2^resolutionExp.\n * @param triPlanarVoxelization Whether to use tri-planar voxelization. More expensive, but can help with artifacts.\n * @returns The voxel renderer\n */\n constructor(scene, iblShadowsRenderPipeline, resolutionExp = 6, triPlanarVoxelization = true) {\n this._voxelMrtsXaxis = [];\n this._voxelMrtsYaxis = [];\n this._voxelMrtsZaxis = [];\n this._isVoxelGrid3D = true;\n this._renderTargets = [];\n this._triPlanarVoxelization = true;\n this._voxelizationInProgress = false;\n this._invWorldScaleMatrix = Matrix.Identity();\n this._voxelResolution = 64;\n this._voxelResolutionExp = 6;\n this._mipArray = [];\n this._voxelDebugEnabled = false;\n this._voxelDebugAxis = -1;\n this._debugSizeParams = new Vector4(0.0, 0.0, 0.0, 0.0);\n this._includedMeshes = [];\n this._debugMipNumber = 0;\n this._debugPassName = \"Voxelization Debug Pass\";\n this._scene = scene;\n this._engine = scene.getEngine();\n this._triPlanarVoxelization = triPlanarVoxelization;\n if (!this._engine.getCaps().drawBuffersExtension) {\n Logger.Error(\"Can't do voxel rendering without the draw buffers extension.\");\n }\n const isWebGPU = this._engine.isWebGPU;\n this._maxDrawBuffers = this._engine.getCaps().maxDrawBuffers || 0;\n this._copyMipEffectRenderer = new EffectRenderer(this._engine);\n this._copyMipEffectWrapper = new EffectWrapper({\n engine: this._engine,\n fragmentShader: \"copyTexture3DLayerToTexture\",\n useShaderStore: true,\n uniformNames: [\"layerNum\"],\n samplerNames: [\"textureSampler\"],\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: function () {\n var _ref = _asyncToGenerator(function* () {\n if (isWebGPU) {\n yield import(\"../../ShadersWGSL/copyTexture3DLayerToTexture.fragment.js\");\n } else {\n yield import(\"../../Shaders/copyTexture3DLayerToTexture.fragment.js\");\n }\n });\n return function extraInitializationsAsync() {\n return _ref.apply(this, arguments);\n };\n }()\n });\n this.voxelResolutionExp = resolutionExp;\n }\n _generateMipMaps() {\n const iterations = Math.ceil(Math.log2(this._voxelResolution));\n for (let i = 1; i < iterations + 1; i++) {\n this._generateMipMap(i);\n }\n }\n _generateMipMap(lodLevel) {\n // Generate a mip map for the given level by triggering the render of the procedural mip texture.\n const mipTarget = this._mipArray[lodLevel - 1];\n if (!mipTarget) {\n return;\n }\n mipTarget.setTexture(\"srcMip\", lodLevel === 1 ? this.getVoxelGrid() : this._mipArray[lodLevel - 2]);\n mipTarget.render();\n }\n _copyMipMaps() {\n const iterations = Math.ceil(Math.log2(this._voxelResolution));\n for (let i = 1; i < iterations + 1; i++) {\n this._copyMipMap(i);\n }\n }\n _copyMipMap(lodLevel) {\n // Now, copy this mip into the mip chain of the voxel grid.\n // TODO - this currently isn't working. \"textureSampler\" isn't being properly set to mipTarget.\n const mipTarget = this._mipArray[lodLevel - 1];\n if (!mipTarget) {\n return;\n }\n const voxelGrid = this.getVoxelGrid();\n let rt;\n if (voxelGrid instanceof RenderTargetTexture && voxelGrid.renderTarget) {\n rt = voxelGrid.renderTarget;\n } else {\n rt = voxelGrid._rtWrapper;\n }\n if (rt) {\n this._copyMipEffectRenderer.saveStates();\n const bindSize = mipTarget.getSize().width;\n // Render to each layer of the voxel grid.\n for (let layer = 0; layer < bindSize; layer++) {\n this._engine.bindFramebuffer(rt, 0, bindSize, bindSize, true, lodLevel, layer);\n this._copyMipEffectRenderer.applyEffectWrapper(this._copyMipEffectWrapper);\n this._copyMipEffectWrapper.effect.setTexture(\"textureSampler\", mipTarget);\n this._copyMipEffectWrapper.effect.setInt(\"layerNum\", layer);\n this._copyMipEffectRenderer.draw();\n this._engine.unBindFramebuffer(rt, true);\n }\n this._copyMipEffectRenderer.restoreStates();\n }\n }\n _computeNumberOfSlabs() {\n return Math.ceil(this._voxelResolution / this._maxDrawBuffers);\n }\n _createTextures() {\n const isWebGPU = this._engine.isWebGPU;\n const size = {\n width: this._voxelResolution,\n height: this._voxelResolution,\n layers: this._isVoxelGrid3D ? undefined : this._voxelResolution,\n depth: this._isVoxelGrid3D ? this._voxelResolution : undefined\n };\n const voxelAxisOptions = {\n generateDepthBuffer: false,\n generateMipMaps: false,\n type: 0,\n format: 6,\n samplingMode: 1\n };\n // We can render up to maxDrawBuffers voxel slices of the grid per render.\n // We call this a slab.\n const numSlabs = this._computeNumberOfSlabs();\n const voxelCombinedOptions = {\n generateDepthBuffer: false,\n generateMipMaps: true,\n type: 0,\n format: 6,\n samplingMode: 4,\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: function () {\n var _ref2 = _asyncToGenerator(function* () {\n if (isWebGPU) {\n yield import(\"../../ShadersWGSL/iblCombineVoxelGrids.fragment.js\");\n } else {\n yield import(\"../../Shaders/iblCombineVoxelGrids.fragment.js\");\n }\n });\n return function extraInitializationsAsync() {\n return _ref2.apply(this, arguments);\n };\n }()\n };\n if (this._triPlanarVoxelization) {\n this._voxelGridXaxis = new RenderTargetTexture(\"voxelGridXaxis\", size, this._scene, voxelAxisOptions);\n this._voxelGridYaxis = new RenderTargetTexture(\"voxelGridYaxis\", size, this._scene, voxelAxisOptions);\n this._voxelGridZaxis = new RenderTargetTexture(\"voxelGridZaxis\", size, this._scene, voxelAxisOptions);\n this._voxelMrtsXaxis = this._createVoxelMRTs(\"x_axis_\", this._voxelGridXaxis, numSlabs);\n this._voxelMrtsYaxis = this._createVoxelMRTs(\"y_axis_\", this._voxelGridYaxis, numSlabs);\n this._voxelMrtsZaxis = this._createVoxelMRTs(\"z_axis_\", this._voxelGridZaxis, numSlabs);\n this._voxelGridRT = new ProceduralTexture(\"combinedVoxelGrid\", size, \"iblCombineVoxelGrids\", this._scene, voxelCombinedOptions, false);\n this._scene.proceduralTextures.splice(this._scene.proceduralTextures.indexOf(this._voxelGridRT), 1);\n this._voxelGridRT.setFloat(\"layer\", 0.0);\n this._voxelGridRT.setTexture(\"voxelXaxisSampler\", this._voxelGridXaxis);\n this._voxelGridRT.setTexture(\"voxelYaxisSampler\", this._voxelGridYaxis);\n this._voxelGridRT.setTexture(\"voxelZaxisSampler\", this._voxelGridZaxis);\n // We will render this only after voxelization is completed for the 3 axes.\n this._voxelGridRT.autoClear = false;\n this._voxelGridRT.wrapU = Texture.CLAMP_ADDRESSMODE;\n this._voxelGridRT.wrapV = Texture.CLAMP_ADDRESSMODE;\n } else {\n this._voxelGridZaxis = new RenderTargetTexture(\"voxelGridZaxis\", size, this._scene, voxelCombinedOptions);\n this._voxelMrtsZaxis = this._createVoxelMRTs(\"z_axis_\", this._voxelGridZaxis, numSlabs);\n }\n const generateVoxelMipOptions = {\n generateDepthBuffer: false,\n generateMipMaps: false,\n type: 0,\n format: 6,\n samplingMode: 1,\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: function () {\n var _ref3 = _asyncToGenerator(function* () {\n if (isWebGPU) {\n yield import(\"../../ShadersWGSL/iblGenerateVoxelMip.fragment.js\");\n } else {\n yield import(\"../../Shaders/iblGenerateVoxelMip.fragment.js\");\n }\n });\n return function extraInitializationsAsync() {\n return _ref3.apply(this, arguments);\n };\n }()\n };\n this._mipArray = new Array(Math.ceil(Math.log2(this._voxelResolution)));\n for (let mipIdx = 1; mipIdx <= this._mipArray.length; mipIdx++) {\n const mipDim = this._voxelResolution >> mipIdx;\n const mipSize = {\n width: mipDim,\n height: mipDim,\n depth: mipDim\n };\n this._mipArray[mipIdx - 1] = new ProceduralTexture(\"voxelMip\" + mipIdx, mipSize, \"iblGenerateVoxelMip\", this._scene, generateVoxelMipOptions, false);\n this._scene.proceduralTextures.splice(this._scene.proceduralTextures.indexOf(this._mipArray[mipIdx - 1]), 1);\n const mipTarget = this._mipArray[mipIdx - 1];\n mipTarget.autoClear = false;\n mipTarget.wrapU = Texture.CLAMP_ADDRESSMODE;\n mipTarget.wrapV = Texture.CLAMP_ADDRESSMODE;\n mipTarget.setTexture(\"srcMip\", mipIdx > 1 ? this._mipArray[mipIdx - 2] : this.getVoxelGrid());\n mipTarget.setInt(\"layerNum\", 0);\n }\n this._createVoxelMaterials();\n }\n _createVoxelMRTs(name, voxelRT, numSlabs) {\n voxelRT.wrapU = Texture.CLAMP_ADDRESSMODE;\n voxelRT.wrapV = Texture.CLAMP_ADDRESSMODE;\n voxelRT.noPrePassRenderer = true;\n const mrtArray = [];\n const targetTypes = new Array(this._maxDrawBuffers).fill(this._isVoxelGrid3D ? 32879 : 35866);\n for (let mrt_index = 0; mrt_index < numSlabs; mrt_index++) {\n let layerIndices = new Array(this._maxDrawBuffers).fill(0);\n layerIndices = layerIndices.map((value, index) => mrt_index * this._maxDrawBuffers + index);\n let textureNames = new Array(this._maxDrawBuffers).fill(\"\");\n textureNames = textureNames.map((value, index) => \"voxel_grid_\" + name + (mrt_index * this._maxDrawBuffers + index));\n const mrt = new MultiRenderTarget(\"mrt_\" + name + mrt_index, {\n width: this._voxelResolution,\n height: this._voxelResolution,\n depth: this._isVoxelGrid3D ? this._voxelResolution : undefined\n }, this._maxDrawBuffers,\n // number of draw buffers\n this._scene, {\n types: new Array(this._maxDrawBuffers).fill(0),\n samplingModes: new Array(this._maxDrawBuffers).fill(3),\n generateMipMaps: false,\n targetTypes,\n formats: new Array(this._maxDrawBuffers).fill(6),\n faceIndex: new Array(this._maxDrawBuffers).fill(0),\n layerIndex: layerIndices,\n layerCounts: new Array(this._maxDrawBuffers).fill(this._voxelResolution),\n generateDepthBuffer: false,\n generateStencilBuffer: false\n }, textureNames);\n mrt.clearColor = new Color4(0, 0, 0, 1);\n mrt.noPrePassRenderer = true;\n for (let i = 0; i < this._maxDrawBuffers; i++) {\n mrt.setInternalTexture(voxelRT.getInternalTexture(), i);\n }\n mrtArray.push(mrt);\n }\n return mrtArray;\n }\n _disposeVoxelTextures() {\n var _this$_voxelGridZaxis, _this$_voxelMaterial, _this$_voxelSlabDebug;\n this._stopVoxelization();\n for (let i = 0; i < this._voxelMrtsZaxis.length; i++) {\n if (this._triPlanarVoxelization) {\n this._voxelMrtsXaxis[i].dispose(true);\n this._voxelMrtsYaxis[i].dispose(true);\n }\n this._voxelMrtsZaxis[i].dispose(true);\n }\n if (this._triPlanarVoxelization) {\n var _this$_voxelGridXaxis, _this$_voxelGridYaxis, _this$_voxelGridRT;\n (_this$_voxelGridXaxis = this._voxelGridXaxis) === null || _this$_voxelGridXaxis === void 0 || _this$_voxelGridXaxis.dispose();\n (_this$_voxelGridYaxis = this._voxelGridYaxis) === null || _this$_voxelGridYaxis === void 0 || _this$_voxelGridYaxis.dispose();\n (_this$_voxelGridRT = this._voxelGridRT) === null || _this$_voxelGridRT === void 0 || _this$_voxelGridRT.dispose();\n }\n (_this$_voxelGridZaxis = this._voxelGridZaxis) === null || _this$_voxelGridZaxis === void 0 || _this$_voxelGridZaxis.dispose();\n this._mipArray.forEach(mip => {\n mip.dispose();\n });\n (_this$_voxelMaterial = this._voxelMaterial) === null || _this$_voxelMaterial === void 0 || _this$_voxelMaterial.dispose();\n (_this$_voxelSlabDebug = this._voxelSlabDebugMaterial) === null || _this$_voxelSlabDebug === void 0 || _this$_voxelSlabDebug.dispose();\n this._mipArray = [];\n this._voxelMrtsXaxis = [];\n this._voxelMrtsYaxis = [];\n this._voxelMrtsZaxis = [];\n }\n _createVoxelMaterials() {\n const isWebGPU = this._engine.isWebGPU;\n this._voxelMaterial = new ShaderMaterial(\"voxelization\", this._scene, \"iblVoxelGrid\", {\n uniforms: [\"world\", \"viewMatrix\", \"invWorldScale\", \"nearPlane\", \"farPlane\", \"stepSize\"],\n defines: [\"MAX_DRAW_BUFFERS \" + this._maxDrawBuffers],\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: function () {\n var _ref4 = _asyncToGenerator(function* () {\n if (isWebGPU) {\n yield Promise.all([import(\"../../ShadersWGSL/iblVoxelGrid.fragment.js\"), import(\"../../ShadersWGSL/iblVoxelGrid.vertex.js\")]);\n } else {\n yield Promise.all([import(\"../../Shaders/iblVoxelGrid.fragment.js\"), import(\"../../Shaders/iblVoxelGrid.vertex.js\")]);\n }\n });\n return function extraInitializationsAsync() {\n return _ref4.apply(this, arguments);\n };\n }()\n });\n this._voxelMaterial.cullBackFaces = false;\n this._voxelMaterial.backFaceCulling = false;\n this._voxelMaterial.depthFunction = Engine.ALWAYS;\n this._voxelSlabDebugMaterial = new ShaderMaterial(\"voxelSlabDebug\", this._scene, \"iblVoxelSlabDebug\", {\n uniforms: [\"world\", \"viewMatrix\", \"cameraViewMatrix\", \"projection\", \"invWorldScale\", \"nearPlane\", \"farPlane\", \"stepSize\"],\n defines: [\"MAX_DRAW_BUFFERS \" + this._maxDrawBuffers],\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: function () {\n var _ref5 = _asyncToGenerator(function* () {\n if (isWebGPU) {\n yield Promise.all([import(\"../../ShadersWGSL/iblVoxelSlabDebug.fragment.js\"), import(\"../../ShadersWGSL/iblVoxelSlabDebug.vertex.js\")]);\n } else {\n yield Promise.all([import(\"../../Shaders/iblVoxelSlabDebug.fragment.js\"), import(\"../../Shaders/iblVoxelSlabDebug.vertex.js\")]);\n }\n });\n return function extraInitializationsAsync() {\n return _ref5.apply(this, arguments);\n };\n }()\n });\n }\n _setDebugBindings() {\n this._voxelSlabDebugMaterial.setMatrix(\"projection\", this._scene.activeCamera.getProjectionMatrix());\n this._voxelSlabDebugMaterial.setMatrix(\"cameraViewMatrix\", this._scene.activeCamera.getViewMatrix());\n }\n /**\n * Checks if the voxel renderer is ready to voxelize scene\n * @returns true if the voxel renderer is ready to voxelize scene\n */\n isReady() {\n let allReady = this.getVoxelGrid().isReady();\n for (let i = 0; i < this._mipArray.length; i++) {\n const mipReady = this._mipArray[i].isReady();\n allReady && (allReady = mipReady);\n }\n if (!allReady || this._voxelizationInProgress) {\n return false;\n }\n return true;\n }\n /**\n * If the MRT's are already in the list of render targets, this will\n * remove them so that they don't get rendered again.\n */\n _stopVoxelization() {\n // If the MRT's are already in the list of render targets, remove them.\n this._removeVoxelRTs(this._voxelMrtsXaxis);\n this._removeVoxelRTs(this._voxelMrtsYaxis);\n this._removeVoxelRTs(this._voxelMrtsZaxis);\n }\n _removeVoxelRTs(rts) {\n // const currentRTs = this._scene.customRenderTargets;\n const rtIdx = this._renderTargets.findIndex(rt => {\n if (rt === rts[0]) return true;\n return false;\n });\n if (rtIdx >= 0) {\n this._renderTargets.splice(rtIdx, rts.length);\n } else {\n const rtIdx = this._scene.customRenderTargets.findIndex(rt => {\n if (rt === rts[0]) return true;\n return false;\n });\n if (rtIdx >= 0) {\n this._scene.customRenderTargets.splice(rtIdx, rts.length);\n }\n }\n }\n /**\n * Renders voxel grid of scene for IBL shadows\n * @param includedMeshes\n */\n updateVoxelGrid(includedMeshes) {\n this._stopVoxelization();\n this._includedMeshes = includedMeshes;\n this._voxelizationInProgress = true;\n if (this._triPlanarVoxelization) {\n this._addRTsForRender(this._voxelMrtsXaxis, includedMeshes, 0);\n this._addRTsForRender(this._voxelMrtsYaxis, includedMeshes, 1);\n this._addRTsForRender(this._voxelMrtsZaxis, includedMeshes, 2);\n } else {\n this._addRTsForRender(this._voxelMrtsZaxis, includedMeshes, 2);\n }\n if (this._voxelDebugEnabled) {\n this._addRTsForRender([this._voxelSlabDebugRT], includedMeshes, this._voxelDebugAxis, 1, true);\n }\n this._renderVoxelGridBound = this._renderVoxelGrid.bind(this);\n this._scene.onAfterRenderObservable.add(this._renderVoxelGridBound);\n }\n _renderVoxelGrid() {\n if (this._voxelizationInProgress) {\n let allReady = this.getVoxelGrid().isReady();\n for (let i = 0; i < this._mipArray.length; i++) {\n const mipReady = this._mipArray[i].isReady();\n allReady && (allReady = mipReady);\n }\n for (let i = 0; i < this._renderTargets.length; i++) {\n const rttReady = this._renderTargets[i].isReadyForRendering();\n allReady && (allReady = rttReady);\n }\n if (allReady) {\n this._renderTargets.forEach(rt => {\n rt.render();\n });\n this._stopVoxelization();\n if (this._triPlanarVoxelization) {\n this._voxelGridRT.render();\n }\n this._generateMipMaps();\n this._copyMipMaps();\n this._scene.onAfterRenderObservable.removeCallback(this._renderVoxelGridBound);\n this._voxelizationInProgress = false;\n }\n }\n }\n _addRTsForRender(mrts, includedMeshes, axis, shaderType = 0, continuousRender = false) {\n const slabSize = 1.0 / this._computeNumberOfSlabs();\n let voxelMaterial;\n if (shaderType === 0) {\n voxelMaterial = this._voxelMaterial;\n } else {\n voxelMaterial = this._voxelSlabDebugMaterial;\n }\n // We need to update the world scale uniform for every mesh being rendered to the voxel grid.\n mrts.forEach((mrt, mrtIndex) => {\n mrt.renderList = [];\n const nearPlane = mrtIndex * slabSize;\n const farPlane = (mrtIndex + 1) * slabSize;\n const stepSize = slabSize / this._maxDrawBuffers;\n const cameraPosition = new Vector3(0, 0, 0);\n let targetPosition = new Vector3(0, 0, 1);\n if (axis === 0) {\n targetPosition = new Vector3(1, 0, 0);\n } else if (axis === 1) {\n targetPosition = new Vector3(0, 1, 0);\n }\n let upDirection = new Vector3(0, 1, 0);\n if (axis === 1) {\n upDirection = new Vector3(1, 0, 0);\n }\n mrt.onBeforeRenderObservable.add(() => {\n voxelMaterial.setMatrix(\"viewMatrix\", Matrix.LookAtLH(cameraPosition, targetPosition, upDirection));\n voxelMaterial.setMatrix(\"invWorldScale\", this._invWorldScaleMatrix);\n voxelMaterial.setFloat(\"nearPlane\", nearPlane);\n voxelMaterial.setFloat(\"farPlane\", farPlane);\n voxelMaterial.setFloat(\"stepSize\", stepSize);\n });\n // Set this material on every mesh in the scene (for this RT)\n if (includedMeshes.length === 0) {\n return;\n }\n includedMeshes.forEach(mesh => {\n if (mesh) {\n if (mesh.subMeshes && mesh.subMeshes.length > 0) {\n var _mrt$renderList;\n (_mrt$renderList = mrt.renderList) === null || _mrt$renderList === void 0 || _mrt$renderList.push(mesh);\n mrt.setMaterialForRendering(mesh, voxelMaterial);\n }\n mesh.getChildMeshes().forEach(childMesh => {\n if (childMesh.subMeshes && childMesh.subMeshes.length > 0) {\n var _mrt$renderList2;\n (_mrt$renderList2 = mrt.renderList) === null || _mrt$renderList2 === void 0 || _mrt$renderList2.push(childMesh);\n mrt.setMaterialForRendering(childMesh, voxelMaterial);\n }\n });\n }\n });\n });\n // Add the MRT's to render.\n if (continuousRender) {\n mrts.forEach(mrt => {\n if (this._scene.customRenderTargets.indexOf(mrt) === -1) {\n this._scene.customRenderTargets.push(mrt);\n }\n });\n } else {\n this._renderTargets = this._renderTargets.concat(mrts);\n }\n }\n /**\n * Called by the pipeline to resize resources.\n */\n resize() {\n var _this$_voxelSlabDebug2;\n (_this$_voxelSlabDebug2 = this._voxelSlabDebugRT) === null || _this$_voxelSlabDebug2 === void 0 || _this$_voxelSlabDebug2.resize({\n width: this._scene.getEngine().getRenderWidth(),\n height: this._scene.getEngine().getRenderHeight()\n });\n }\n /**\n * Disposes the voxel renderer and associated resources\n */\n dispose() {\n this._disposeVoxelTextures();\n if (this._voxelSlabDebugRT) {\n this._removeVoxelRTs([this._voxelSlabDebugRT]);\n this._voxelSlabDebugRT.dispose();\n }\n if (this._voxelDebugPass) {\n this._voxelDebugPass.dispose();\n }\n // TODO - dispose all created voxel materials.\n }\n}","map":{"version":3,"names":["Engine","ShaderMaterial","MultiRenderTarget","RenderTargetTexture","Color4","Matrix","Vector3","Vector4","Texture","Logger","PostProcess","ProceduralTexture","EffectRenderer","EffectWrapper","_IblShadowsVoxelRenderer","getVoxelGrid","_triPlanarVoxelization","_voxelGridRT","_voxelGridZaxis","getDebugPassPP","_voxelDebugPass","_createDebugPass","triPlanarVoxelization","enabled","_disposeVoxelTextures","_createTextures","setWorldScaleMatrix","matrix","_invWorldScaleMatrix","isVoxelizationInProgress","_voxelizationInProgress","voxelResolutionExp","_voxelResolutionExp","resolutionExp","Math","round","min","max","_voxelResolution","pow","voxelDebugAxis","axis","_voxelDebugAxis","setDebugDisplayParams","x","y","widthScale","heightScale","_debugSizeParams","set","setDebugMipNumber","mipNum","_debugMipNumber","debugPassName","_debugPassName","voxelDebugEnabled","_voxelDebugEnabled","_voxelSlabDebugRT","width","_engine","getRenderWidth","height","getRenderHeight","_scene","generateDepthBuffer","generateMipMaps","type","format","samplingMode","noPrePassRenderer","_removeVoxelRTs","_addRTsForRender","_includedMeshes","_setDebugBindingsBound","_setDebugBindings","bind","onBeforeRenderObservable","add","removeCallback","isWebGPU","debugOptions","textureFormat","textureType","uniforms","samplers","engine","reusable","shaderLanguage","extraInitializations","useWebGPU","list","_isVoxelGrid3D","push","onApplyObservable","effect","setTexture","_voxelGridXaxis","_voxelGridYaxis","setVector4","setFloat","constructor","scene","iblShadowsRenderPipeline","_voxelMrtsXaxis","_voxelMrtsYaxis","_voxelMrtsZaxis","_renderTargets","Identity","_mipArray","getEngine","getCaps","drawBuffersExtension","Error","_maxDrawBuffers","maxDrawBuffers","_copyMipEffectRenderer","_copyMipEffectWrapper","fragmentShader","useShaderStore","uniformNames","samplerNames","extraInitializationsAsync","_ref","_asyncToGenerator","apply","arguments","_generateMipMaps","iterations","ceil","log2","i","_generateMipMap","lodLevel","mipTarget","render","_copyMipMaps","_copyMipMap","voxelGrid","rt","renderTarget","_rtWrapper","saveStates","bindSize","getSize","layer","bindFramebuffer","applyEffectWrapper","setInt","draw","unBindFramebuffer","restoreStates","_computeNumberOfSlabs","size","layers","undefined","depth","voxelAxisOptions","numSlabs","voxelCombinedOptions","_ref2","_createVoxelMRTs","proceduralTextures","splice","indexOf","autoClear","wrapU","CLAMP_ADDRESSMODE","wrapV","generateVoxelMipOptions","_ref3","Array","mipIdx","length","mipDim","mipSize","_createVoxelMaterials","name","voxelRT","mrtArray","targetTypes","fill","mrt_index","layerIndices","map","value","index","textureNames","mrt","types","samplingModes","formats","faceIndex","layerIndex","layerCounts","generateStencilBuffer","clearColor","setInternalTexture","getInternalTexture","_this$_voxelGridZaxis","_this$_voxelMaterial","_this$_voxelSlabDebug","_stopVoxelization","dispose","_this$_voxelGridXaxis","_this$_voxelGridYaxis","_this$_voxelGridRT","forEach","mip","_voxelMaterial","_voxelSlabDebugMaterial","defines","_ref4","Promise","all","cullBackFaces","backFaceCulling","depthFunction","ALWAYS","_ref5","setMatrix","activeCamera","getProjectionMatrix","getViewMatrix","isReady","allReady","mipReady","rts","rtIdx","findIndex","customRenderTargets","updateVoxelGrid","includedMeshes","_renderVoxelGridBound","_renderVoxelGrid","onAfterRenderObservable","rttReady","isReadyForRendering","mrts","shaderType","continuousRender","slabSize","voxelMaterial","mrtIndex","renderList","nearPlane","farPlane","stepSize","cameraPosition","targetPosition","upDirection","LookAtLH","mesh","subMeshes","_mrt$renderList","setMaterialForRendering","getChildMeshes","childMesh","_mrt$renderList2","concat","resize","_this$_voxelSlabDebug2"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Rendering/IBLShadows/iblShadowsVoxelRenderer.js"],"sourcesContent":["\nimport { Engine } from \"../../Engines/engine.js\";\nimport { ShaderMaterial } from \"../../Materials/shaderMaterial.js\";\nimport { MultiRenderTarget } from \"../../Materials/Textures/multiRenderTarget.js\";\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture.js\";\nimport { Color4 } from \"../../Maths/math.color.js\";\nimport { Matrix, Vector3, Vector4 } from \"../../Maths/math.vector.js\";\nimport { Texture } from \"../../Materials/Textures/texture.js\";\nimport { Logger } from \"../../Misc/logger.js\";\nimport { PostProcess } from \"../../PostProcesses/postProcess.js\";\nimport { ProceduralTexture } from \"../../Materials/Textures/Procedurals/proceduralTexture.js\";\nimport { EffectRenderer, EffectWrapper } from \"../../Materials/effectRenderer.js\";\n/**\n * Voxel-based shadow rendering for IBL's.\n * This should not be instanciated directly, as it is part of a scene component\n * @internal\n * #8R5SSE#222\n */\nexport class _IblShadowsVoxelRenderer {\n /**\n * Return the voxel grid texture.\n * @returns The voxel grid texture.\n */\n getVoxelGrid() {\n if (this._triPlanarVoxelization) {\n return this._voxelGridRT;\n }\n else {\n return this._voxelGridZaxis;\n }\n }\n /**\n * The debug pass post process\n * @returns The debug pass post process\n */\n getDebugPassPP() {\n if (!this._voxelDebugPass) {\n this._createDebugPass();\n }\n return this._voxelDebugPass;\n }\n /**\n * Whether to use tri-planar voxelization. More expensive, but can help with artifacts.\n */\n get triPlanarVoxelization() {\n return this._triPlanarVoxelization;\n }\n /**\n * Whether to use tri-planar voxelization. More expensive, but can help with artifacts.\n */\n set triPlanarVoxelization(enabled) {\n if (this._triPlanarVoxelization === enabled) {\n return;\n }\n this._triPlanarVoxelization = enabled;\n this._disposeVoxelTextures();\n this._createTextures();\n }\n /**\n * Set the matrix to use for scaling the world space to voxel space\n * @param matrix The matrix to use for scaling the world space to voxel space\n */\n setWorldScaleMatrix(matrix) {\n this._invWorldScaleMatrix = matrix;\n }\n /**\n * @returns Whether voxelization is currently happening.\n */\n isVoxelizationInProgress() {\n return this._voxelizationInProgress;\n }\n /**\n * Resolution of the voxel grid. The final resolution will be 2^resolutionExp.\n */\n get voxelResolutionExp() {\n return this._voxelResolutionExp;\n }\n /**\n * Resolution of the voxel grid. The final resolution will be 2^resolutionExp.\n */\n set voxelResolutionExp(resolutionExp) {\n if (this._voxelResolutionExp === resolutionExp && this._voxelGridZaxis) {\n return;\n }\n this._voxelResolutionExp = Math.round(Math.min(Math.max(resolutionExp, 3), 9));\n this._voxelResolution = Math.pow(2.0, this._voxelResolutionExp);\n this._disposeVoxelTextures();\n this._createTextures();\n }\n /**\n * Shows only the voxels that were rendered along a particular axis (while using triPlanarVoxelization).\n * If not set, the combined voxel grid will be shown.\n * Note: This only works when the debugMipNumber is set to 0 because we don't generate mips for each axis.\n * @param axis The axis to show (0 = x, 1 = y, 2 = z)\n */\n set voxelDebugAxis(axis) {\n this._voxelDebugAxis = axis;\n }\n get voxelDebugAxis() {\n return this._voxelDebugAxis;\n }\n /**\n * Sets params that control the position and scaling of the debug display on the screen.\n * @param x Screen X offset of the debug display (0-1)\n * @param y Screen Y offset of the debug display (0-1)\n * @param widthScale X scale of the debug display (0-1)\n * @param heightScale Y scale of the debug display (0-1)\n */\n setDebugDisplayParams(x, y, widthScale, heightScale) {\n this._debugSizeParams.set(x, y, widthScale, heightScale);\n }\n /**\n * The mip level to show in the debug display\n * @param mipNum The mip level to show in the debug display\n */\n setDebugMipNumber(mipNum) {\n this._debugMipNumber = mipNum;\n }\n /**\n * Sets the name of the debug pass\n */\n get debugPassName() {\n return this._debugPassName;\n }\n /**\n * Enable or disable the debug view for this pass\n */\n get voxelDebugEnabled() {\n return this._voxelDebugEnabled;\n }\n set voxelDebugEnabled(enabled) {\n if (this._voxelDebugEnabled === enabled) {\n return;\n }\n this._voxelDebugEnabled = enabled;\n if (enabled) {\n this._voxelSlabDebugRT = new RenderTargetTexture(\"voxelSlabDebug\", { width: this._engine.getRenderWidth(), height: this._engine.getRenderHeight() }, this._scene, {\n generateDepthBuffer: true,\n generateMipMaps: false,\n type: 0,\n format: 5,\n samplingMode: 1,\n });\n this._voxelSlabDebugRT.noPrePassRenderer = true;\n }\n if (this._voxelSlabDebugRT) {\n this._removeVoxelRTs([this._voxelSlabDebugRT]);\n }\n // Add the slab debug RT if needed.\n if (this._voxelDebugEnabled) {\n this._addRTsForRender([this._voxelSlabDebugRT], this._includedMeshes, this._voxelDebugAxis, 1, true);\n this._setDebugBindingsBound = this._setDebugBindings.bind(this);\n this._scene.onBeforeRenderObservable.add(this._setDebugBindingsBound);\n }\n else {\n this._scene.onBeforeRenderObservable.removeCallback(this._setDebugBindingsBound);\n }\n }\n /**\n * Creates the debug post process effect for this pass\n */\n _createDebugPass() {\n const isWebGPU = this._engine.isWebGPU;\n if (!this._voxelDebugPass) {\n const debugOptions = {\n width: this._engine.getRenderWidth(),\n height: this._engine.getRenderHeight(),\n textureFormat: 5,\n textureType: 0,\n samplingMode: 1,\n uniforms: [\"sizeParams\", \"mipNumber\"],\n samplers: [\"voxelTexture\", \"voxelSlabTexture\"],\n engine: this._engine,\n reusable: false,\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializations: (useWebGPU, list) => {\n if (this._isVoxelGrid3D) {\n if (useWebGPU) {\n list.push(import(\"../../ShadersWGSL/iblVoxelGrid3dDebug.fragment.js\"));\n }\n else {\n list.push(import(\"../../Shaders/iblVoxelGrid3dDebug.fragment.js\"));\n }\n return;\n }\n if (useWebGPU) {\n list.push(import(\"../../ShadersWGSL/iblVoxelGrid2dArrayDebug.fragment.js\"));\n }\n else {\n list.push(import(\"../../Shaders/iblVoxelGrid2dArrayDebug.fragment.js\"));\n }\n },\n };\n this._voxelDebugPass = new PostProcess(this.debugPassName, this._isVoxelGrid3D ? \"iblVoxelGrid3dDebug\" : \"iblVoxelGrid2dArrayDebug\", debugOptions);\n this._voxelDebugPass.onApplyObservable.add((effect) => {\n if (this._voxelDebugAxis === 0) {\n effect.setTexture(\"voxelTexture\", this._voxelGridXaxis);\n }\n else if (this._voxelDebugAxis === 1) {\n effect.setTexture(\"voxelTexture\", this._voxelGridYaxis);\n }\n else if (this._voxelDebugAxis === 2) {\n effect.setTexture(\"voxelTexture\", this._voxelGridZaxis);\n }\n else {\n effect.setTexture(\"voxelTexture\", this.getVoxelGrid());\n }\n effect.setTexture(\"voxelSlabTexture\", this._voxelSlabDebugRT);\n effect.setVector4(\"sizeParams\", this._debugSizeParams);\n effect.setFloat(\"mipNumber\", this._debugMipNumber);\n });\n }\n }\n /**\n * Instanciates the voxel renderer\n * @param scene Scene to attach to\n * @param iblShadowsRenderPipeline The render pipeline this pass is associated with\n * @param resolutionExp Resolution of the voxel grid. The final resolution will be 2^resolutionExp.\n * @param triPlanarVoxelization Whether to use tri-planar voxelization. More expensive, but can help with artifacts.\n * @returns The voxel renderer\n */\n constructor(scene, iblShadowsRenderPipeline, resolutionExp = 6, triPlanarVoxelization = true) {\n this._voxelMrtsXaxis = [];\n this._voxelMrtsYaxis = [];\n this._voxelMrtsZaxis = [];\n this._isVoxelGrid3D = true;\n this._renderTargets = [];\n this._triPlanarVoxelization = true;\n this._voxelizationInProgress = false;\n this._invWorldScaleMatrix = Matrix.Identity();\n this._voxelResolution = 64;\n this._voxelResolutionExp = 6;\n this._mipArray = [];\n this._voxelDebugEnabled = false;\n this._voxelDebugAxis = -1;\n this._debugSizeParams = new Vector4(0.0, 0.0, 0.0, 0.0);\n this._includedMeshes = [];\n this._debugMipNumber = 0;\n this._debugPassName = \"Voxelization Debug Pass\";\n this._scene = scene;\n this._engine = scene.getEngine();\n this._triPlanarVoxelization = triPlanarVoxelization;\n if (!this._engine.getCaps().drawBuffersExtension) {\n Logger.Error(\"Can't do voxel rendering without the draw buffers extension.\");\n }\n const isWebGPU = this._engine.isWebGPU;\n this._maxDrawBuffers = this._engine.getCaps().maxDrawBuffers || 0;\n this._copyMipEffectRenderer = new EffectRenderer(this._engine);\n this._copyMipEffectWrapper = new EffectWrapper({\n engine: this._engine,\n fragmentShader: \"copyTexture3DLayerToTexture\",\n useShaderStore: true,\n uniformNames: [\"layerNum\"],\n samplerNames: [\"textureSampler\"],\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: async () => {\n if (isWebGPU) {\n await import(\"../../ShadersWGSL/copyTexture3DLayerToTexture.fragment.js\");\n }\n else {\n await import(\"../../Shaders/copyTexture3DLayerToTexture.fragment.js\");\n }\n },\n });\n this.voxelResolutionExp = resolutionExp;\n }\n _generateMipMaps() {\n const iterations = Math.ceil(Math.log2(this._voxelResolution));\n for (let i = 1; i < iterations + 1; i++) {\n this._generateMipMap(i);\n }\n }\n _generateMipMap(lodLevel) {\n // Generate a mip map for the given level by triggering the render of the procedural mip texture.\n const mipTarget = this._mipArray[lodLevel - 1];\n if (!mipTarget) {\n return;\n }\n mipTarget.setTexture(\"srcMip\", lodLevel === 1 ? this.getVoxelGrid() : this._mipArray[lodLevel - 2]);\n mipTarget.render();\n }\n _copyMipMaps() {\n const iterations = Math.ceil(Math.log2(this._voxelResolution));\n for (let i = 1; i < iterations + 1; i++) {\n this._copyMipMap(i);\n }\n }\n _copyMipMap(lodLevel) {\n // Now, copy this mip into the mip chain of the voxel grid.\n // TODO - this currently isn't working. \"textureSampler\" isn't being properly set to mipTarget.\n const mipTarget = this._mipArray[lodLevel - 1];\n if (!mipTarget) {\n return;\n }\n const voxelGrid = this.getVoxelGrid();\n let rt;\n if (voxelGrid instanceof RenderTargetTexture && voxelGrid.renderTarget) {\n rt = voxelGrid.renderTarget;\n }\n else {\n rt = voxelGrid._rtWrapper;\n }\n if (rt) {\n this._copyMipEffectRenderer.saveStates();\n const bindSize = mipTarget.getSize().width;\n // Render to each layer of the voxel grid.\n for (let layer = 0; layer < bindSize; layer++) {\n this._engine.bindFramebuffer(rt, 0, bindSize, bindSize, true, lodLevel, layer);\n this._copyMipEffectRenderer.applyEffectWrapper(this._copyMipEffectWrapper);\n this._copyMipEffectWrapper.effect.setTexture(\"textureSampler\", mipTarget);\n this._copyMipEffectWrapper.effect.setInt(\"layerNum\", layer);\n this._copyMipEffectRenderer.draw();\n this._engine.unBindFramebuffer(rt, true);\n }\n this._copyMipEffectRenderer.restoreStates();\n }\n }\n _computeNumberOfSlabs() {\n return Math.ceil(this._voxelResolution / this._maxDrawBuffers);\n }\n _createTextures() {\n const isWebGPU = this._engine.isWebGPU;\n const size = {\n width: this._voxelResolution,\n height: this._voxelResolution,\n layers: this._isVoxelGrid3D ? undefined : this._voxelResolution,\n depth: this._isVoxelGrid3D ? this._voxelResolution : undefined,\n };\n const voxelAxisOptions = {\n generateDepthBuffer: false,\n generateMipMaps: false,\n type: 0,\n format: 6,\n samplingMode: 1,\n };\n // We can render up to maxDrawBuffers voxel slices of the grid per render.\n // We call this a slab.\n const numSlabs = this._computeNumberOfSlabs();\n const voxelCombinedOptions = {\n generateDepthBuffer: false,\n generateMipMaps: true,\n type: 0,\n format: 6,\n samplingMode: 4,\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: async () => {\n if (isWebGPU) {\n await import(\"../../ShadersWGSL/iblCombineVoxelGrids.fragment.js\");\n }\n else {\n await import(\"../../Shaders/iblCombineVoxelGrids.fragment.js\");\n }\n },\n };\n if (this._triPlanarVoxelization) {\n this._voxelGridXaxis = new RenderTargetTexture(\"voxelGridXaxis\", size, this._scene, voxelAxisOptions);\n this._voxelGridYaxis = new RenderTargetTexture(\"voxelGridYaxis\", size, this._scene, voxelAxisOptions);\n this._voxelGridZaxis = new RenderTargetTexture(\"voxelGridZaxis\", size, this._scene, voxelAxisOptions);\n this._voxelMrtsXaxis = this._createVoxelMRTs(\"x_axis_\", this._voxelGridXaxis, numSlabs);\n this._voxelMrtsYaxis = this._createVoxelMRTs(\"y_axis_\", this._voxelGridYaxis, numSlabs);\n this._voxelMrtsZaxis = this._createVoxelMRTs(\"z_axis_\", this._voxelGridZaxis, numSlabs);\n this._voxelGridRT = new ProceduralTexture(\"combinedVoxelGrid\", size, \"iblCombineVoxelGrids\", this._scene, voxelCombinedOptions, false);\n this._scene.proceduralTextures.splice(this._scene.proceduralTextures.indexOf(this._voxelGridRT), 1);\n this._voxelGridRT.setFloat(\"layer\", 0.0);\n this._voxelGridRT.setTexture(\"voxelXaxisSampler\", this._voxelGridXaxis);\n this._voxelGridRT.setTexture(\"voxelYaxisSampler\", this._voxelGridYaxis);\n this._voxelGridRT.setTexture(\"voxelZaxisSampler\", this._voxelGridZaxis);\n // We will render this only after voxelization is completed for the 3 axes.\n this._voxelGridRT.autoClear = false;\n this._voxelGridRT.wrapU = Texture.CLAMP_ADDRESSMODE;\n this._voxelGridRT.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n else {\n this._voxelGridZaxis = new RenderTargetTexture(\"voxelGridZaxis\", size, this._scene, voxelCombinedOptions);\n this._voxelMrtsZaxis = this._createVoxelMRTs(\"z_axis_\", this._voxelGridZaxis, numSlabs);\n }\n const generateVoxelMipOptions = {\n generateDepthBuffer: false,\n generateMipMaps: false,\n type: 0,\n format: 6,\n samplingMode: 1,\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: async () => {\n if (isWebGPU) {\n await import(\"../../ShadersWGSL/iblGenerateVoxelMip.fragment.js\");\n }\n else {\n await import(\"../../Shaders/iblGenerateVoxelMip.fragment.js\");\n }\n },\n };\n this._mipArray = new Array(Math.ceil(Math.log2(this._voxelResolution)));\n for (let mipIdx = 1; mipIdx <= this._mipArray.length; mipIdx++) {\n const mipDim = this._voxelResolution >> mipIdx;\n const mipSize = { width: mipDim, height: mipDim, depth: mipDim };\n this._mipArray[mipIdx - 1] = new ProceduralTexture(\"voxelMip\" + mipIdx, mipSize, \"iblGenerateVoxelMip\", this._scene, generateVoxelMipOptions, false);\n this._scene.proceduralTextures.splice(this._scene.proceduralTextures.indexOf(this._mipArray[mipIdx - 1]), 1);\n const mipTarget = this._mipArray[mipIdx - 1];\n mipTarget.autoClear = false;\n mipTarget.wrapU = Texture.CLAMP_ADDRESSMODE;\n mipTarget.wrapV = Texture.CLAMP_ADDRESSMODE;\n mipTarget.setTexture(\"srcMip\", mipIdx > 1 ? this._mipArray[mipIdx - 2] : this.getVoxelGrid());\n mipTarget.setInt(\"layerNum\", 0);\n }\n this._createVoxelMaterials();\n }\n _createVoxelMRTs(name, voxelRT, numSlabs) {\n voxelRT.wrapU = Texture.CLAMP_ADDRESSMODE;\n voxelRT.wrapV = Texture.CLAMP_ADDRESSMODE;\n voxelRT.noPrePassRenderer = true;\n const mrtArray = [];\n const targetTypes = new Array(this._maxDrawBuffers).fill(this._isVoxelGrid3D ? 32879 : 35866);\n for (let mrt_index = 0; mrt_index < numSlabs; mrt_index++) {\n let layerIndices = new Array(this._maxDrawBuffers).fill(0);\n layerIndices = layerIndices.map((value, index) => mrt_index * this._maxDrawBuffers + index);\n let textureNames = new Array(this._maxDrawBuffers).fill(\"\");\n textureNames = textureNames.map((value, index) => \"voxel_grid_\" + name + (mrt_index * this._maxDrawBuffers + index));\n const mrt = new MultiRenderTarget(\"mrt_\" + name + mrt_index, { width: this._voxelResolution, height: this._voxelResolution, depth: this._isVoxelGrid3D ? this._voxelResolution : undefined }, this._maxDrawBuffers, // number of draw buffers\n this._scene, {\n types: new Array(this._maxDrawBuffers).fill(0),\n samplingModes: new Array(this._maxDrawBuffers).fill(3),\n generateMipMaps: false,\n targetTypes,\n formats: new Array(this._maxDrawBuffers).fill(6),\n faceIndex: new Array(this._maxDrawBuffers).fill(0),\n layerIndex: layerIndices,\n layerCounts: new Array(this._maxDrawBuffers).fill(this._voxelResolution),\n generateDepthBuffer: false,\n generateStencilBuffer: false,\n }, textureNames);\n mrt.clearColor = new Color4(0, 0, 0, 1);\n mrt.noPrePassRenderer = true;\n for (let i = 0; i < this._maxDrawBuffers; i++) {\n mrt.setInternalTexture(voxelRT.getInternalTexture(), i);\n }\n mrtArray.push(mrt);\n }\n return mrtArray;\n }\n _disposeVoxelTextures() {\n this._stopVoxelization();\n for (let i = 0; i < this._voxelMrtsZaxis.length; i++) {\n if (this._triPlanarVoxelization) {\n this._voxelMrtsXaxis[i].dispose(true);\n this._voxelMrtsYaxis[i].dispose(true);\n }\n this._voxelMrtsZaxis[i].dispose(true);\n }\n if (this._triPlanarVoxelization) {\n this._voxelGridXaxis?.dispose();\n this._voxelGridYaxis?.dispose();\n this._voxelGridRT?.dispose();\n }\n this._voxelGridZaxis?.dispose();\n this._mipArray.forEach((mip) => {\n mip.dispose();\n });\n this._voxelMaterial?.dispose();\n this._voxelSlabDebugMaterial?.dispose();\n this._mipArray = [];\n this._voxelMrtsXaxis = [];\n this._voxelMrtsYaxis = [];\n this._voxelMrtsZaxis = [];\n }\n _createVoxelMaterials() {\n const isWebGPU = this._engine.isWebGPU;\n this._voxelMaterial = new ShaderMaterial(\"voxelization\", this._scene, \"iblVoxelGrid\", {\n uniforms: [\"world\", \"viewMatrix\", \"invWorldScale\", \"nearPlane\", \"farPlane\", \"stepSize\"],\n defines: [\"MAX_DRAW_BUFFERS \" + this._maxDrawBuffers],\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: async () => {\n if (isWebGPU) {\n await Promise.all([import(\"../../ShadersWGSL/iblVoxelGrid.fragment.js\"), import(\"../../ShadersWGSL/iblVoxelGrid.vertex.js\")]);\n }\n else {\n await Promise.all([import(\"../../Shaders/iblVoxelGrid.fragment.js\"), import(\"../../Shaders/iblVoxelGrid.vertex.js\")]);\n }\n },\n });\n this._voxelMaterial.cullBackFaces = false;\n this._voxelMaterial.backFaceCulling = false;\n this._voxelMaterial.depthFunction = Engine.ALWAYS;\n this._voxelSlabDebugMaterial = new ShaderMaterial(\"voxelSlabDebug\", this._scene, \"iblVoxelSlabDebug\", {\n uniforms: [\"world\", \"viewMatrix\", \"cameraViewMatrix\", \"projection\", \"invWorldScale\", \"nearPlane\", \"farPlane\", \"stepSize\"],\n defines: [\"MAX_DRAW_BUFFERS \" + this._maxDrawBuffers],\n shaderLanguage: isWebGPU ? 1 /* ShaderLanguage.WGSL */ : 0 /* ShaderLanguage.GLSL */,\n extraInitializationsAsync: async () => {\n if (isWebGPU) {\n await Promise.all([import(\"../../ShadersWGSL/iblVoxelSlabDebug.fragment.js\"), import(\"../../ShadersWGSL/iblVoxelSlabDebug.vertex.js\")]);\n }\n else {\n await Promise.all([import(\"../../Shaders/iblVoxelSlabDebug.fragment.js\"), import(\"../../Shaders/iblVoxelSlabDebug.vertex.js\")]);\n }\n },\n });\n }\n _setDebugBindings() {\n this._voxelSlabDebugMaterial.setMatrix(\"projection\", this._scene.activeCamera.getProjectionMatrix());\n this._voxelSlabDebugMaterial.setMatrix(\"cameraViewMatrix\", this._scene.activeCamera.getViewMatrix());\n }\n /**\n * Checks if the voxel renderer is ready to voxelize scene\n * @returns true if the voxel renderer is ready to voxelize scene\n */\n isReady() {\n let allReady = this.getVoxelGrid().isReady();\n for (let i = 0; i < this._mipArray.length; i++) {\n const mipReady = this._mipArray[i].isReady();\n allReady && (allReady = mipReady);\n }\n if (!allReady || this._voxelizationInProgress) {\n return false;\n }\n return true;\n }\n /**\n * If the MRT's are already in the list of render targets, this will\n * remove them so that they don't get rendered again.\n */\n _stopVoxelization() {\n // If the MRT's are already in the list of render targets, remove them.\n this._removeVoxelRTs(this._voxelMrtsXaxis);\n this._removeVoxelRTs(this._voxelMrtsYaxis);\n this._removeVoxelRTs(this._voxelMrtsZaxis);\n }\n _removeVoxelRTs(rts) {\n // const currentRTs = this._scene.customRenderTargets;\n const rtIdx = this._renderTargets.findIndex((rt) => {\n if (rt === rts[0])\n return true;\n return false;\n });\n if (rtIdx >= 0) {\n this._renderTargets.splice(rtIdx, rts.length);\n }\n else {\n const rtIdx = this._scene.customRenderTargets.findIndex((rt) => {\n if (rt === rts[0])\n return true;\n return false;\n });\n if (rtIdx >= 0) {\n this._scene.customRenderTargets.splice(rtIdx, rts.length);\n }\n }\n }\n /**\n * Renders voxel grid of scene for IBL shadows\n * @param includedMeshes\n */\n updateVoxelGrid(includedMeshes) {\n this._stopVoxelization();\n this._includedMeshes = includedMeshes;\n this._voxelizationInProgress = true;\n if (this._triPlanarVoxelization) {\n this._addRTsForRender(this._voxelMrtsXaxis, includedMeshes, 0);\n this._addRTsForRender(this._voxelMrtsYaxis, includedMeshes, 1);\n this._addRTsForRender(this._voxelMrtsZaxis, includedMeshes, 2);\n }\n else {\n this._addRTsForRender(this._voxelMrtsZaxis, includedMeshes, 2);\n }\n if (this._voxelDebugEnabled) {\n this._addRTsForRender([this._voxelSlabDebugRT], includedMeshes, this._voxelDebugAxis, 1, true);\n }\n this._renderVoxelGridBound = this._renderVoxelGrid.bind(this);\n this._scene.onAfterRenderObservable.add(this._renderVoxelGridBound);\n }\n _renderVoxelGrid() {\n if (this._voxelizationInProgress) {\n let allReady = this.getVoxelGrid().isReady();\n for (let i = 0; i < this._mipArray.length; i++) {\n const mipReady = this._mipArray[i].isReady();\n allReady && (allReady = mipReady);\n }\n for (let i = 0; i < this._renderTargets.length; i++) {\n const rttReady = this._renderTargets[i].isReadyForRendering();\n allReady && (allReady = rttReady);\n }\n if (allReady) {\n this._renderTargets.forEach((rt) => {\n rt.render();\n });\n this._stopVoxelization();\n if (this._triPlanarVoxelization) {\n this._voxelGridRT.render();\n }\n this._generateMipMaps();\n this._copyMipMaps();\n this._scene.onAfterRenderObservable.removeCallback(this._renderVoxelGridBound);\n this._voxelizationInProgress = false;\n }\n }\n }\n _addRTsForRender(mrts, includedMeshes, axis, shaderType = 0, continuousRender = false) {\n const slabSize = 1.0 / this._computeNumberOfSlabs();\n let voxelMaterial;\n if (shaderType === 0) {\n voxelMaterial = this._voxelMaterial;\n }\n else {\n voxelMaterial = this._voxelSlabDebugMaterial;\n }\n // We need to update the world scale uniform for every mesh being rendered to the voxel grid.\n mrts.forEach((mrt, mrtIndex) => {\n mrt.renderList = [];\n const nearPlane = mrtIndex * slabSize;\n const farPlane = (mrtIndex + 1) * slabSize;\n const stepSize = slabSize / this._maxDrawBuffers;\n const cameraPosition = new Vector3(0, 0, 0);\n let targetPosition = new Vector3(0, 0, 1);\n if (axis === 0) {\n targetPosition = new Vector3(1, 0, 0);\n }\n else if (axis === 1) {\n targetPosition = new Vector3(0, 1, 0);\n }\n let upDirection = new Vector3(0, 1, 0);\n if (axis === 1) {\n upDirection = new Vector3(1, 0, 0);\n }\n mrt.onBeforeRenderObservable.add(() => {\n voxelMaterial.setMatrix(\"viewMatrix\", Matrix.LookAtLH(cameraPosition, targetPosition, upDirection));\n voxelMaterial.setMatrix(\"invWorldScale\", this._invWorldScaleMatrix);\n voxelMaterial.setFloat(\"nearPlane\", nearPlane);\n voxelMaterial.setFloat(\"farPlane\", farPlane);\n voxelMaterial.setFloat(\"stepSize\", stepSize);\n });\n // Set this material on every mesh in the scene (for this RT)\n if (includedMeshes.length === 0) {\n return;\n }\n includedMeshes.forEach((mesh) => {\n if (mesh) {\n if (mesh.subMeshes && mesh.subMeshes.length > 0) {\n mrt.renderList?.push(mesh);\n mrt.setMaterialForRendering(mesh, voxelMaterial);\n }\n mesh.getChildMeshes().forEach((childMesh) => {\n if (childMesh.subMeshes && childMesh.subMeshes.length > 0) {\n mrt.renderList?.push(childMesh);\n mrt.setMaterialForRendering(childMesh, voxelMaterial);\n }\n });\n }\n });\n });\n // Add the MRT's to render.\n if (continuousRender) {\n mrts.forEach((mrt) => {\n if (this._scene.customRenderTargets.indexOf(mrt) === -1) {\n this._scene.customRenderTargets.push(mrt);\n }\n });\n }\n else {\n this._renderTargets = this._renderTargets.concat(mrts);\n }\n }\n /**\n * Called by the pipeline to resize resources.\n */\n resize() {\n this._voxelSlabDebugRT?.resize({ width: this._scene.getEngine().getRenderWidth(), height: this._scene.getEngine().getRenderHeight() });\n }\n /**\n * Disposes the voxel renderer and associated resources\n */\n dispose() {\n this._disposeVoxelTextures();\n if (this._voxelSlabDebugRT) {\n this._removeVoxelRTs([this._voxelSlabDebugRT]);\n this._voxelSlabDebugRT.dispose();\n }\n if (this._voxelDebugPass) {\n this._voxelDebugPass.dispose();\n }\n //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