python-cad-tools 0.1.3.dev2__py3-none-any.whl → 0.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_cad_tools/_viewer_static/asset-manifest.json +1 -1
- python_cad_tools/_viewer_static/assets/{animationGroup-CjhCwiIi.js → animationGroup-DsIEQ73q.js} +1 -1
- python_cad_tools/_viewer_static/assets/{bakedVertexAnimation-_xBvgBl7.js → bakedVertexAnimation-CZalW6MY.js} +1 -1
- python_cad_tools/_viewer_static/assets/{basisTextureLoader-D5LtrhD-.js → basisTextureLoader-COAjXVqP.js} +1 -1
- python_cad_tools/_viewer_static/assets/{brdfTextureTools-D9U08KSH.js → brdfTextureTools-BHIclPmG.js} +2 -2
- python_cad_tools/_viewer_static/assets/{bumpFragment-BkzgDMwt.js → bumpFragment-VvIKAANw.js} +1 -1
- python_cad_tools/_viewer_static/assets/{bumpVertex-BXtiaDZI.js → bumpVertex-DLicej86.js} +1 -1
- python_cad_tools/_viewer_static/assets/{bumpVertexDeclaration-CchYDl1F.js → bumpVertexDeclaration-DaRKbtcX.js} +1 -1
- python_cad_tools/_viewer_static/assets/{clipPlaneFragment-pIdOfJ_5.js → clipPlaneFragment-Cllz8e_G.js} +1 -1
- python_cad_tools/_viewer_static/assets/{clipPlaneVertex-Kl_G8tpP.js → clipPlaneVertex-ChqMABPH.js} +1 -1
- python_cad_tools/_viewer_static/assets/{cubemapToSphericalPolynomial-CJ4cRmPh.js → cubemapToSphericalPolynomial-Xk086_Qo.js} +1 -1
- python_cad_tools/_viewer_static/assets/dds-C6ZccGbi.js +1 -0
- python_cad_tools/_viewer_static/assets/{dds.pure-BoNGq59u.js → dds.pure-DQ1rbFUk.js} +1 -1
- python_cad_tools/_viewer_static/assets/{ddsTextureLoader-D8JRisWC.js → ddsTextureLoader-CL_A0T2G.js} +1 -1
- python_cad_tools/_viewer_static/assets/{default.fragment-D0gXI89M.js → default.fragment-hdxpe8Dp.js} +1 -1
- python_cad_tools/_viewer_static/assets/{default.vertex-BdO0XLk6.js → default.vertex-BLL2IEXP.js} +1 -1
- python_cad_tools/_viewer_static/assets/{defaultUboDeclaration-BJ4b62qj.js → defaultUboDeclaration-kpQOJEVS.js} +1 -1
- python_cad_tools/_viewer_static/assets/{dumpTools-B7F8Ed3A.js → dumpTools-CUtvg5MO.js} +2 -2
- python_cad_tools/_viewer_static/assets/{envTextureLoader-BnvTfKgF.js → envTextureLoader-Bha4zu64.js} +1 -1
- python_cad_tools/_viewer_static/assets/{exrTextureLoader-C2D3Wx-p.js → exrTextureLoader-DGetsIyD.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphApplyForceBlock-C08kKLog.js → flowGraphApplyForceBlock-D0SE4mA-.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphApplyImpulseBlock-GzK2l9nm.js → flowGraphApplyImpulseBlock-DTkgPEFB.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphArrayIndexBlock-DkRHIuYC.js → flowGraphArrayIndexBlock-Cjyt2bwB.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphBezierCurveEasingBlock-Csol8jUn.js → flowGraphBezierCurveEasingBlock-DWxYlhxj.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphBinaryOperationBlock-C-xEeg-Z.js → flowGraphBinaryOperationBlock-BeXLKyeD.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphBranchBlock-D7bstQqM.js → flowGraphBranchBlock-BqigJ1AN.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphCachedOperationBlock-C0pDPzaF.js → flowGraphCachedOperationBlock-D2544szv.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphCancelDelayBlock-VwnDZhN9.js → flowGraphCancelDelayBlock-DS-QhXgE.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphCodeExecutionBlock-C5aa0K7t.js → flowGraphCodeExecutionBlock-BY0Vhd0M.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphConditionalDataBlock-B4vfaSDi.js → flowGraphConditionalDataBlock-DoNGzuFZ.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphConsoleLogBlock-CuLlYu4c.js → flowGraphConsoleLogBlock-CL1zETuj.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphConstantBlock-DkyD6_YZ.js → flowGraphConstantBlock-b0L3Bfv_.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphContextBlock-IKUbfY32.js → flowGraphContextBlock-CE3gLEM4.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphCounterBlock-tP_5qAQn.js → flowGraphCounterBlock-Z6deq4Xb.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphDataSwitchBlock-DiTgopj3.js → flowGraphDataSwitchBlock-wfFU7ZMz.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphDebounceBlock-FLUJTpdt.js → flowGraphDebounceBlock-B5U221PZ.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphDebugBlock-C0EH9zPP.js → flowGraphDebugBlock-CpuIkgZU.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphDoNBlock-DiAdBjnD.js → flowGraphDoNBlock-ByWmK6vQ.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphEasingBlock-CXlIILZe.js → flowGraphEasingBlock-CRs4rMj_.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphFlipFlopBlock-5XRf4KeD.js → flowGraphFlipFlopBlock-CK5fJiSy.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphForLoopBlock-RitJ6OS_.js → flowGraphForLoopBlock-H1FPxMZo.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphFunctionReferenceBlock-DvVIlipg.js → flowGraphFunctionReferenceBlock-DrieLYOj.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGLTFDataProvider-BxBUrprf.js → flowGraphGLTFDataProvider-D7vSBwR1.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGetAngularVelocityBlock-CqBDBjqf.js → flowGraphGetAngularVelocityBlock-CkYrIYRL.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGetAssetBlock-Dk4qKn1w.js → flowGraphGetAssetBlock-BOr56oxs.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGetLinearVelocityBlock-DNN6N9mt.js → flowGraphGetLinearVelocityBlock-4Mn8MDsq.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGetPhysicsMassPropertiesBlock-CTsHqDvM.js → flowGraphGetPhysicsMassPropertiesBlock-DwufqO-4.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGetPropertyBlock-CjX3cseU.js → flowGraphGetPropertyBlock-CAeZqGoL.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGetSoundVolumeBlock-DzWJtlM9.js → flowGraphGetSoundVolumeBlock-DfnjXMG_.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphGetVariableBlock-uBq6vXOw.js → flowGraphGetVariableBlock-Bw2aRjaE.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphIndexOfBlock-MpANR6P1.js → flowGraphIndexOfBlock-DuZkczUp.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphInterpolationBlock-BM2_pZfB.js → flowGraphInterpolationBlock-CQUVrJhI.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphIsKeyPressedBlock-X1Q2SR0H.js → flowGraphIsKeyPressedBlock-CKMqA1DR.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphIsSoundPlayingBlock-C_ir8hba.js → flowGraphIsSoundPlayingBlock-CIAX4gsj.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphJsonPointerParserBlock-I5tJhTaw.js → flowGraphJsonPointerParserBlock-Bt9WkFOM.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphKeyDownEventBlock-DSmmDXBR.js → flowGraphKeyDownEventBlock-BwXDwLBi.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphKeyUpEventBlock-BDViriRD.js → flowGraphKeyUpEventBlock-BH_q1Ope.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphKeyboardEventBlock-B7EQjaZe.js → flowGraphKeyboardEventBlock-CU8VJhCC.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphMathBlocks-RIndR7Kr.js → flowGraphMathBlocks-TXHKXyeY.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphMathCombineExtractBlocks-BEMkyBCM.js → flowGraphMathCombineExtractBlocks-DKuB9Mlq.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphMatrixMathBlocks-BAV1wScN.js → flowGraphMatrixMathBlocks-BGDHmBFG.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphMeshPickEventBlock-CcNT5f0d.js → flowGraphMeshPickEventBlock-DdOr-Hvu.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphMultiGateBlock-DSEbX2Mj.js → flowGraphMultiGateBlock-qMXK-ALx.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPauseAnimationBlock-Dfthx2s-.js → flowGraphPauseAnimationBlock-hPtKOUnY.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPauseSoundBlock-DSu8v9Kr.js → flowGraphPauseSoundBlock-BGBSlkM3.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPhysicsCollisionEventBlock-jvE_54c8.js → flowGraphPhysicsCollisionEventBlock-7YfMt_A1.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPlayAnimationBlock-DK8Z5heh.js → flowGraphPlayAnimationBlock-C9_H0W1H.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPlaySoundBlock-XiF7wfi1.js → flowGraphPlaySoundBlock-BhG6uJmA.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPointerDownEventBlock-BOqQHgdZ.js → flowGraphPointerDownEventBlock-GBPgkHfj.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPointerMoveEventBlock-DggBfxkF.js → flowGraphPointerMoveEventBlock-B9xb5ipq.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPointerOutEventBlock-DvZyyUF4.js → flowGraphPointerOutEventBlock-DZE1Ulng.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPointerOverEventBlock-YLki8WEB.js → flowGraphPointerOverEventBlock-Bx_Bbmlm.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphPointerUpEventBlock-D1tqJ9jF.js → flowGraphPointerUpEventBlock-Lfu7DTHO.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphReceiveCustomEventBlock-D3VAKTpt.js → flowGraphReceiveCustomEventBlock-CNMufa4Q.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSceneReadyEventBlock-Dt8AsNSg.js → flowGraphSceneReadyEventBlock-BInxhpxK.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSceneTickEventBlock-BtuZ_Spn.js → flowGraphSceneTickEventBlock-DTDZyoc3.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSendCustomEventBlock-B8Dzycmf.js → flowGraphSendCustomEventBlock-BOGgKOnP.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSequenceBlock-CQsb2okn.js → flowGraphSequenceBlock-D-FGr9Zw.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSetAngularVelocityBlock-C3zOq5X7.js → flowGraphSetAngularVelocityBlock-CH6VePBl.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSetDelayBlock-DxyUb-8k.js → flowGraphSetDelayBlock-n6qAMb7Q.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSetLinearVelocityBlock-DeNTJQ42.js → flowGraphSetLinearVelocityBlock-DcqJhGqB.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSetPhysicsMotionTypeBlock-i233RoWe.js → flowGraphSetPhysicsMotionTypeBlock-DRWqANvn.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSetPropertyBlock-Darrnz2o.js → flowGraphSetPropertyBlock-D_IoFmjW.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSetSoundVolumeBlock-KrTTGHr6.js → flowGraphSetSoundVolumeBlock-Cu0qdSne.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSetVariableBlock-8CdS1h8e.js → flowGraphSetVariableBlock-ob3vWA--.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSoundEndedEventBlock-Cuk8JjDG.js → flowGraphSoundEndedEventBlock-C2d303hL.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphStopAnimationBlock-DOsG4sc5.js → flowGraphStopAnimationBlock-BqCklpFH.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphStopSoundBlock-C5IaCPpa.js → flowGraphStopSoundBlock-bk8E55Bx.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphSwitchBlock-ClqiypjM.js → flowGraphSwitchBlock-DvwhuZhG.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphThrottleBlock-C7hhfNo2.js → flowGraphThrottleBlock-DG8TRsJy.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphTransformCoordinatesSystemBlock-BksU6sPJ.js → flowGraphTransformCoordinatesSystemBlock-CH4muGsP.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphTypeToTypeBlocks-DJi_CBW-.js → flowGraphTypeToTypeBlocks-C7hV0GKG.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphUnaryOperationBlock-U15mYQbJ.js → flowGraphUnaryOperationBlock-DiLGLHtc.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphVectorMathBlocks-D4QAvgsk.js → flowGraphVectorMathBlocks-USb1v61c.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphWaitAllBlock-UV6LDk1r.js → flowGraphWaitAllBlock-D5X16kvu.js} +1 -1
- python_cad_tools/_viewer_static/assets/{flowGraphWhileLoopBlock-DPpNHwZP.js → flowGraphWhileLoopBlock-Be9fTLoy.js} +1 -1
- python_cad_tools/_viewer_static/assets/{fogFragment-pKchdx3M.js → fogFragment-BzLCRCIz.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplatting-oRLzV71m.js → gaussianSplatting-CAfPyqPa.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplatting-DgjcxjKa.js → gaussianSplatting-DPftVbu_.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplatting.fragment-BKYuCXf7.js → gaussianSplatting.fragment--eSkFo4e.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplatting.fragment-NCxeyHg7.js → gaussianSplatting.fragment-bBe4NB4J.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplatting.vertex-CW0PXB4s.js → gaussianSplatting.vertex-56pdhT0C.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplatting.vertex-zmXoP8p9.js → gaussianSplatting.vertex-B1n9hp15.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplattingVoxel.fragment-CgX-XH5m.js → gaussianSplattingVoxel.fragment-BZapF5sB.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplattingVoxel.fragment--IDQcS1p.js → gaussianSplattingVoxel.fragment-CX6nBRSU.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplattingVoxel.vertex-DzuuyEGB.js → gaussianSplattingVoxel.vertex-COp6zd-l.js} +1 -1
- python_cad_tools/_viewer_static/assets/{gaussianSplattingVoxel.vertex-YB1C1Muy.js → gaussianSplattingVoxel.vertex-aXKOzvn3.js} +1 -1
- python_cad_tools/_viewer_static/assets/{geometry.fragment-EEbMy57o.js → geometry.fragment-BEdt-FQu.js} +1 -1
- python_cad_tools/_viewer_static/assets/{geometry.fragment-DuBDWlLB.js → geometry.fragment-Dr1pGbVQ.js} +1 -1
- python_cad_tools/_viewer_static/assets/{geometry.vertex-3cVZEKxJ.js → geometry.vertex--elQa6vQ.js} +1 -1
- python_cad_tools/_viewer_static/assets/{geometry.vertex-B--XA-QK.js → geometry.vertex-C4cLov7Q.js} +1 -1
- python_cad_tools/_viewer_static/assets/{glowBlurPostProcess.fragment-UNz8njEJ.js → glowBlurPostProcess.fragment-C_S_GG9X.js} +1 -1
- python_cad_tools/_viewer_static/assets/{glowMapGeneration.fragment-CsSqgq6c.js → glowMapGeneration.fragment-B9tAmR9r.js} +1 -1
- python_cad_tools/_viewer_static/assets/{glowMapGeneration.vertex-DOMHadFA.js → glowMapGeneration.vertex-CEIj_3tv.js} +1 -1
- python_cad_tools/_viewer_static/assets/{glowMapMerge.fragment-DXi2v5pz.js → glowMapMerge.fragment-C0kWfvu0.js} +1 -1
- python_cad_tools/_viewer_static/assets/{glowMapMerge.vertex-DgBSWFHP.js → glowMapMerge.vertex-DPy1k2mD.js} +1 -1
- python_cad_tools/_viewer_static/assets/{harmonicsFunctions-BkifmnNV.js → harmonicsFunctions-BVmgiiRj.js} +1 -1
- python_cad_tools/_viewer_static/assets/{helperFunctions-Bx8RYYvi.js → helperFunctions-DeCJcXoK.js} +1 -1
- python_cad_tools/_viewer_static/assets/{iesTextureLoader-Dj5K0vc1.js → iesTextureLoader-CLEy0Gjc.js} +1 -1
- python_cad_tools/_viewer_static/assets/{index-JRwY7p9T.js → index-YcXsPtFI.js} +21 -19
- python_cad_tools/_viewer_static/assets/{kernelBlur.fragment-BRdwtDs7.js → kernelBlur.fragment-DhmP78e4.js} +1 -1
- python_cad_tools/_viewer_static/assets/{kernelBlur.fragment-B9YDiI_M.js → kernelBlur.fragment-DzyofO4j.js} +1 -1
- python_cad_tools/_viewer_static/assets/{kernelBlur.vertex-CWlIunB6.js → kernelBlur.vertex-1S6DR99z.js} +1 -1
- python_cad_tools/_viewer_static/assets/{kernelBlur.vertex-A7OpqdrG.js → kernelBlur.vertex-BUw8hyu8.js} +1 -1
- python_cad_tools/_viewer_static/assets/{kernelBlurVaryingDeclaration-PE5ICZNw.js → kernelBlurVaryingDeclaration-DPnSKXPz.js} +1 -1
- python_cad_tools/_viewer_static/assets/{kernelBlurVaryingDeclaration-YMenN7Se.js → kernelBlurVaryingDeclaration-GWJW2YR3.js} +1 -1
- python_cad_tools/_viewer_static/assets/{ktxTextureLoader-uG9TUdGM.js → ktxTextureLoader-Bz9RqBRq.js} +1 -1
- python_cad_tools/_viewer_static/assets/{lightFragment-CDLhoaId.js → lightFragment-BRkIPUO1.js} +1 -1
- python_cad_tools/_viewer_static/assets/{logDepthDeclaration-BOlhc3aa.js → logDepthDeclaration-DHeJwlJR.js} +1 -1
- python_cad_tools/_viewer_static/assets/{logDepthVertex-BIA9Xrid.js → logDepthVertex-Dt5zdVFA.js} +1 -1
- python_cad_tools/_viewer_static/assets/{mainUVVaryingDeclaration-PmIDYGIz.js → mainUVVaryingDeclaration-CoUbOUEQ.js} +1 -1
- python_cad_tools/_viewer_static/assets/{meshUboDeclaration-BfPhZsyr.js → meshUboDeclaration-dDsFbRSv.js} +1 -1
- python_cad_tools/_viewer_static/assets/{oitFragment-DpKfMtsk.js → oitFragment-C1JYx8fS.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbr.fragment-BAOdoy3Z.js → openpbr.fragment-BJTs78x9.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbr.fragment-BmgNfxS4.js → openpbr.fragment-CnBW8BK7.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbr.vertex-BpB-7aXl.js → openpbr.vertex-Cis9aL4z.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbr.vertex-D-IjPutK.js → openpbr.vertex-Qr3-JJak.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbrMaterial.pure-C6V2SeQx.js → openpbrMaterial.pure-CyogTmBA.js} +3 -3
- python_cad_tools/_viewer_static/assets/{openpbrMaterialLoadingAdapter-CbcwuEwB.js → openpbrMaterialLoadingAdapter-Ia3_0Gp8.js} +2 -2
- python_cad_tools/_viewer_static/assets/{openpbrTransmissionLayerData-BClMu_zp.js → openpbrTransmissionLayerData-D2UaStdu.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbrTransmissionLayerData-1U_DHNWK.js → openpbrTransmissionLayerData-Yc4m_LFv.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbrUboDeclaration-piwBvKOi.js → openpbrUboDeclaration-DfY3S0VX.js} +1 -1
- python_cad_tools/_viewer_static/assets/{openpbrUboDeclaration-DLujw3YH.js → openpbrUboDeclaration-YAeSpo2n.js} +1 -1
- python_cad_tools/_viewer_static/assets/{packingFunctions-BD5WZtBT.js → packingFunctions-BWIusbYB.js} +1 -1
- python_cad_tools/_viewer_static/assets/{packingFunctions-D3gaUkUa.js → packingFunctions-yE7XM0N6.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pass.fragment-CzZpaqYk.js → pass.fragment-DsLu0lV1.js} +1 -1
- python_cad_tools/_viewer_static/assets/{passCube.fragment-DwRJ1H1s.js → passCube.fragment-CmSU0-bM.js} +1 -1
- python_cad_tools/_viewer_static/assets/{passCube.fragment-Bso78Amo.js → passCube.fragment-CwkS-Cl_.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pbr.fragment-sZ-foSaO.js → pbr.fragment-BUBggeRz.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pbr.vertex-PBjkpyNN.js → pbr.vertex-BXB7uMkC.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pbrBRDFFunctions-Dv8-Akv1.js → pbrBRDFFunctions-C50h7JEU.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pbrDebug-5RaK38tC.js → pbrDebug-RHma8ghT.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pbrIBLFunctions-D_X-tzpO.js → pbrIBLFunctions-D5A_AxnZ.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pbrMaterial.pure-RJ6tVczH.js → pbrMaterial.pure-DN58n3w5.js} +2 -2
- python_cad_tools/_viewer_static/assets/{pbrMaterialLoadingAdapter-BqlfZ1xs.js → pbrMaterialLoadingAdapter-COioUqvP.js} +1 -1
- python_cad_tools/_viewer_static/assets/{pbrUboDeclaration-BqNgF1qB.js → pbrUboDeclaration-CMkwjzTB.js} +1 -1
- python_cad_tools/_viewer_static/assets/{postprocess.vertex-9J4kRI6V.js → postprocess.vertex-DYv0bAut.js} +1 -1
- python_cad_tools/_viewer_static/assets/{procedural.vertex-Bq_A-zE0.js → procedural.vertex-BMAV1XYH.js} +1 -1
- python_cad_tools/_viewer_static/assets/{procedural.vertex-DzkBufoo.js → procedural.vertex-CRCZXfiw.js} +1 -1
- python_cad_tools/_viewer_static/assets/{reflectionFunction-n0dvho3A.js → reflectionFunction-CpMEFzxv.js} +1 -1
- python_cad_tools/_viewer_static/assets/{rgbdDecode.fragment-0BuGamw5.js → rgbdDecode.fragment-BZcVE2Bb.js} +1 -1
- python_cad_tools/_viewer_static/assets/{rgbdEncode.fragment-BBGe9kwu.js → rgbdEncode.fragment-BImEwGmR.js} +1 -1
- python_cad_tools/_viewer_static/assets/{rgbdEncode.fragment-DiiD2NE-.js → rgbdEncode.fragment-DPFzMtDN.js} +1 -1
- python_cad_tools/_viewer_static/assets/{sceneUboDeclaration-BmpwedcW.js → sceneUboDeclaration-1bB3YoON.js} +1 -1
- python_cad_tools/_viewer_static/assets/{textureProcessor.fragment-CyBHPXX2.js → textureProcessor.fragment--dZBsr4X.js} +1 -1
- python_cad_tools/_viewer_static/assets/{textureProcessor.fragment-CwNRejEe.js → textureProcessor.fragment-BlZ9kg3B.js} +1 -1
- python_cad_tools/_viewer_static/assets/{tgaTextureLoader-ClB6SRY9.js → tgaTextureLoader-DeroIE2j.js} +1 -1
- python_cad_tools/_viewer_static/assets/{vertexColorMixing-f4wQRwGI.js → vertexColorMixing-C6OHmVcI.js} +1 -1
- python_cad_tools/_viewer_static/index.html +1 -1
- python_cad_tools/build-info.json +1 -1
- {python_cad_tools-0.1.3.dev2.dist-info → python_cad_tools-0.1.4.dist-info}/METADATA +1 -1
- python_cad_tools-0.1.4.dist-info/RECORD +237 -0
- python_cad_tools/_viewer_static/assets/dds-YsWo1VVF.js +0 -1
- python_cad_tools-0.1.3.dev2.dist-info/RECORD +0 -239
- python_cad_tools-0.1.3.dev2.dist-info/scm_file_list.json +0 -304
- python_cad_tools-0.1.3.dev2.dist-info/scm_version.json +0 -8
- {python_cad_tools-0.1.3.dev2.dist-info → python_cad_tools-0.1.4.dist-info}/WHEEL +0 -0
- {python_cad_tools-0.1.3.dev2.dist-info → python_cad_tools-0.1.4.dist-info}/entry_points.txt +0 -0
- {python_cad_tools-0.1.3.dev2.dist-info → python_cad_tools-0.1.4.dist-info}/licenses/LICENSE +0 -0
- {python_cad_tools-0.1.3.dev2.dist-info → python_cad_tools-0.1.4.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./geometry.vertex-
|
|
2
|
-
import{bp as Ae,L as De,av as Ll,aS as Zl,aw as Pe,b8 as zt,aN as wt,aA as Gt,ay as be,aR as $,bq as ae,br as Ul,bs as Kl,bt as jl,bu as Ql,M as ql,bv as $l,aT as ne,bw as Wl,bx as wl,by as Jl,bz as c,bA as _,a9 as ve,c as Re,aO as i,a7 as Gl,bB as eo,au as to,bC as Dl,bD as Pl,bE as so,bF as io,a0 as pe,bG as Ut,bH as ro,bI as ao,bJ as no,bK as lo,bL as oo,bM as uo,bN as ho,bO as co,bP as _o,bQ as fo,bR as To,bS as go,bT as mo,bU as po,bV as xo,bW as Ro,bX as Ao,bY as Wt,bZ as Eo,b_ as So,b$ as Mo,c0 as Io,c1 as bo,c2 as yo,c3 as Oo,c4 as Co,c5 as Fo,aU as h,c6 as Lo,c7 as Do,i as Po,c8 as No,c9 as vo,V as ko,ca as Bo,cb as zo,cc as Uo,cd as p,aV as X,ce as Y}from"./index-JRwY7p9T.js";import{G as Wo,a as Nl}from"./brdfTextureTools-D9U08KSH.js";function wo(r){return class extends r{constructor(){super(...arguments),this.REFLECTION=!1,this.REFLECTIONMAP_3D=!1,this.REFLECTIONMAP_SPHERICAL=!1,this.REFLECTIONMAP_PLANAR=!1,this.REFLECTIONMAP_CUBIC=!1,this.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,this.REFLECTIONMAP_PROJECTION=!1,this.REFLECTIONMAP_SKYBOX=!1,this.REFLECTIONMAP_EXPLICIT=!1,this.REFLECTIONMAP_EQUIRECTANGULAR=!1,this.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,this.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,this.INVERTCUBICMAP=!1,this.USESPHERICALFROMREFLECTIONMAP=!1,this.USEIRRADIANCEMAP=!1,this.USE_IRRADIANCE_DOMINANT_DIRECTION=!1,this.USESPHERICALINVERTEX=!1,this.REFLECTIONMAP_OPPOSITEZ=!1,this.LODINREFLECTIONALPHA=!1,this.GAMMAREFLECTION=!1,this.RGBDREFLECTION=!1}}}let vl=!1;function Go(){vl||(vl=!0,Ae.prototype.restoreSingleAttachment=function(){const r=this._gl;this.bindAttachments([r.BACK])},Ae.prototype.restoreSingleAttachmentForRenderTarget=function(){const r=this._gl;this.bindAttachments([r.COLOR_ATTACHMENT0])},Ae.prototype.buildTextureLayout=function(r,s=!1){const o=this._gl,l=[];if(s)l.push(o.BACK);else for(let n=0;n<r.length;n++)r[n]?l.push(o["COLOR_ATTACHMENT"+n]):l.push(o.NONE);return l},Ae.prototype.bindAttachments=function(r){this._gl.drawBuffers(r)},Ae.prototype.unBindMultiColorAttachmentFramebuffer=function(r,s=!1,o){this._currentRenderTarget=null,r.disableAutomaticMSAAResolve||this.resolveMultiFramebuffer(r),s||this.generateMipMapsMultiFramebuffer(r),o&&(r._MSAAFramebuffer&&this._bindUnboundFramebuffer(r._framebuffer),o()),this._bindUnboundFramebuffer(null)},Ae.prototype.createMultipleRenderTarget=function(r,s,o=!0){let l=!1,n=!0,m=!1,d=!1,I,k=1,U=1;const M=0,N=3,J=!1,se=5,_e=3553;let te=[],v=[],x=[],A=[],W=[],G=[],y=[],T=[],le=[],ie=!1;const V=this._createHardwareRenderTargetWrapper(!0,!1,r);s!==void 0&&(l=s.generateMipMaps===void 0?!1:s.generateMipMaps,n=s.generateDepthBuffer===void 0?!0:s.generateDepthBuffer,m=s.generateStencilBuffer===void 0?!1:s.generateStencilBuffer,d=s.generateDepthTexture===void 0?!1:s.generateDepthTexture,k=s.textureCount??1,U=s.samples??U,te=s.types||te,v=s.samplingModes||v,x=s.useSRGBBuffers||x,A=s.formats||A,W=s.targetTypes||W,G=s.faceIndex||G,y=s.layerIndex||y,T=s.layerCounts||T,le=s.labels||le,ie=s.dontCreateTextures??!1,this.webGLVersion>1&&(s.depthTextureFormat===13||s.depthTextureFormat===17||s.depthTextureFormat===16||s.depthTextureFormat===14||s.depthTextureFormat===18)&&(I=s.depthTextureFormat)),I===void 0&&(I=m?13:14);const g=this._gl,f=this._currentFramebuffer,fe=g.createFramebuffer();this._bindUnboundFramebuffer(fe);const oe=r.width??r,R=r.height??r,ue=[],E=[],Q=this.webGLVersion>1&&(I===13||I===17||I===18);V.label=s?.label??"MultiRenderTargetWrapper",V._framebuffer=fe,V._generateDepthBuffer=d||n,V._generateStencilBuffer=d?Q:m,V._depthStencilBuffer=this._setupFramebufferDepthAttachments(V._generateStencilBuffer,V._generateDepthBuffer,oe,R,1,I),V._attachments=E;for(let P=0;P<k;P++){let he=v[P]||N,q=te[P]||M,Te=x[P]||J;const ce=A[P]||se,j=W[P]||_e,ye=T[P]??1;(q===1&&!this._caps.textureFloatLinearFiltering||q===2&&!this._caps.textureHalfFloatLinearFiltering)&&(he=1);const Oe=this._getSamplingParameters(he,l);q===1&&!this._caps.textureFloat&&(q=0,De.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type")),Te=Te&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU);const Ce=this.webGLVersion>1,Fe=g[Ce?"COLOR_ATTACHMENT"+P:"COLOR_ATTACHMENT"+P+"_WEBGL"];if(E.push(Fe),j===-1||ie)continue;const Z=new Ll(this,6);ue[P]=Z,g.activeTexture(g["TEXTURE"+P]),g.bindTexture(j,Z._hardwareTexture.underlyingResource),g.texParameteri(j,g.TEXTURE_MAG_FILTER,Oe.mag),g.texParameteri(j,g.TEXTURE_MIN_FILTER,Oe.min),g.texParameteri(j,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(j,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE);const Ee=this._getRGBABufferInternalSizedFormat(q,ce,Te),Se=this._getInternalFormat(ce),Me=this._getWebGLTextureType(q);if(Ce&&(j===35866||j===32879))j===35866?Z.is2DArray=!0:Z.is3D=!0,Z.baseDepth=Z.depth=ye,g.texImage3D(j,0,Ee,oe,R,ye,0,Se,Me,null);else if(j===34067){for(let Ie=0;Ie<6;Ie++)g.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,Ee,oe,R,0,Se,Me,null);Z.isCube=!0}else g.texImage2D(g.TEXTURE_2D,0,Ee,oe,R,0,Se,Me,null);l&&g.generateMipmap(j),this._bindTextureDirectly(j,null),Z.baseWidth=oe,Z.baseHeight=R,Z.width=oe,Z.height=R,Z.isReady=!0,Z.samples=1,Z.generateMipMaps=l,Z.samplingMode=he,Z.type=q,Z._useSRGBBuffer=Te,Z.format=ce,Z.label=le[P]??V.label+"-Texture"+P,this._internalTexturesCache.push(Z)}if(d&&this._caps.depthTextureExtension&&!ie){const P=new Ll(this,14);let he=5,q=g.DEPTH_COMPONENT16,Te=g.DEPTH_COMPONENT,ce=g.UNSIGNED_SHORT,j=g.DEPTH_ATTACHMENT;this.webGLVersion<2?q=g.DEPTH_COMPONENT:I===14?(he=1,ce=g.FLOAT,q=g.DEPTH_COMPONENT32F):I===18?(he=0,ce=g.FLOAT_32_UNSIGNED_INT_24_8_REV,q=g.DEPTH32F_STENCIL8,Te=g.DEPTH_STENCIL,j=g.DEPTH_STENCIL_ATTACHMENT):I===16?(he=0,ce=g.UNSIGNED_INT,q=g.DEPTH_COMPONENT24,j=g.DEPTH_ATTACHMENT):(I===13||I===17)&&(he=12,ce=g.UNSIGNED_INT_24_8,q=g.DEPTH24_STENCIL8,Te=g.DEPTH_STENCIL,j=g.DEPTH_STENCIL_ATTACHMENT),this._bindTextureDirectly(g.TEXTURE_2D,P,!0),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.NEAREST),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.NEAREST),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texImage2D(g.TEXTURE_2D,0,q,oe,R,0,Te,ce,null),g.framebufferTexture2D(g.FRAMEBUFFER,j,g.TEXTURE_2D,P._hardwareTexture.underlyingResource,0),this._bindTextureDirectly(g.TEXTURE_2D,null),V._depthStencilTexture=P,V._depthStencilTextureWithStencil=Q,P.baseWidth=oe,P.baseHeight=R,P.width=oe,P.height=R,P.isReady=!0,P.samples=1,P.generateMipMaps=l,P.samplingMode=1,P.format=I,P.type=he,P.label=V.label+"-DepthStencil",ue[k]=P,this._internalTexturesCache.push(P)}if(V.setTextures(ue),o&&g.drawBuffers(E),this._bindUnboundFramebuffer(f),V.setLayerAndFaceIndices(y,G),this.resetTextureCache(),!ie)this.updateMultipleRenderTargetTextureSampleCount(V,U,o);else if(U>1){const P=g.createFramebuffer();if(!P)throw new Error("Unable to create multi sampled framebuffer");V._samples=U,V._MSAAFramebuffer=P,k>0&&o&&(this._bindUnboundFramebuffer(P),g.drawBuffers(E),this._bindUnboundFramebuffer(f))}return V},Ae.prototype.updateMultipleRenderTargetTextureSampleCount=function(r,s,o=!0){if(this.webGLVersion<2||!r)return 1;if(r.samples===s)return s;const l=this._gl;s=Math.min(s,this.getCaps().maxMSAASamples),r._depthStencilBuffer&&(l.deleteRenderbuffer(r._depthStencilBuffer),r._depthStencilBuffer=null),r._MSAAFramebuffer&&(l.deleteFramebuffer(r._MSAAFramebuffer),r._MSAAFramebuffer=null);const n=r._attachments.length;for(let d=0;d<n;d++)r.textures[d]._hardwareTexture?.releaseMSAARenderBuffers();if(s>1&&typeof l.renderbufferStorageMultisample=="function"){const d=l.createFramebuffer();if(!d)throw new Error("Unable to create multi sampled framebuffer");r._MSAAFramebuffer=d,this._bindUnboundFramebuffer(d);const I=[];for(let k=0;k<n;k++){const U=r.textures[k],M=U._hardwareTexture,N=l[this.webGLVersion>1?"COLOR_ATTACHMENT"+k:"COLOR_ATTACHMENT"+k+"_WEBGL"],J=this._createRenderBuffer(U.width,U.height,s,-1,this._getRGBABufferInternalSizedFormat(U.type,U.format,U._useSRGBBuffer),N);if(!J)throw new Error("Unable to create multi sampled framebuffer");M.addMSAARenderBuffer(J),U.samples=s,I.push(N)}o&&l.drawBuffers(I)}else this._bindUnboundFramebuffer(r._framebuffer);const m=r._depthStencilTexture?r._depthStencilTexture.format:void 0;return r._depthStencilBuffer=this._setupFramebufferDepthAttachments(r._generateStencilBuffer,r._generateDepthBuffer,r.width,r.height,s,m),this._bindUnboundFramebuffer(null),r._samples=s,s},Ae.prototype.generateMipMapsMultiFramebuffer=function(r){const s=r,o=this._gl;if(s.isMulti)for(let l=0;l<s._attachments.length;l++){const n=s.textures[l];n?.generateMipMaps&&!n?.isCube&&!n?.is3D&&(this._bindTextureDirectly(o.TEXTURE_2D,n,!0),o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null))}},Ae.prototype.resolveMultiFramebuffer=function(r){const s=r,o=this._gl;if(!s._MSAAFramebuffer||!s.isMulti)return;let l=s.resolveMSAAColors?o.COLOR_BUFFER_BIT:0;l|=s._generateDepthBuffer&&s.resolveMSAADepth?o.DEPTH_BUFFER_BIT:0,l|=s._generateStencilBuffer&&s.resolveMSAAStencil?o.STENCIL_BUFFER_BIT:0;const n=s._attachments,m=n.length;o.bindFramebuffer(o.READ_FRAMEBUFFER,s._MSAAFramebuffer),o.bindFramebuffer(o.DRAW_FRAMEBUFFER,s._framebuffer);for(let d=0;d<m;d++){const I=s.textures[d];for(let k=0;k<m;k++)n[k]=o.NONE;n[d]=o[this.webGLVersion>1?"COLOR_ATTACHMENT"+d:"COLOR_ATTACHMENT"+d+"_WEBGL"],o.readBuffer(n[d]),o.drawBuffers(n),o.blitFramebuffer(0,0,I.width,I.height,0,0,I.width,I.height,l,o.NEAREST)}for(let d=0;d<m;d++)n[d]=o[this.webGLVersion>1?"COLOR_ATTACHMENT"+d:"COLOR_ATTACHMENT"+d+"_WEBGL"];o.drawBuffers(n),o.bindFramebuffer(this._gl.FRAMEBUFFER,s._MSAAFramebuffer)})}class Ho extends Zl{get isSupported(){return this._engine?.getCaps().drawBuffersExtension??!1}get textures(){return this._textures}get count(){return this._count}get depthTexture(){return this._textures[this._textures.length-1]}set wrapU(s){if(this._textures)for(let o=0;o<this._textures.length;o++)this._textures[o].wrapU=s}set wrapV(s){if(this._textures)for(let o=0;o<this._textures.length;o++)this._textures[o].wrapV=s}constructor(s,o,l,n,m,d){const I=m&&m.generateMipMaps?m.generateMipMaps:!1,k=m&&m.generateDepthTexture?m.generateDepthTexture:!1,U=m&&m.depthTextureFormat?m.depthTextureFormat:15,M=!m||m.doNotChangeAspectRatio===void 0?!0:m.doNotChangeAspectRatio,N=m&&m.drawOnlyOnFirstAttachmentByDefault?m.drawOnlyOnFirstAttachmentByDefault:!1;if(super(s,o,n,I,M,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0),Go(),!this.isSupported){this.dispose();return}this._textureNames=d;const J=[],se=[],_e=[],te=[],v=[],x=[],A=[],W=[];this._initTypes(l,J,se,_e,te,v,x,A,W,m);const G=!m||m.generateDepthBuffer===void 0?!0:m.generateDepthBuffer,y=!m||m.generateStencilBuffer===void 0?!1:m.generateStencilBuffer,T=m&&m.samples?m.samples:1;this._multiRenderTargetOptions={samplingModes:se,generateMipMaps:I,generateDepthBuffer:G,generateStencilBuffer:y,generateDepthTexture:k,depthTextureFormat:U,types:J,textureCount:l,useSRGBBuffers:_e,samples:T,formats:te,targetTypes:v,faceIndex:x,layerIndex:A,layerCounts:W,labels:d,label:s},this._count=l,this._drawOnlyOnFirstAttachmentByDefault=N,l>0&&(this._createInternalTextures(),this._createTextures(d))}_initTypes(s,o,l,n,m,d,I,k,U,M){for(let N=0;N<s;N++)M&&M.types&&M.types[N]!==void 0?o.push(M.types[N]):o.push(M&&M.defaultType?M.defaultType:0),M&&M.samplingModes&&M.samplingModes[N]!==void 0?l.push(M.samplingModes[N]):l.push(Pe.BILINEAR_SAMPLINGMODE),M&&M.useSRGBBuffers&&M.useSRGBBuffers[N]!==void 0?n.push(M.useSRGBBuffers[N]):n.push(!1),M&&M.formats&&M.formats[N]!==void 0?m.push(M.formats[N]):m.push(5),M&&M.targetTypes&&M.targetTypes[N]!==void 0?d.push(M.targetTypes[N]):d.push(3553),M&&M.faceIndex&&M.faceIndex[N]!==void 0?I.push(M.faceIndex[N]):I.push(0),M&&M.layerIndex&&M.layerIndex[N]!==void 0?k.push(M.layerIndex[N]):k.push(0),M&&M.layerCounts&&M.layerCounts[N]!==void 0?U.push(M.layerCounts[N]):U.push(1)}_createInternaTextureIndexMapping(){const s={},o=[];if(!this._renderTarget)return o;const l=this._renderTarget.textures;for(let n=0;n<l.length;n++){const m=l[n];if(!m)continue;const d=s[m.uniqueId];d!==void 0?o[n]=d:s[m.uniqueId]=n}return o}_rebuild(s=!1,o=!1,l){if(this._count<1||s)return;const n=this._createInternaTextureIndexMapping();this.releaseInternalTextures(),this._createInternalTextures(),o&&(this._releaseTextures(),this._createTextures(l));const m=this._renderTarget.textures;for(let d=0;d<m.length;d++){const I=this._textures[d];n[d]!==void 0&&this._renderTarget.setTexture(m[n[d]],d),I._texture=m[d],I._texture&&(I._noMipmap=!I._texture.useMipMaps,I._useSRGBBuffer=I._texture._useSRGBBuffer)}this.samples!==1&&this._renderTarget.setSamples(this.samples,!this._drawOnlyOnFirstAttachmentByDefault,!0)}_createInternalTextures(){this._renderTarget=this._getEngine().createMultipleRenderTarget(this._size,this._multiRenderTargetOptions,!this._drawOnlyOnFirstAttachmentByDefault),this._texture=this._renderTarget.texture}_releaseTextures(){if(this._textures)for(let s=0;s<this._textures.length;s++)this._textures[s]._texture=null,this._textures[s].dispose()}_createTextures(s){const o=this._renderTarget.textures;this._textures=[];for(let l=0;l<o.length;l++){const n=new Pe(null,this.getScene());s?.[l]&&(n.name=s[l]),n._texture=o[l],n._texture&&(n._noMipmap=!n._texture.useMipMaps,n._useSRGBBuffer=n._texture._useSRGBBuffer),this._textures.push(n)}}setInternalTexture(s,o,l=!0){if(this.renderTarget&&(o===0&&(this._texture=s),this.renderTarget.setTexture(s,o,l),this.textures[o]||(this.textures[o]=new Pe(null,this.getScene()),this.textures[o].name=this._textureNames?.[o]??this.textures[o].name),this.textures[o]._texture=s,this.textures[o]._noMipmap=!s.useMipMaps,this.textures[o]._useSRGBBuffer=s._useSRGBBuffer,this._count=this.renderTarget.textures?this.renderTarget.textures.length:0,this._multiRenderTargetOptions.types&&(this._multiRenderTargetOptions.types[o]=s.type),this._multiRenderTargetOptions.samplingModes&&(this._multiRenderTargetOptions.samplingModes[o]=s.samplingMode),this._multiRenderTargetOptions.useSRGBBuffers&&(this._multiRenderTargetOptions.useSRGBBuffers[o]=s._useSRGBBuffer),this._multiRenderTargetOptions.targetTypes&&this._multiRenderTargetOptions.targetTypes[o]!==-1)){let n;s.is2DArray?n=35866:s.isCube?n=34067:s.is3D?n=32879:n=3553,this._multiRenderTargetOptions.targetTypes[o]=n}}setLayerAndFaceIndex(s,o=-1,l=-1){!this.textures[s]||!this.renderTarget||(this._multiRenderTargetOptions.layerIndex&&(this._multiRenderTargetOptions.layerIndex[s]=o),this._multiRenderTargetOptions.faceIndex&&(this._multiRenderTargetOptions.faceIndex[s]=l),this.renderTarget.setLayerAndFaceIndex(s,o,l))}setLayerAndFaceIndices(s,o){this.renderTarget&&(this._multiRenderTargetOptions.layerIndex=s,this._multiRenderTargetOptions.faceIndex=o,this.renderTarget.setLayerAndFaceIndices(s,o))}get samples(){return this._samples}set samples(s){this._renderTarget?this._samples=this._renderTarget.setSamples(s):this._samples=s}resize(s){this._processSizeParameter(s),this._rebuild(!1,void 0,this._textureNames)}updateCount(s,o,l){this._multiRenderTargetOptions.textureCount=s,this._count=s;const n=[],m=[],d=[],I=[],k=[],U=[],M=[],N=[];this._textureNames=l,this._initTypes(s,n,m,d,I,k,U,M,N,o),this._multiRenderTargetOptions.types=n,this._multiRenderTargetOptions.samplingModes=m,this._multiRenderTargetOptions.useSRGBBuffers=d,this._multiRenderTargetOptions.formats=I,this._multiRenderTargetOptions.targetTypes=k,this._multiRenderTargetOptions.faceIndex=U,this._multiRenderTargetOptions.layerIndex=M,this._multiRenderTargetOptions.layerCounts=N,this._multiRenderTargetOptions.labels=l,this._rebuild(!1,!0,l)}_unbindFrameBuffer(s,o){this._renderTarget&&s.unBindMultiColorAttachmentFramebuffer(this._renderTarget,this.isCube,()=>{this.onAfterRenderObservable.notifyObservers(o)})}dispose(s=!1){this._releaseTextures(),s?this._texture=null:this.releaseInternalTextures(),super.dispose()}releaseInternalTextures(){const s=this._renderTarget?.textures;if(s){for(let o=s.length-1;o>=0;o--)this._textures[o]._texture=null;this._renderTarget?.dispose(),this._renderTarget=null}}}class Vo{constructor(s){this.name=wt.NAME_GEOMETRYBUFFERRENDERER,this.scene=s}register(){this.scene._gatherRenderTargetsStage.registerStep(wt.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER,this,this._gatherRenderTargets)}rebuild(){}dispose(){}_gatherRenderTargets(s){this.scene._geometryBufferRenderer&&s.push(this.scene._geometryBufferRenderer.getGBuffer())}}let kl=!1;function Xo(r){kl||(kl=!0,Object.defineProperty(zt.prototype,"geometryBufferRenderer",{get:function(){return this._geometryBufferRenderer},set:function(s){s&&s.isSupported&&(this._geometryBufferRenderer=s)},enumerable:!0,configurable:!0}),zt.prototype.enableGeometryBufferRenderer=function(s=1,o=15,l){return this._geometryBufferRenderer?this._geometryBufferRenderer:(this._geometryBufferRenderer=new r(this,s,o,l),this._geometryBufferRenderer.isSupported||(this._geometryBufferRenderer=null),this._geometryBufferRenderer)},zt.prototype.disableGeometryBufferRenderer=function(){this._geometryBufferRenderer&&(this._geometryBufferRenderer.dispose(),this._geometryBufferRenderer=null)},r._SceneComponentInitialization=s=>{let o=s._getComponent(wt.NAME_GEOMETRYBUFFERRENDERER);o||(o=new Vo(s),s._addComponent(o))})}const Yo=["diffuseSampler","bumpSampler","reflectivitySampler","albedoSampler","morphTargets","boneSampler","transmissionWeightSampler","subsurfaceWeightSampler","iblShadowSampler"],Zo=["world","mBones","viewProjection","diffuseMatrix","view","previousWorld","previousViewProjection","mPreviousBones","bumpMatrix","reflectivityMatrix","albedoMatrix","reflectivityColor","albedoColor","reflectionMatrix","vTransmissionWeight","vSubsurfaceWeight","vEyePosition","vTransmissionScatterAnisotropy","vSubsurfaceScatterAnisotropy","shadowTextureSize","metallic","glossiness","vTangentSpaceParams","vBumpInfos","morphTargetInfluences","morphTargetCount","morphTargetTextureInfo","morphTargetTextureIndices","boneTextureInfo"];class D{get normalsAreUnsigned(){return this._normalsAreUnsigned}_linkPrePassRenderer(s){this._linkedWithPrePass=!0,this._prePassRenderer=s,this._multiRenderTarget&&(this._multiRenderTarget.onClearObservable.clear(),this._multiRenderTarget.onClearObservable.add(()=>{}))}_unlinkPrePassRenderer(){this._linkedWithPrePass=!1,this._createRenderTargets()}_resetLayout(){this._enableDepth=!0,this._enableNormal=!0,this._enablePosition=!1,this._enableReflectivity=!1,this._enableVelocity=!1,this._enableVelocityLinear=!1,this._enableScreenspaceDepth=!1,this._enableIrradiance=!1,this._attachmentsFromPrePass=[]}_forceTextureType(s,o){s===D.POSITION_TEXTURE_TYPE?(this._positionIndex=o,this._enablePosition=!0):s===D.VELOCITY_TEXTURE_TYPE?(this._velocityIndex=o,this._enableVelocity=!0):s===D.VELOCITY_LINEAR_TEXTURE_TYPE?(this._velocityLinearIndex=o,this._enableVelocityLinear=!0):s===D.REFLECTIVITY_TEXTURE_TYPE?(this._reflectivityIndex=o,this._enableReflectivity=!0):s===D.DEPTH_TEXTURE_TYPE?(this._depthIndex=o,this._enableDepth=!0):s===D.NORMAL_TEXTURE_TYPE?(this._normalIndex=o,this._enableNormal=!0):s===D.SCREENSPACE_DEPTH_TEXTURE_TYPE?(this._screenspaceDepthIndex=o,this._enableScreenspaceDepth=!0):s===D.IRRADIANCE_TEXTURE_TYPE&&(this._irradianceIndex=o,this._enableIrradiance=!0)}_setAttachments(s){this._attachmentsFromPrePass=s}_linkInternalTexture(s){this._multiRenderTarget.setInternalTexture(s,0,!1)}get renderList(){return this._multiRenderTarget.renderList}set renderList(s){this._multiRenderTarget.renderList=s}get isSupported(){return this._multiRenderTarget.isSupported}getTextureIndex(s){switch(s){case D.POSITION_TEXTURE_TYPE:return this._positionIndex;case D.VELOCITY_TEXTURE_TYPE:return this._velocityIndex;case D.VELOCITY_LINEAR_TEXTURE_TYPE:return this._velocityLinearIndex;case D.REFLECTIVITY_TEXTURE_TYPE:return this._reflectivityIndex;case D.DEPTH_TEXTURE_TYPE:return this._depthIndex;case D.NORMAL_TEXTURE_TYPE:return this._normalIndex;case D.SCREENSPACE_DEPTH_TEXTURE_TYPE:return this._screenspaceDepthIndex;case D.IRRADIANCE_TEXTURE_TYPE:return this._irradianceIndex;default:return-1}}get enableDepth(){return this._enableDepth}set enableDepth(s){this._enableDepth=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableNormal(){return this._enableNormal}set enableNormal(s){this._enableNormal=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enablePosition(){return this._enablePosition}set enablePosition(s){this._enablePosition=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableVelocity(){return this._enableVelocity}set enableVelocity(s){this._enableVelocity=s,s||(this._previousTransformationMatrices={}),this._linkedWithPrePass||(this.dispose(),this._createRenderTargets()),this._scene.needsPreviousWorldMatrices=s}get enableVelocityLinear(){return this._enableVelocityLinear}set enableVelocityLinear(s){this._enableVelocityLinear=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableReflectivity(){return this._enableReflectivity}set enableReflectivity(s){this._enableReflectivity=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableScreenspaceDepth(){return this._enableScreenspaceDepth}set enableScreenspaceDepth(s){this._enableScreenspaceDepth=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableIrradiance(){return this._enableIrradiance}set enableIrradiance(s){this._enableIrradiance=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get scene(){return this._scene}get ratio(){return typeof this._ratioOrDimensions=="object"?1:this._ratioOrDimensions}get shaderLanguage(){return this._shaderLanguage}constructor(s,o=1,l=15,n){this._previousTransformationMatrices={},this._previousBonesTransformationMatrices={},this.excludedSkinnedMeshesFromVelocity=[],this.renderTransparentMeshes=!0,this.generateNormalsInWorldSpace=!1,this._normalsAreUnsigned=!1,this._resizeObserver=null,this._enableDepth=!0,this._enableNormal=!0,this._enablePosition=!1,this._enableVelocity=!1,this._enableVelocityLinear=!1,this._enableReflectivity=!1,this._enableScreenspaceDepth=!1,this._enableIrradiance=!1,this._clearColor=new Gt(0,0,0,0),this._clearDepthColor=new Gt(0,0,0,1),this._positionIndex=-1,this._velocityIndex=-1,this._velocityLinearIndex=-1,this._reflectivityIndex=-1,this._depthIndex=-1,this._normalIndex=-1,this._screenspaceDepthIndex=-1,this._irradianceIndex=-1,this._linkedWithPrePass=!1,this.generateIrradianceWithScatterMask=!1,this.useSpecificClearForDepthTexture=!1,this._shaderLanguage=0,this._shadersLoaded=!1,this._scene=s,this._ratioOrDimensions=o,this._useUbo=s.getEngine().supportsUniformBuffers,this._depthFormat=l,this._textureTypesAndFormats=n||{},this._initShaderSourceAsync(),Xo(D),D._SceneComponentInitialization(this._scene),this._createRenderTargets()}async _initShaderSourceAsync(){this._scene.getEngine().isWebGPU&&!D.ForceGLSL?(this._shaderLanguage=1,await Promise.all([be(()=>import("./geometry.vertex-B--XA-QK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),be(()=>import("./geometry.fragment-DuBDWlLB.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,4,14,15]),import.meta.url)])):await Promise.all([be(()=>import("./geometry.vertex-3cVZEKxJ.js"),__vite__mapDeps([16,1,2]),import.meta.url),be(()=>import("./geometry.fragment-EEbMy57o.js"),__vite__mapDeps([17,1,2,18]),import.meta.url)]),this._shadersLoaded=!0}isReady(s,o){if(!this._shadersLoaded)return!1;const l=s.getMaterial();if(l&&l.disableDepthWrite||s.getMesh().getClassName()==="GaussianSplattingMesh")return!1;const n=[],m=[$.PositionKind],d=s.getMesh();d.isVerticesDataPresent($.NormalKind)&&(n.push("#define HAS_NORMAL_ATTRIBUTE"),m.push($.NormalKind));let k=!1,U=!1;const M=!1;if(l){let v=!1;if(l.needAlphaTestingForMesh(d)&&l.getAlphaTestTexture()&&(n.push("#define ALPHATEST"),n.push(`#define ALPHATEST_UV${l.getAlphaTestTexture().coordinatesIndex+1}`),v=!0),(l.bumpTexture||l.normalTexture||l.geometryNormalTexture)&&ae.BumpTextureEnabled){const x=l.bumpTexture||l.normalTexture||l.geometryNormalTexture;n.push("#define BUMP"),n.push(`#define BUMP_UV${x.coordinatesIndex+1}`),v=!0}if(this._enableReflectivity){let x=!1;if(l.getClassName()==="PBRMetallicRoughnessMaterial")l.metallicRoughnessTexture&&(n.push("#define ORMTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.metallicRoughnessTexture.coordinatesIndex+1}`),n.push("#define METALLICWORKFLOW"),v=!0,x=!0),l.metallic!=null&&(n.push("#define METALLIC"),n.push("#define METALLICWORKFLOW"),x=!0),l.roughness!=null&&(n.push("#define ROUGHNESS"),n.push("#define METALLICWORKFLOW"),x=!0),x&&(l.baseTexture&&(n.push("#define ALBEDOTEXTURE"),n.push(`#define ALBEDO_UV${l.baseTexture.coordinatesIndex+1}`),l.baseTexture.gammaSpace&&n.push("#define GAMMAALBEDO"),v=!0),l.baseColor&&n.push("#define ALBEDOCOLOR"));else if(l.getClassName()==="PBRSpecularGlossinessMaterial")l.specularGlossinessTexture?(n.push("#define SPECULARGLOSSINESSTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.specularGlossinessTexture.coordinatesIndex+1}`),v=!0,l.specularGlossinessTexture.gammaSpace&&n.push("#define GAMMAREFLECTIVITYTEXTURE")):l.specularColor&&n.push("#define REFLECTIVITYCOLOR"),l.glossiness!=null&&n.push("#define GLOSSINESS");else if(l.getClassName()==="PBRMaterial")l.metallicTexture&&(n.push("#define ORMTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.metallicTexture.coordinatesIndex+1}`),n.push("#define METALLICWORKFLOW"),v=!0,x=!0),l.metallic!=null&&(n.push("#define METALLIC"),n.push("#define METALLICWORKFLOW"),x=!0),l.roughness!=null&&(n.push("#define ROUGHNESS"),n.push("#define METALLICWORKFLOW"),x=!0),x?(l.albedoTexture&&(n.push("#define ALBEDOTEXTURE"),n.push(`#define ALBEDO_UV${l.albedoTexture.coordinatesIndex+1}`),l.albedoTexture.gammaSpace&&n.push("#define GAMMAALBEDO"),v=!0),l.albedoColor&&n.push("#define ALBEDOCOLOR")):(l.reflectivityTexture?(n.push("#define SPECULARGLOSSINESSTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.reflectivityTexture.coordinatesIndex+1}`),l.reflectivityTexture.gammaSpace&&n.push("#define GAMMAREFLECTIVITYTEXTURE"),v=!0):l.reflectivityColor&&n.push("#define REFLECTIVITYCOLOR"),l.microSurface!=null&&n.push("#define GLOSSINESS"));else if(l.getClassName()==="StandardMaterial")l.specularTexture&&(n.push("#define REFLECTIVITYTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.specularTexture.coordinatesIndex+1}`),l.specularTexture.gammaSpace&&n.push("#define GAMMAREFLECTIVITYTEXTURE"),v=!0),l.specularColor&&n.push("#define REFLECTIVITYCOLOR");else if(l.getClassName()==="OpenPBRMaterial"){const A=l;n.push("#define METALLIC"),n.push("#define ROUGHNESS"),A._useRoughnessFromMetallicTextureGreen&&A.baseMetalnessTexture?(n.push("#define ORMTEXTURE"),n.push(`#define REFLECTIVITY_UV${A.baseMetalnessTexture.coordinatesIndex+1}`),v=!0):A.baseMetalnessTexture?(n.push("#define METALLIC_TEXTURE"),n.push(`#define METALLIC_UV${A.baseMetalnessTexture.coordinatesIndex+1}`),v=!0):A.specularRoughnessTexture&&(n.push("#define ROUGHNESS_TEXTURE"),n.push(`#define ROUGHNESS_UV${A.specularRoughnessTexture.coordinatesIndex+1}`),v=!0),A.baseColorTexture&&(n.push("#define ALBEDOTEXTURE"),n.push(`#define ALBEDO_UV${A.baseColorTexture.coordinatesIndex+1}`),A.baseColorTexture.gammaSpace&&n.push("#define GAMMAALBEDO"),v=!0),A.baseColor&&n.push("#define ALBEDOCOLOR")}}if(this._enableIrradiance&&this.generateIrradianceWithScatterMask&&(n.push("#define IRRADIANCE_SCATTER_MASK"),l.getClassName()==="OpenPBRMaterial")){const x=l;x.subsurfaceWeight>0&&x.subsurfaceWeightTexture&&(n.push("#define SUBSURFACE_WEIGHT"),n.push(`#define SUBSURFACEWEIGHT_UV${x.subsurfaceWeightTexture.coordinatesIndex+1}`),v=!0),x.transmissionWeight>0&&x.transmissionWeightTexture&&(n.push("#define TRANSMISSION_WEIGHT"),n.push(`#define TRANSMISSIONWEIGHT_UV${x.transmissionWeightTexture.coordinatesIndex+1}`),v=!0)}v&&(n.push("#define NEED_UV"),d.isVerticesDataPresent($.UVKind)&&(m.push($.UVKind),n.push("#define UV1"),k=!0),d.isVerticesDataPresent($.UV2Kind)&&(m.push($.UV2Kind),n.push("#define UV2"),U=!0))}if(this._enableDepth&&(n.push("#define DEPTH"),n.push("#define DEPTH_INDEX "+this._depthIndex)),this._enableNormal&&(n.push("#define NORMAL"),n.push("#define NORMAL_INDEX "+this._normalIndex)),this._enablePosition&&(n.push("#define POSITION"),n.push("#define POSITION_INDEX "+this._positionIndex)),this._enableVelocity&&(n.push("#define VELOCITY"),n.push("#define VELOCITY_INDEX "+this._velocityIndex),this.excludedSkinnedMeshesFromVelocity.indexOf(d)===-1&&n.push("#define BONES_VELOCITY_ENABLED")),this._enableVelocityLinear&&(n.push("#define VELOCITY_LINEAR"),n.push("#define VELOCITY_LINEAR_INDEX "+this._velocityLinearIndex),this.excludedSkinnedMeshesFromVelocity.indexOf(d)===-1&&n.push("#define BONES_VELOCITY_ENABLED")),this._enableReflectivity&&(n.push("#define REFLECTIVITY"),n.push("#define REFLECTIVITY_INDEX "+this._reflectivityIndex)),this._enableScreenspaceDepth&&this._screenspaceDepthIndex!==-1&&(n.push("#define SCREENSPACE_DEPTH_INDEX "+this._screenspaceDepthIndex),n.push("#define SCREENSPACE_DEPTH")),this._enableIrradiance&&this._irradianceIndex!==-1){n.push("#define IRRADIANCE_INDEX "+this._irradianceIndex),n.push("#define IRRADIANCE");const v=this._scene;if(v.environmentTexture){const x={};let A=!1,W=0;(l.getClassName()==="OpenPBRMaterial"||l.getClassName()==="StandardMaterial"||l.getClassName()==="PBRMetallicRoughnessMaterial"||l.getClassName()==="PBRSpecularGlossinessMaterial"||l.getClassName()==="PBRMaterial")&&(A=!!l.realtimeFiltering,W=l.realtimeFilteringQuality||0),Ul(v,v.environmentTexture,x,A,W,!0);for(const y in x)x[y]&&n.push("#define "+y);x.USEIRRADIANCEMAP||n.push("#define SPHERICAL_HARMONICS");const G=v.postProcessRenderPipelineManager.supportedPipelines.find(y=>y.getClassName()==="IBLShadowsRenderPipeline");if(G){const y=G;y._getAccumulatedTexture()&&(n.push("#define IBL_SHADOW_TEXTURE"),y.coloredShadows&&n.push("#define COLORED_IBL_SHADOWS"))}}}this.generateNormalsInWorldSpace&&n.push("#define NORMAL_WORLDSPACE"),this._normalsAreUnsigned&&n.push("#define ENCODE_NORMAL"),d.useBones&&d.computeBonesUsingShaders&&d.skeleton?(m.push($.MatricesIndicesKind),m.push($.MatricesWeightsKind),d.numBoneInfluencers>4&&(m.push($.MatricesIndicesExtraKind),m.push($.MatricesWeightsExtraKind)),n.push("#define NUM_BONE_INFLUENCERS "+d.numBoneInfluencers),n.push("#define BONETEXTURE "+d.skeleton.isUsingTextureForMatrices),n.push("#define BonesPerMesh "+(d.skeleton.bones.length+1))):(n.push("#define NUM_BONE_INFLUENCERS 0"),n.push("#define BONETEXTURE false"),n.push("#define BonesPerMesh 0"));const N=d.morphTargetManager?Kl(d.morphTargetManager,n,m,d,!0,!0,!1,k,U,M):0;o&&(n.push("#define INSTANCES"),jl(m,this._enableVelocity||this._enableVelocityLinear),s.getRenderingMesh().hasThinInstances&&n.push("#define THIN_INSTANCES")),this._linkedWithPrePass?n.push("#define SCENE_MRT_COUNT "+this._attachmentsFromPrePass.length):n.push("#define SCENE_MRT_COUNT "+this._multiRenderTarget.textures.length),Ql(l,this._scene,n);const J=this._scene.getEngine(),se=s._getDrawWrapper(void 0,!0),_e=se.defines,te=n.join(`
|
|
3
|
-
`);return _e!==te&&se.setEffect(J.createEffect("geometry",{attributes:m,uniformsNames:Zo,samplers:Yo,defines:te,onCompiled:null,fallbacks:null,onError:null,uniformBuffersNames:["Scene"],indexParameters:{buffersCount:this._multiRenderTarget.textures.length-1,maxSimultaneousMorphTargets:N},shaderLanguage:this.shaderLanguage},J),te),se.effect.isReady()}getGBuffer(){return this._multiRenderTarget}get samples(){return this._multiRenderTarget.samples}set samples(s){this._multiRenderTarget.samples=s}dispose(){this._resizeObserver&&(this._scene.getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this._multiRenderTarget?.renderTarget&&this.scene.getEngine()._currentRenderTarget===this._multiRenderTarget.renderTarget&&this.scene.getEngine().unBindFramebuffer(this._multiRenderTarget?.renderTarget),this.getGBuffer().dispose()}_assignRenderTargetIndices(){const s=[],o=[];let l=0;return this._enableDepth&&(this._depthIndex=l,l++,s.push("gBuffer_Depth"),o.push(this._textureTypesAndFormats[D.DEPTH_TEXTURE_TYPE])),this._enableNormal&&(this._normalIndex=l,l++,s.push("gBuffer_Normal"),o.push(this._textureTypesAndFormats[D.NORMAL_TEXTURE_TYPE])),this._enablePosition&&(this._positionIndex=l,l++,s.push("gBuffer_Position"),o.push(this._textureTypesAndFormats[D.POSITION_TEXTURE_TYPE])),this._enableVelocity&&(this._velocityIndex=l,l++,s.push("gBuffer_Velocity"),o.push(this._textureTypesAndFormats[D.VELOCITY_TEXTURE_TYPE])),this._enableVelocityLinear&&(this._velocityLinearIndex=l,l++,s.push("gBuffer_VelocityLinear"),o.push(this._textureTypesAndFormats[D.VELOCITY_LINEAR_TEXTURE_TYPE])),this._enableReflectivity&&(this._reflectivityIndex=l,l++,s.push("gBuffer_Reflectivity"),o.push(this._textureTypesAndFormats[D.REFLECTIVITY_TEXTURE_TYPE])),this._enableScreenspaceDepth&&(this._screenspaceDepthIndex=l,l++,s.push("gBuffer_ScreenspaceDepth"),o.push(this._textureTypesAndFormats[D.SCREENSPACE_DEPTH_TEXTURE_TYPE])),this._enableIrradiance&&(this._irradianceIndex=l,l++,s.push("gBuffer_Irradiance"),o.push(this._textureTypesAndFormats[D.IRRADIANCE_TEXTURE_TYPE])),[l,s,o]}_createRenderTargets(){const s=this._scene.getEngine(),[o,l,n]=this._assignRenderTargetIndices();let m=0;s._caps.textureFloat&&s._caps.textureFloatLinearFiltering?m=1:s._caps.textureHalfFloat&&s._caps.textureHalfFloatLinearFiltering&&(m=2);const d=this._ratioOrDimensions.width!==void 0?this._ratioOrDimensions:{width:s.getRenderWidth()*this._ratioOrDimensions,height:s.getRenderHeight()*this._ratioOrDimensions},I=[],k=[],U=[];for(const x of n)x?(I.push(x.textureType),k.push(x.textureFormat),U.push(x.samplingMode??2)):(I.push(m),k.push(5),U.push(2));if(this._normalsAreUnsigned=I[D.NORMAL_TEXTURE_TYPE]===11||I[D.NORMAL_TEXTURE_TYPE]===13,this._multiRenderTarget=new Ho("gBuffer",d,o,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,types:I,formats:k,samplingModes:U,depthTextureFormat:this._depthFormat},l.concat("gBuffer_DepthBuffer")),!this.isSupported)return;this._multiRenderTarget.wrapU=Pe.CLAMP_ADDRESSMODE,this._multiRenderTarget.wrapV=Pe.CLAMP_ADDRESSMODE,this._multiRenderTarget.refreshRate=1,this._multiRenderTarget.renderParticles=!1,this._multiRenderTarget.renderList=null;const M=[!0],N=[!1],J=[!0];for(let x=1;x<o;++x)M.push(!0),J.push(!1),N.push(!0);const se=s.buildTextureLayout(M),_e=s.buildTextureLayout(N),te=s.buildTextureLayout(J);this._multiRenderTarget.onClearObservable.add(x=>{x.bindAttachments(this.useSpecificClearForDepthTexture?_e:se),x.clear(this._clearColor,!0,!0,!0),this.useSpecificClearForDepthTexture&&(x.bindAttachments(te),x.clear(this._clearDepthColor,!0,!0,!0)),x.bindAttachments(se)}),this._resizeObserver=s.onResizeObservable.add(()=>{if(this._multiRenderTarget){const x=this._ratioOrDimensions.width!==void 0?this._ratioOrDimensions:{width:s.getRenderWidth()*this._ratioOrDimensions,height:s.getRenderHeight()*this._ratioOrDimensions};this._multiRenderTarget.resize(x)}});const v=x=>{const A=x.getRenderingMesh(),W=x.getEffectiveMesh(),G=this._scene,y=G.getEngine(),T=x.getMaterial();if(!T)return;if(W._internalAbstractMeshDataInfo._isActiveIntermediate=!1,(this._enableVelocity||this._enableVelocityLinear)&&!this._previousTransformationMatrices[W.uniqueId]&&(this._previousTransformationMatrices[W.uniqueId]={world:ql.Identity(),viewProjection:G.getTransformMatrix()},A.skeleton)){const g=A.skeleton.getTransformMatrices(A);this._previousBonesTransformationMatrices[A.uniqueId]=this._copyBonesTransformationMatrices(g,new Float32Array(g.length))}const le=A._getInstancesRenderList(x._id,!!x.getReplacementMesh());if(le.mustReturn)return;const ie=y.getCaps().instancedArrays&&(le.visibleInstances[x._id]!==null||A.hasThinInstances),V=W.getWorldMatrix();if(this.isReady(x,ie)){const g=x._getDrawWrapper();if(!g)return;const f=g.effect;y.enableEffect(g),ie||A._bind(x,f,T.fillMode),this._useUbo?($l(f,this._scene.getSceneUniformBuffer()),this._scene.finalizeSceneUbo()):(f.setMatrix("viewProjection",G.getTransformMatrix()),f.setMatrix("view",G.getViewMatrix()),this._scene.bindEyePosition(f,"vEyePosition"));let fe;if(!A._instanceDataStorage.isFrozen&&(T.backFaceCulling||T.sideOrientation!==null)){const R=W._getWorldMatrixDeterminant();fe=T._getEffectiveOrientation(A),R<0&&(fe=fe===ne.ClockWiseSideOrientation?ne.CounterClockWiseSideOrientation:ne.ClockWiseSideOrientation)}else fe=A._effectiveSideOrientation;if(T._preBind(g,fe),T.needAlphaTestingForMesh(W)){const R=T.getAlphaTestTexture();R&&(f.setTexture("diffuseSampler",R),f.setMatrix("diffuseMatrix",R.getTextureMatrix()))}if((T.bumpTexture||T.normalTexture||T.geometryNormalTexture)&&G.getEngine().getCaps().standardDerivatives&&ae.BumpTextureEnabled){const R=T.bumpTexture||T.normalTexture||T.geometryNormalTexture;f.setFloat3("vBumpInfos",R.coordinatesIndex,1/R.level,T.parallaxScaleBias),f.setMatrix("bumpMatrix",R.getTextureMatrix()),f.setTexture("bumpSampler",R),f.setFloat2("vTangentSpaceParams",T.invertNormalMapX?-1:1,T.invertNormalMapY?-1:1)}if(this._enableReflectivity){if(T.getClassName()==="PBRMetallicRoughnessMaterial")T.metallicRoughnessTexture!==null&&(f.setTexture("reflectivitySampler",T.metallicRoughnessTexture),f.setMatrix("reflectivityMatrix",T.metallicRoughnessTexture.getTextureMatrix())),T.metallic!==null&&f.setFloat("metallic",T.metallic),T.roughness!==null&&f.setFloat("glossiness",1-T.roughness),T.baseTexture!==null&&(f.setTexture("albedoSampler",T.baseTexture),f.setMatrix("albedoMatrix",T.baseTexture.getTextureMatrix())),T.baseColor!==null&&f.setColor3("albedoColor",T.baseColor);else if(T.getClassName()==="PBRSpecularGlossinessMaterial")T.specularGlossinessTexture!==null?(f.setTexture("reflectivitySampler",T.specularGlossinessTexture),f.setMatrix("reflectivityMatrix",T.specularGlossinessTexture.getTextureMatrix())):T.specularColor!==null&&f.setColor3("reflectivityColor",T.specularColor),T.glossiness!==null&&f.setFloat("glossiness",T.glossiness);else if(T.getClassName()==="PBRMaterial")T.metallicTexture!==null&&(f.setTexture("reflectivitySampler",T.metallicTexture),f.setMatrix("reflectivityMatrix",T.metallicTexture.getTextureMatrix())),T.metallic!==null&&f.setFloat("metallic",T.metallic),T.roughness!==null&&f.setFloat("glossiness",1-T.roughness),T.roughness!==null||T.metallic!==null||T.metallicTexture!==null?(T.albedoTexture!==null&&(f.setTexture("albedoSampler",T.albedoTexture),f.setMatrix("albedoMatrix",T.albedoTexture.getTextureMatrix())),T.albedoColor!==null&&f.setColor3("albedoColor",T.albedoColor)):(T.reflectivityTexture!==null?(f.setTexture("reflectivitySampler",T.reflectivityTexture),f.setMatrix("reflectivityMatrix",T.reflectivityTexture.getTextureMatrix())):T.reflectivityColor!==null&&f.setColor3("reflectivityColor",T.reflectivityColor),T.microSurface!==null&&f.setFloat("glossiness",T.microSurface));else if(T.getClassName()==="StandardMaterial")T.specularTexture!==null&&(f.setTexture("reflectivitySampler",T.specularTexture),f.setMatrix("reflectivityMatrix",T.specularTexture.getTextureMatrix())),T.specularColor!==null&&f.setColor3("reflectivityColor",T.specularColor);else if(T.getClassName()==="OpenPBRMaterial"){const R=T;R._useRoughnessFromMetallicTextureGreen&&R.baseMetalnessTexture?(f.setTexture("reflectivitySampler",R.baseMetalnessTexture),f.setMatrix("reflectivityMatrix",R.baseMetalnessTexture.getTextureMatrix())):R.baseMetalnessTexture?(f.setTexture("metallicSampler",R.baseMetalnessTexture),f.setMatrix("metallicMatrix",R.baseMetalnessTexture.getTextureMatrix())):R.specularRoughnessTexture&&(f.setTexture("roughnessSampler",R.specularRoughnessTexture),f.setMatrix("roughnessMatrix",R.specularRoughnessTexture.getTextureMatrix())),f.setFloat("metallic",R.baseMetalness),f.setFloat("glossiness",1-R.specularRoughness),R.baseColorTexture!==null&&(f.setTexture("albedoSampler",R.baseColorTexture),f.setMatrix("albedoMatrix",R.baseColorTexture.getTextureMatrix())),R.baseColor!==null&&f.setColor3("albedoColor",R.baseColor)}}if(this._enableIrradiance&&G.environmentTexture){const R=G.environmentTexture,ue=G.postProcessRenderPipelineManager.supportedPipelines.find(E=>E.getClassName()==="IBLShadowsRenderPipeline");if(ue){const Q=ue._getAccumulatedTexture();Q&&(f.setTexture("iblShadowSampler",Q),f.setFloat2("shadowTextureSize",Q.getSize().width,Q.getSize().height))}if(f.setMatrix("reflectionMatrix",R.getReflectionTextureMatrix()),f.setFloat2("vReflectionInfos",R.level*G.iblIntensity,0),f.setTexture("reflectionSampler",R),R.irradianceTexture&&(f.setTexture("irradianceSampler",R.irradianceTexture),R.irradianceTexture._dominantDirection&&f.setVector3("vReflectionDominantDirection",R.irradianceTexture._dominantDirection)),R.sphericalPolynomial){const E=R.sphericalPolynomial;if(E.preScaledHarmonics){const Q=E.preScaledHarmonics;f.setVector3("vSphericalL00",Q.l00),f.setVector3("vSphericalL1_1",Q.l1_1),f.setVector3("vSphericalL10",Q.l10),f.setVector3("vSphericalL11",Q.l11),f.setVector3("vSphericalL2_2",Q.l2_2),f.setVector3("vSphericalL2_1",Q.l2_1),f.setVector3("vSphericalL20",Q.l20),f.setVector3("vSphericalL21",Q.l21),f.setVector3("vSphericalL22",Q.l22)}else f.setFloat3("vSphericalX",E.x.x,E.x.y,E.x.z),f.setFloat3("vSphericalY",E.y.x,E.y.y,E.y.z),f.setFloat3("vSphericalZ",E.z.x,E.z.y,E.z.z),f.setFloat3("vSphericalXX_ZZ",E.xx.x-E.zz.x,E.xx.y-E.zz.y,E.xx.z-E.zz.z),f.setFloat3("vSphericalYY_ZZ",E.yy.x-E.zz.x,E.yy.y-E.zz.y,E.yy.z-E.zz.z),f.setFloat3("vSphericalZZ",E.zz.x,E.zz.y,E.zz.z),f.setFloat3("vSphericalXY",E.xy.x,E.xy.y,E.xy.z),f.setFloat3("vSphericalYZ",E.yz.x,E.yz.y,E.yz.z),f.setFloat3("vSphericalZX",E.zx.x,E.zx.y,E.zx.z)}if(this.generateIrradianceWithScatterMask&&T.getClassName()==="OpenPBRMaterial"){const E=T;f.setFloat("vSubsurfaceWeight",E.subsurfaceWeight),E.subsurfaceWeightTexture&&(f.setTexture("subsurfaceWeightSampler",E.subsurfaceWeightTexture),f.setMatrix("subsurfaceWeightMatrix",E.subsurfaceWeightTexture.getTextureMatrix())),f.setFloat("vTransmissionWeight",E.transmissionWeight),E.transmissionWeightTexture&&(f.setTexture("transmissionWeightSampler",E.transmissionWeightTexture),f.setMatrix("transmissionWeightMatrix",E.transmissionWeightTexture.getTextureMatrix())),f.setFloat("vTransmissionScatterAnisotropy",E.transmissionScatterAnisotropy),f.setFloat("vSubsurfaceScatterAnisotropy",E.subsurfaceScatterAnisotropy)}}if(Wl(f,T,this._scene),A.useBones&&A.computeBonesUsingShaders&&A.skeleton){const R=A.skeleton;if(R.isUsingTextureForMatrices&&f.getUniformIndex("boneTextureInfo")>-1){const ue=R.getTransformMatrixTexture(A);f.setTexture("boneSampler",ue),f.setFloat2("boneTextureInfo",R._textureWidth,R._textureHeight)}else f.setMatrices("mBones",A.skeleton.getTransformMatrices(A));(this._enableVelocity||this._enableVelocityLinear)&&f.setMatrices("mPreviousBones",this._previousBonesTransformationMatrices[A.uniqueId])}wl(A,f),A.morphTargetManager&&A.morphTargetManager.isUsingTextureForTargets&&A.morphTargetManager._bind(f),(this._enableVelocity||this._enableVelocityLinear)&&(f.setMatrix("previousWorld",this._previousTransformationMatrices[W.uniqueId].world),f.setMatrix("previousViewProjection",this._previousTransformationMatrices[W.uniqueId].viewProjection)),ie&&A.hasThinInstances&&f.setMatrix("world",V),A._processRendering(W,x,f,T.fillMode,le,ie,(R,ue)=>{R||f.setMatrix("world",ue)})}(this._enableVelocity||this._enableVelocityLinear)&&(this._previousTransformationMatrices[W.uniqueId].world=V.clone(),this._previousTransformationMatrices[W.uniqueId].viewProjection=this._scene.getTransformMatrix().clone(),A.skeleton&&this._copyBonesTransformationMatrices(A.skeleton.getTransformMatrices(A),this._previousBonesTransformationMatrices[W.uniqueId]))};this._multiRenderTarget.customIsReadyFunction=(x,A,W)=>{if((W||A===0)&&x.subMeshes)for(let G=0;G<x.subMeshes.length;++G){const y=x.subMeshes[G],T=y.getMaterial(),le=y.getRenderingMesh();if(!T)continue;const ie=le._getInstancesRenderList(y._id,!!y.getReplacementMesh()),V=s.getCaps().instancedArrays&&(ie.visibleInstances[y._id]!==null||le.hasThinInstances);if(!this.isReady(y,V))return!1}return!0},this._multiRenderTarget.customRenderFunction=(x,A,W,G)=>{let y;if(this._linkedWithPrePass){if(!this._prePassRenderer.enabled)return;this._scene.getEngine().bindAttachments(this._attachmentsFromPrePass)}if(G.length){for(s.setColorWrite(!1),y=0;y<G.length;y++)v(G.data[y]);s.setColorWrite(!0)}for(y=0;y<x.length;y++)v(x.data[y]);for(s.setDepthWrite(!1),y=0;y<A.length;y++)v(A.data[y]);if(this.renderTransparentMeshes)for(y=0;y<W.length;y++)v(W.data[y]);s.setDepthWrite(!0)}}_copyBonesTransformationMatrices(s,o){for(let l=0;l<s.length;l++)o[l]=s[l];return o}}D.ForceGLSL=!1;D.DEPTH_TEXTURE_TYPE=0;D.NORMAL_TEXTURE_TYPE=1;D.POSITION_TEXTURE_TYPE=2;D.VELOCITY_TEXTURE_TYPE=3;D.REFLECTIVITY_TEXTURE_TYPE=4;D.SCREENSPACE_DEPTH_TEXTURE_TYPE=5;D.VELOCITY_LINEAR_TEXTURE_TYPE=6;D.IRRADIANCE_TEXTURE_TYPE=7;D._SceneComponentInitialization=r=>{throw Jl("GeometryBufferRendererSceneComponent")};const Le={effect:null,subMesh:null};function Hl(r){if(typeof r=="number")return 1;if(r instanceof ve)return 2;if(r instanceof ko||r instanceof Re)return 3;if(r instanceof Gl||r instanceof Gt)return 4;throw new Error("Unsupported OpenPBR property type.")}class Ne{populateVectorFromLinkedProperties(s){const o=Hl(s);for(const l in this.linkedProperties){const n=this.linkedProperties[l],m=n.numComponents;if(o<m||n.targetUniformComponentOffset>o-m){m==1?De.Error(`Float property ${n.name} has an offset that is too large.`):De.Error(`Vector${m} property ${n.name} won't fit in Vector${o} or has an offset that is too large.`);return}typeof n.value=="number"?Ne._tmpArray[n.targetUniformComponentOffset]=n.value:n.value.toArray(Ne._tmpArray,n.targetUniformComponentOffset)}s.fromArray(Ne._tmpArray)}constructor(s,o){this.linkedProperties={},this.firstLinkedKey="",this.name=s,this.numComponents=o}}Ne._tmpArray=[0,0,0,0];class L{constructor(s,o,l,n,m=0,d){this.targetUniformComponentNum=4,this.targetUniformComponentOffset=0,this.name=s,this.targetUniformName=l,this.defaultValue=o,this.value=o,this.targetUniformComponentNum=n,this.targetUniformComponentOffset=m,this.requiredDefine=d}get numComponents(){return typeof this.defaultValue=="number"?1:Hl(this.defaultValue)}}class z{get samplerName(){return this.samplerPrefix+"Sampler"}get samplerInfoName(){return"v"+this.samplerPrefix.charAt(0).toUpperCase()+this.samplerPrefix.slice(1)+"Infos"}get samplerMatrixName(){return this.samplerPrefix+"Matrix"}constructor(s,o,l){this.value=null,this.samplerPrefix="",this.textureDefine="",this.name=s,this.samplerPrefix=o,this.textureDefine=l}}class Ko extends Bo(zo(Uo)){}class jo extends wo(Ko){}class Bl extends Lo(jo){constructor(s){super(s),this.NUM_SAMPLES="0",this.REALTIME_FILTERING=!1,this.IBL_CDF_FILTERING=!1,this.LIGHTCOUNT=0,this.VERTEXCOLOR=!1,this.BAKED_VERTEX_ANIMATION_TEXTURE=!1,this.VERTEXALPHA=!1,this.ALPHATEST=!1,this.DEPTHPREPASS=!1,this.ALPHABLEND=!1,this.ALPHA_FROM_BASE_COLOR_TEXTURE=!1,this.ALPHATESTVALUE="0.5",this.PREMULTIPLYALPHA=!1,this.REFLECTIVITY_GAMMA=!1,this.REFLECTIVITYDIRECTUV=0,this.SPECULARTERM=!1,this.LODBASEDMICROSFURACE=!0,this.SPECULAR_ROUGHNESS_FROM_METALNESS_TEXTURE_GREEN=!1,this.BASE_METALNESS_FROM_METALNESS_TEXTURE_BLUE=!1,this.AOSTOREINMETALMAPRED=!1,this.SPECULAR_WEIGHT_IN_ALPHA=!1,this.SPECULAR_WEIGHT_FROM_SPECULAR_COLOR_TEXTURE=!1,this.SPECULAR_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=!1,this.COAT_ROUGHNESS_FROM_GREEN_CHANNEL=!1,this.COAT_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=!1,this.USE_GLTF_STYLE_ANISOTROPY=!1,this.THIN_FILM_THICKNESS_FROM_THIN_FILM_TEXTURE=!1,this.FUZZ_ROUGHNESS_FROM_TEXTURE_ALPHA=!1,this.SUBSURFACE_WEIGHT_FROM_TEXTURE_ALPHA=!1,this.GEOMETRY_THICKNESS_FROM_GREEN_CHANNEL=!1,this.ENVIRONMENTBRDF=!1,this.ENVIRONMENTBRDF_RGBD=!1,this.FUZZENVIRONMENTBRDF=!1,this.NORMAL=!1,this.TANGENT=!1,this.OBJECTSPACE_NORMALMAP=!1,this.PARALLAX=!1,this.PARALLAX_RHS=!1,this.PARALLAXOCCLUSION=!1,this.NORMALXYSCALE=!0,this.ANISOTROPIC=!1,this.ANISOTROPIC_OPENPBR=!0,this.ANISOTROPIC_BASE=!1,this.ANISOTROPIC_COAT=!1,this.FUZZ_IBL_SAMPLES=6,this.REFRACTION_HIGH_QUALITY_BLUR=!1,this.FUZZ=!1,this.THIN_FILM=!1,this.IRIDESCENCE=!1,this.DISPERSION=!1,this.SCATTERING=!1,this.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING=!1,this.SSS_SAMPLE_COUNT=16,this.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING_GBUFFER=!1,this.TRANSMISSION_SLAB=!1,this.TRANSMISSION_SLAB_VOLUME=!1,this.SUBSURFACE_SLAB=!1,this.GEOMETRY_THIN_WALLED=!1,this.REFRACTED_BACKGROUND=!1,this.REFRACTED_LIGHTS=!1,this.REFRACTED_ENVIRONMENT=!1,this.REFRACTED_ENVIRONMENT_OPPOSITEZ=!1,this.REFRACTED_ENVIRONMENT_LOCAL_CUBE=!1,this.RADIANCEOCCLUSION=!1,this.HORIZONOCCLUSION=!1,this.INSTANCES=!1,this.THIN_INSTANCES=!1,this.INSTANCESCOLOR=!1,this.NUM_BONE_INFLUENCERS=0,this.BonesPerMesh=0,this.BONETEXTURE=!1,this.BONES_VELOCITY_ENABLED=!1,this.NONUNIFORMSCALING=!1,this.MORPHTARGETS=!1,this.MORPHTARGETS_POSITION=!1,this.MORPHTARGETS_NORMAL=!1,this.MORPHTARGETS_TANGENT=!1,this.MORPHTARGETS_UV=!1,this.MORPHTARGETS_UV2=!1,this.MORPHTARGETS_COLOR=!1,this.MORPHTARGETTEXTURE_HASPOSITIONS=!1,this.MORPHTARGETTEXTURE_HASNORMALS=!1,this.MORPHTARGETTEXTURE_HASTANGENTS=!1,this.MORPHTARGETTEXTURE_HASUVS=!1,this.MORPHTARGETTEXTURE_HASUV2S=!1,this.MORPHTARGETTEXTURE_HASCOLORS=!1,this.NUM_MORPH_INFLUENCERS=0,this.MORPHTARGETS_TEXTURE=!1,this.USEPHYSICALLIGHTFALLOFF=!1,this.USEGLTFLIGHTFALLOFF=!1,this.TWOSIDEDLIGHTING=!1,this.MIRRORED=!1,this.SHADOWFLOAT=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.POINTSIZE=!1,this.FOG=!1,this.LOGARITHMICDEPTH=!1,this.CAMERA_ORTHOGRAPHIC=!1,this.CAMERA_PERSPECTIVE=!1,this.AREALIGHTSUPPORTED=!0,this.FORCENORMALFORWARD=!1,this.SPECULARAA=!1,this.UNLIT=!1,this.DECAL_AFTER_DETAIL=!1,this.TEXTURE_REPETITION_MODE=0,this.DEBUGMODE=0,this.USE_VERTEX_PULLING=!1,this.VERTEX_PULLING_USE_INDEX_BUFFER=!1,this.VERTEX_PULLING_INDEX_BUFFER_32BITS=!1,this.RIGHT_HANDED=!1,this.CLUSTLIGHT_SLICES=0,this.CLUSTLIGHT_BATCH=0,this.BRDF_V_HEIGHT_CORRELATED=!0,this.MS_BRDF_ENERGY_CONSERVATION=!0,this.SPHERICAL_HARMONICS=!0,this.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=!0,this.MIX_IBL_RADIANCE_WITH_IRRADIANCE=!0,this.LEGACY_SPECULAR_ENERGY_CONSERVATION=!1,this.BASE_DIFFUSE_MODEL=0,this.DIELECTRIC_SPECULAR_MODEL=1,this.CONDUCTOR_SPECULAR_MODEL=1,this.rebuild()}reset(){super.reset(),this.ALPHATESTVALUE="0.5",this.NORMALXYSCALE=!0}}class Qo extends No(vo){}let qo=(()=>{var r,s,o,l,n,m,d,I,k,U,M,N,J,se,_e,te,v,x,A,W,G,y,T,le,ie,V,g,f,fe,oe,R,ue,E,Q,P,he,q,Te,ce,j,ye,Oe,Ce,Fe,Z,Ee,Se,Me,Ie,ke,Be,ze,Ue,We,we,Ge,He,Ve,Xe,Ye,Ze,Ke,je,Qe,qe,$e,Je,et,tt,st,it,rt,at,nt,lt,ot,ut,ht,ct,_t,ft,Tt,gt,mt,pt,dt,xt,Rt,At,Et,St,Mt,It,bt,yt,Ot,Ct,Ft,Lt,Dt,Pt,Nt,vt;let Ht=Qo,kt=[],Vt,Xt=[],Yt=[],Zt,Kt=[],jt=[],Qt,qt=[],$t=[],Jt,es=[],ts=[],ss,is=[],rs=[],as,ns=[],ls=[],os,us=[],hs=[],cs,_s=[],fs=[],Ts,gs=[],ms=[],ps,ds=[],xs=[],Rs,As=[],Es=[],Ss,Ms=[],Is=[],bs,ys=[],Os=[],Cs,Fs=[],Ls=[],Ds,Ps=[],Ns=[],vs,ks=[],Bs=[],zs,Us=[],Ws=[],ws,Gs=[],Hs=[],Vs,Xs=[],Ys=[],Zs,Ks=[],js=[],Qs,qs=[],$s=[],Js,ei=[],ti=[],si,ii=[],ri=[],ai,ni=[],li=[],oi,ui=[],hi=[],ci,_i=[],fi=[],Ti,gi=[],mi=[],pi,di=[],xi=[],Ri,Ai=[],Ei=[],Si,Mi=[],Ii=[],bi,yi=[],Oi=[],Ci,Fi=[],Li=[],Di,Pi=[],Ni=[],vi,ki=[],Bi=[],zi,Ui=[],Wi=[],wi,Gi=[],Hi=[],Vi,Xi=[],Yi=[],Zi,Ki=[],ji=[],Qi,qi=[],$i=[],Ji,er=[],tr=[],sr,ir=[],rr=[],ar,nr=[],lr=[],or,ur=[],hr=[],cr,_r=[],fr=[],Tr,gr=[],mr=[],pr,dr=[],xr=[],Rr,Ar=[],Er=[],Sr,Mr=[],Ir=[],br,yr=[],Or=[],Cr,Fr=[],Lr=[],Dr,Pr=[],Nr=[],vr,kr=[],Br=[],zr,Ur=[],Wr=[],wr,Gr=[],Hr=[],Vr,Xr=[],Yr=[],Zr,Kr=[],jr=[],Qr,qr=[],$r=[],Jr,ea=[],ta=[],sa,ia=[],ra=[],aa,na=[],la=[],oa,ua=[],ha=[],ca,_a=[],fa=[],Ta,ga=[],ma=[],pa,da=[],xa=[],Ra,Aa=[],Ea=[],Sa,Ma=[],Ia=[],ba,ya=[],Oa=[],Ca,Fa=[],La=[],Da,Pa=[],Na=[],va,ka=[],Ba=[],za,Ua=[],Wa=[],wa,Ga=[],Ha=[],Va,Xa=[],Ya=[],Za,Ka=[],ja=[],Qa,qa=[],$a=[],Ja,en=[],tn=[],sn,rn=[],an=[],nn,ln=[],on=[],un,hn=[],cn=[],_n,fn=[],Tn=[],gn,mn=[],pn=[],dn,xn=[],Rn=[],An,En,Sn,Mn=[],In=[],bn,yn=[],On=[],Cn,Fn=[],Ln=[],Dn,Pn=[],Nn=[],vn,kn=[],Bn=[],zn,Un=[],Wn=[],wn,Gn=[],Hn=[],Vn,Xn=[],Yn=[],Zn,Kn=[],jn=[],Qn,qn=[],$n=[],Jn,el=[],tl=[],sl,il=[],rl=[],al,nl=[],ll=[],ol,ul=[],hl=[],cl,_l=[],fl=[],Tl,gl=[],ml=[],pl,dl=[],xl=[],Rl,Al=[],El=[],Sl,Ml=[],Il=[],bl,yl=[],Ol=[],Cl;return r=class extends Ht{get baseWeight(){return c(this,s,"f")}set baseWeight(e){_(this,s,e,"f")}get baseWeightTexture(){return c(this,o,"f")}set baseWeightTexture(e){_(this,o,e,"f")}get baseColor(){return c(this,l,"f")}set baseColor(e){_(this,l,e,"f")}get baseColorTexture(){return c(this,n,"f")}set baseColorTexture(e){_(this,n,e,"f")}get baseDiffuseRoughness(){return c(this,m,"f")}set baseDiffuseRoughness(e){_(this,m,e,"f")}get baseDiffuseRoughnessTexture(){return c(this,d,"f")}set baseDiffuseRoughnessTexture(e){_(this,d,e,"f")}get baseMetalness(){return c(this,I,"f")}set baseMetalness(e){_(this,I,e,"f")}get baseMetalnessTexture(){return c(this,k,"f")}set baseMetalnessTexture(e){_(this,k,e,"f")}get specularWeight(){return c(this,U,"f")}set specularWeight(e){_(this,U,e,"f")}get specularWeightTexture(){return c(this,M,"f")}set specularWeightTexture(e){_(this,M,e,"f")}get specularColor(){return c(this,N,"f")}set specularColor(e){_(this,N,e,"f")}get specularColorTexture(){return c(this,J,"f")}set specularColorTexture(e){_(this,J,e,"f")}get specularRoughness(){return c(this,se,"f")}set specularRoughness(e){_(this,se,e,"f")}get specularRoughnessTexture(){return c(this,_e,"f")}set specularRoughnessTexture(e){_(this,_e,e,"f")}get specularRoughnessAnisotropy(){return c(this,te,"f")}set specularRoughnessAnisotropy(e){_(this,te,e,"f")}get specularRoughnessAnisotropyTexture(){return c(this,v,"f")}set specularRoughnessAnisotropyTexture(e){_(this,v,e,"f")}get specularIor(){return c(this,x,"f")}set specularIor(e){_(this,x,e,"f")}get transmissionWeight(){return c(this,A,"f")}set transmissionWeight(e){_(this,A,e,"f")}get transmissionWeightTexture(){return c(this,W,"f")}set transmissionWeightTexture(e){_(this,W,e,"f")}get transmissionColor(){return c(this,G,"f")}set transmissionColor(e){_(this,G,e,"f")}get transmissionColorTexture(){return c(this,y,"f")}set transmissionColorTexture(e){_(this,y,e,"f")}get transmissionDepth(){return c(this,T,"f")}set transmissionDepth(e){_(this,T,e,"f")}get transmissionDepthTexture(){return c(this,le,"f")}set transmissionDepthTexture(e){_(this,le,e,"f")}get transmissionScatter(){return c(this,ie,"f")}set transmissionScatter(e){_(this,ie,e,"f")}get transmissionScatterTexture(){return c(this,V,"f")}set transmissionScatterTexture(e){_(this,V,e,"f")}get transmissionScatterAnisotropy(){return c(this,g,"f")}set transmissionScatterAnisotropy(e){_(this,g,e,"f")}get transmissionDispersionScale(){return c(this,f,"f")}set transmissionDispersionScale(e){_(this,f,e,"f")}get transmissionDispersionScaleTexture(){return c(this,fe,"f")}set transmissionDispersionScaleTexture(e){_(this,fe,e,"f")}get transmissionDispersionAbbeNumber(){return c(this,oe,"f")}set transmissionDispersionAbbeNumber(e){_(this,oe,e,"f")}get subsurfaceWeight(){return c(this,R,"f")}set subsurfaceWeight(e){_(this,R,e,"f")}get subsurfaceWeightTexture(){return c(this,ue,"f")}set subsurfaceWeightTexture(e){_(this,ue,e,"f")}get subsurfaceColor(){return c(this,E,"f")}set subsurfaceColor(e){_(this,E,e,"f")}get subsurfaceColorTexture(){return c(this,Q,"f")}set subsurfaceColorTexture(e){_(this,Q,e,"f")}get subsurfaceRadius(){return c(this,P,"f")}set subsurfaceRadius(e){_(this,P,e,"f")}get subsurfaceRadiusScale(){return c(this,he,"f")}set subsurfaceRadiusScale(e){_(this,he,e,"f")}get subsurfaceRadiusScaleTexture(){return c(this,q,"f")}set subsurfaceRadiusScaleTexture(e){_(this,q,e,"f")}get subsurfaceScatterAnisotropy(){return c(this,Te,"f")}set subsurfaceScatterAnisotropy(e){_(this,Te,e,"f")}get coatWeight(){return c(this,ce,"f")}set coatWeight(e){_(this,ce,e,"f")}get coatWeightTexture(){return c(this,j,"f")}set coatWeightTexture(e){_(this,j,e,"f")}get coatColor(){return c(this,ye,"f")}set coatColor(e){_(this,ye,e,"f")}get coatColorTexture(){return c(this,Oe,"f")}set coatColorTexture(e){_(this,Oe,e,"f")}get coatRoughness(){return c(this,Ce,"f")}set coatRoughness(e){_(this,Ce,e,"f")}get coatRoughnessTexture(){return c(this,Fe,"f")}set coatRoughnessTexture(e){_(this,Fe,e,"f")}get coatRoughnessAnisotropy(){return c(this,Z,"f")}set coatRoughnessAnisotropy(e){_(this,Z,e,"f")}get coatRoughnessAnisotropyTexture(){return c(this,Ee,"f")}set coatRoughnessAnisotropyTexture(e){_(this,Ee,e,"f")}get coatIor(){return c(this,Se,"f")}set coatIor(e){_(this,Se,e,"f")}get coatDarkening(){return c(this,Me,"f")}set coatDarkening(e){_(this,Me,e,"f")}get coatDarkeningTexture(){return c(this,Ie,"f")}set coatDarkeningTexture(e){_(this,Ie,e,"f")}get fuzzWeight(){return c(this,ke,"f")}set fuzzWeight(e){_(this,ke,e,"f")}get fuzzWeightTexture(){return c(this,Be,"f")}set fuzzWeightTexture(e){_(this,Be,e,"f")}get fuzzColor(){return c(this,ze,"f")}set fuzzColor(e){_(this,ze,e,"f")}get fuzzColorTexture(){return c(this,Ue,"f")}set fuzzColorTexture(e){_(this,Ue,e,"f")}get fuzzRoughness(){return c(this,We,"f")}set fuzzRoughness(e){_(this,We,e,"f")}get fuzzRoughnessTexture(){return c(this,we,"f")}set fuzzRoughnessTexture(e){_(this,we,e,"f")}get geometryThinWalled(){return c(this,Ge,"f")}set geometryThinWalled(e){_(this,Ge,e,"f")}get geometryNormalTexture(){return c(this,He,"f")}set geometryNormalTexture(e){_(this,He,e,"f")}get geometryTangent(){return c(this,Ve,"f")}set geometryTangent(e){_(this,Ve,e,"f")}get geometryTangentAngle(){return Math.atan2(this.geometryTangent.y,this.geometryTangent.x)}set geometryTangentAngle(e){this.geometryTangent=new ve(Math.cos(e),Math.sin(e))}get geometryTangentTexture(){return c(this,Xe,"f")}set geometryTangentTexture(e){_(this,Xe,e,"f")}get geometryCoatNormalTexture(){return c(this,Ye,"f")}set geometryCoatNormalTexture(e){_(this,Ye,e,"f")}get geometryCoatTangent(){return c(this,Ze,"f")}set geometryCoatTangent(e){_(this,Ze,e,"f")}get geometryCoatTangentAngle(){return Math.atan2(this.geometryCoatTangent.y,this.geometryCoatTangent.x)}set geometryCoatTangentAngle(e){this.geometryCoatTangent=new ve(Math.cos(e),Math.sin(e))}get geometryCoatTangentTexture(){return c(this,Ke,"f")}set geometryCoatTangentTexture(e){_(this,Ke,e,"f")}get geometryOpacity(){return c(this,je,"f")}set geometryOpacity(e){_(this,je,e,"f")}get geometryOpacityTexture(){return c(this,Qe,"f")}set geometryOpacityTexture(e){_(this,Qe,e,"f")}get geometryThickness(){return c(this,qe,"f")}set geometryThickness(e){_(this,qe,e,"f")}get geometryThicknessTexture(){return c(this,$e,"f")}set geometryThicknessTexture(e){_(this,$e,e,"f")}get emissionLuminance(){return c(this,Je,"f")}set emissionLuminance(e){_(this,Je,e,"f")}get emissionColor(){return c(this,et,"f")}set emissionColor(e){_(this,et,e,"f")}get emissionColorTexture(){return c(this,tt,"f")}set emissionColorTexture(e){_(this,tt,e,"f")}get thinFilmWeight(){return c(this,st,"f")}set thinFilmWeight(e){_(this,st,e,"f")}get thinFilmWeightTexture(){return c(this,it,"f")}set thinFilmWeightTexture(e){_(this,it,e,"f")}get thinFilmThickness(){return c(this,rt,"f")}set thinFilmThickness(e){_(this,rt,e,"f")}get thinFilmThicknessMin(){return c(this,at,"f")}set thinFilmThicknessMin(e){_(this,at,e,"f")}get thinFilmThicknessTexture(){return c(this,nt,"f")}set thinFilmThicknessTexture(e){_(this,nt,e,"f")}get thinFilmIor(){return c(this,lt,"f")}set thinFilmIor(e){_(this,lt,e,"f")}get ambientOcclusionTexture(){return c(this,ot,"f")}set ambientOcclusionTexture(e){_(this,ot,e,"f")}get sssQuality(){return this._sssQuality}set sssQuality(e){this._sssQuality!==e&&(this._sssQuality=e,this.markAsDirty(1))}get sssIrradianceTexture(){return this._sssIrradianceTexture}set sssIrradianceTexture(e){this._sssIrradianceTexture!==e&&(this._sssIrradianceTexture=e,this._markAllSubMeshesAsTexturesDirty())}get sssDepthTexture(){return this._sssDepthTexture}set sssDepthTexture(e){this._sssDepthTexture!==e&&(this._sssDepthTexture=e,this._markAllSubMeshesAsTexturesDirty())}get directIntensity(){return c(this,ut,"f")}set directIntensity(e){_(this,ut,e,"f")}get environmentIntensity(){return c(this,ht,"f")}set environmentIntensity(e){_(this,ht,e,"f")}get useSpecularWeightFromTextureAlpha(){return c(this,ct,"f")}set useSpecularWeightFromTextureAlpha(e){_(this,ct,e,"f")}get forceAlphaTest(){return c(this,_t,"f")}set forceAlphaTest(e){_(this,_t,e,"f")}get alphaCutOff(){return c(this,ft,"f")}set alphaCutOff(e){_(this,ft,e,"f")}get useAmbientOcclusionFromMetallicTextureRed(){return c(this,Tt,"f")}set useAmbientOcclusionFromMetallicTextureRed(e){_(this,Tt,e,"f")}get useAmbientInGrayScale(){return c(this,gt,"f")}set useAmbientInGrayScale(e){_(this,gt,e,"f")}get hasTransparency(){return this.subsurfaceWeight>0||this.transmissionWeight>0}get hasScattering(){return this.transmissionWeight>0&&this.transmissionDepth>0&&!this.transmissionScatter.equals(Re.BlackReadOnly)||this.subsurfaceWeight>0}get usePhysicalLightFalloff(){return this._lightFalloff===ne.LIGHTFALLOFF_PHYSICAL}set usePhysicalLightFalloff(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),e?this._lightFalloff=ne.LIGHTFALLOFF_PHYSICAL:this._lightFalloff=ne.LIGHTFALLOFF_STANDARD)}get useGLTFLightFalloff(){return this._lightFalloff===ne.LIGHTFALLOFF_GLTF}set useGLTFLightFalloff(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),e?this._lightFalloff=ne.LIGHTFALLOFF_GLTF:this._lightFalloff=ne.LIGHTFALLOFF_STANDARD)}get useObjectSpaceNormalMap(){return c(this,mt,"f")}set useObjectSpaceNormalMap(e){_(this,mt,e,"f")}get useParallax(){return c(this,pt,"f")}set useParallax(e){_(this,pt,e,"f")}get useParallaxOcclusion(){return c(this,dt,"f")}set useParallaxOcclusion(e){_(this,dt,e,"f")}get parallaxScaleBias(){return c(this,xt,"f")}set parallaxScaleBias(e){_(this,xt,e,"f")}get disableLighting(){return c(this,Rt,"f")}set disableLighting(e){_(this,Rt,e,"f")}get forceIrradianceInFragment(){return c(this,At,"f")}set forceIrradianceInFragment(e){_(this,At,e,"f")}get maxSimultaneousLights(){return c(this,Et,"f")}set maxSimultaneousLights(e){_(this,Et,e,"f")}get invertNormalMapX(){return c(this,St,"f")}set invertNormalMapX(e){_(this,St,e,"f")}get invertNormalMapY(){return c(this,Mt,"f")}set invertNormalMapY(e){_(this,Mt,e,"f")}get twoSidedLighting(){return c(this,It,"f")}set twoSidedLighting(e){_(this,It,e,"f")}get useAlphaFresnel(){return c(this,bt,"f")}set useAlphaFresnel(e){_(this,bt,e,"f")}get useLinearAlphaFresnel(){return c(this,yt,"f")}set useLinearAlphaFresnel(e){_(this,yt,e,"f")}get environmentBRDFTexture(){return c(this,Ot,"f")}set environmentBRDFTexture(e){_(this,Ot,e,"f")}get forceNormalForward(){return c(this,Ct,"f")}set forceNormalForward(e){_(this,Ct,e,"f")}get enableSpecularAntiAliasing(){return c(this,Ft,"f")}set enableSpecularAntiAliasing(e){_(this,Ft,e,"f")}get useHorizonOcclusion(){return c(this,Lt,"f")}set useHorizonOcclusion(e){_(this,Lt,e,"f")}get useRadianceOcclusion(){return c(this,Dt,"f")}set useRadianceOcclusion(e){_(this,Dt,e,"f")}get unlit(){return c(this,Pt,"f")}set unlit(e){_(this,Pt,e,"f")}get applyDecalMapAfterDetailMap(){return c(this,Nt,"f")}set applyDecalMapAfterDetailMap(e){_(this,Nt,e,"f")}get backgroundRefractionTexture(){return this._backgroundRefractionTexture}set backgroundRefractionTexture(e){this._backgroundRefractionTexture=e,this._markAllSubMeshesAsTexturesDirty()}get refractionHighQualityBlur(){return this._refractionHighQualityBlur}set refractionHighQualityBlur(e){this._refractionHighQualityBlur!==e&&(this._refractionHighQualityBlur=e,this.markAsDirty(1))}get realTimeFiltering(){return this._realTimeFiltering}set realTimeFiltering(e){this._realTimeFiltering=e,this.markAsDirty(1)}get realTimeFilteringQuality(){return this._realTimeFilteringQuality}set realTimeFilteringQuality(e){this._realTimeFilteringQuality=e,this.markAsDirty(1)}get fuzzSampleNumber(){return this._fuzzSampleNumber}set fuzzSampleNumber(e){this._fuzzSampleNumber=e,this.markAsDirty(1)}get canRenderToMRT(){return!0}get debugMode(){return c(this,vt,"f")}set debugMode(e){_(this,vt,e,"f")}constructor(e,t,a=!1){super(e,t,void 0,a||r.ForceGLSL),s.set(this,(i(this,kt),i(this,Xt,void 0))),this._baseWeight=(i(this,Yt),new L("base_weight",1,"vBaseWeight",1)),o.set(this,i(this,Kt,void 0)),this._baseWeightTexture=(i(this,jt),new z("base_weight","baseWeight","BASE_WEIGHT")),l.set(this,i(this,qt,void 0)),this._baseColor=(i(this,$t),new L("base_color",Re.White(),"vBaseColor",4)),n.set(this,i(this,es,void 0)),this._baseColorTexture=(i(this,ts),new z("base_color","baseColor","BASE_COLOR")),m.set(this,i(this,is,void 0)),this._baseDiffuseRoughness=(i(this,rs),new L("base_diffuse_roughness",0,"vBaseDiffuseRoughness",1)),d.set(this,i(this,ns,void 0)),this._baseDiffuseRoughnessTexture=(i(this,ls),new z("base_diffuse_roughness","baseDiffuseRoughness","BASE_DIFFUSE_ROUGHNESS")),I.set(this,i(this,us,void 0)),this._baseMetalness=(i(this,hs),new L("base_metalness",0,"vReflectanceInfo",4,0)),k.set(this,i(this,_s,void 0)),this._baseMetalnessTexture=(i(this,fs),new z("base_metalness","baseMetalness","BASE_METALNESS")),U.set(this,i(this,gs,void 0)),this._specularWeight=(i(this,ms),new L("specular_weight",1,"vReflectanceInfo",4,3)),M.set(this,i(this,ds,void 0)),this._specularWeightTexture=(i(this,xs),new z("specular_weight","specularWeight","SPECULAR_WEIGHT")),N.set(this,i(this,As,void 0)),this._specularColor=(i(this,Es),new L("specular_color",Re.White(),"vSpecularColor",4)),J.set(this,i(this,Ms,void 0)),this._specularColorTexture=(i(this,Is),new z("specular_color","specularColor","SPECULAR_COLOR")),se.set(this,i(this,ys,void 0)),this._specularRoughness=(i(this,Os),new L("specular_roughness",.3,"vReflectanceInfo",4,1)),_e.set(this,i(this,Fs,void 0)),this._specularRoughnessTexture=(i(this,Ls),new z("specular_roughness","specularRoughness","SPECULAR_ROUGHNESS")),te.set(this,i(this,Ps,void 0)),this._specularRoughnessAnisotropy=(i(this,Ns),new L("specular_roughness_anisotropy",0,"vSpecularAnisotropy",3,2)),v.set(this,i(this,ks,void 0)),this._specularRoughnessAnisotropyTexture=(i(this,Bs),new z("specular_roughness_anisotropy","specularRoughnessAnisotropy","SPECULAR_ROUGHNESS_ANISOTROPY")),x.set(this,i(this,Us,void 0)),this._specularIor=(i(this,Ws),new L("specular_ior",1.5,"vReflectanceInfo",4,2)),A.set(this,i(this,Gs,void 0)),this._transmissionWeight=(i(this,Hs),new L("transmission_weight",0,"vTransmissionWeight",1)),W.set(this,i(this,Xs,void 0)),this._transmissionWeightTexture=(i(this,Ys),new z("transmission_weight","transmissionWeight","TRANSMISSION_WEIGHT")),G.set(this,i(this,Ks,void 0)),this._transmissionColor=(i(this,js),new L("transmission_color",Re.White(),"vTransmissionColor",3,0)),y.set(this,i(this,qs,void 0)),this._transmissionColorTexture=(i(this,$s),new z("transmission_color","transmissionColor","TRANSMISSION_COLOR")),T.set(this,i(this,ei,void 0)),this._transmissionDepth=(i(this,ti),new L("transmission_depth",0,"vTransmissionDepth",1,0)),le.set(this,i(this,ii,void 0)),this._transmissionDepthTexture=(i(this,ri),new z("transmission_depth","transmissionDepth","TRANSMISSION_DEPTH")),ie.set(this,i(this,ni,void 0)),this._transmissionScatter=(i(this,li),new L("transmission_scatter",Re.Black(),"vTransmissionScatter",3,0)),V.set(this,i(this,ui,void 0)),this._transmissionScatterTexture=(i(this,hi),new z("transmission_scatter","transmissionScatter","TRANSMISSION_SCATTER")),g.set(this,i(this,_i,void 0)),this._transmissionScatterAnisotropy=(i(this,fi),new L("transmission_scatter_anisotropy",0,"vTransmissionScatterAnisotropy",1,0)),f.set(this,i(this,gi,void 0)),this._transmissionDispersionScale=(i(this,mi),new L("transmission_dispersion_scale",0,"vTransmissionDispersionScale",1,0)),fe.set(this,i(this,di,void 0)),this._transmissionDispersionScaleTexture=(i(this,xi),new z("transmission_dispersion_scale","transmissionDispersionScale","TRANSMISSION_DISPERSION_SCALE")),oe.set(this,i(this,Ai,void 0)),this._transmissionDispersionAbbeNumber=(i(this,Ei),new L("transmission_dispersion_abbe_number",20,"vTransmissionDispersionAbbeNumber",1,0)),R.set(this,i(this,Mi,void 0)),this._subsurfaceWeight=(i(this,Ii),new L("subsurface_weight",0,"vSubsurfaceWeight",1,0,"SUBSURFACE_SLAB")),ue.set(this,i(this,yi,void 0)),this._subsurfaceWeightTexture=(i(this,Oi),new z("subsurface_weight","subsurfaceWeight","SUBSURFACE_WEIGHT")),E.set(this,i(this,Fi,void 0)),this._subsurfaceColor=(i(this,Li),new L("subsurface_color",new Re(.8,.8,.8),"vSubsurfaceColor",3,0,"SUBSURFACE_SLAB")),Q.set(this,i(this,Pi,void 0)),this._subsurfaceColorTexture=(i(this,Ni),new z("subsurface_color","subsurfaceColor","SUBSURFACE_COLOR")),P.set(this,i(this,ki,void 0)),this._subsurfaceRadius=(i(this,Bi),new L("subsurface_radius",.1,"vSubsurfaceRadius",1,0,"SUBSURFACE_SLAB")),he.set(this,i(this,Ui,void 0)),this._subsurfaceRadiusScale=(i(this,Wi),new L("subsurface_radius_scale",new Re(1,.5,.25),"vSubsurfaceRadiusScale",3,0,"SUBSURFACE_SLAB")),q.set(this,i(this,Gi,void 0)),this._subsurfaceRadiusScaleTexture=(i(this,Hi),new z("subsurface_radius_scale","subsurfaceRadiusScale","SUBSURFACE_RADIUS_SCALE")),Te.set(this,i(this,Xi,void 0)),this._subsurfaceScatterAnisotropy=(i(this,Yi),new L("subsurface_scatter_anisotropy",0,"vSubsurfaceScatterAnisotropy",1,0,"SUBSURFACE_SLAB")),ce.set(this,i(this,Ki,void 0)),this._coatWeight=(i(this,ji),new L("coat_weight",0,"vCoatWeight",1,0)),j.set(this,i(this,qi,void 0)),this._coatWeightTexture=(i(this,$i),new z("coat_weight","coatWeight","COAT_WEIGHT")),ye.set(this,i(this,er,void 0)),this._coatColor=(i(this,tr),new L("coat_color",Re.White(),"vCoatColor",3,0)),Oe.set(this,i(this,ir,void 0)),this._coatColorTexture=(i(this,rr),new z("coat_color","coatColor","COAT_COLOR")),Ce.set(this,i(this,nr,void 0)),this._coatRoughness=(i(this,lr),new L("coat_roughness",0,"vCoatRoughness",1,0)),Fe.set(this,i(this,ur,void 0)),this._coatRoughnessTexture=(i(this,hr),new z("coat_roughness","coatRoughness","COAT_ROUGHNESS")),Z.set(this,i(this,_r,void 0)),this._coatRoughnessAnisotropy=(i(this,fr),new L("coat_roughness_anisotropy",0,"vCoatRoughnessAnisotropy",1)),Ee.set(this,i(this,gr,void 0)),this._coatRoughnessAnisotropyTexture=(i(this,mr),new z("coat_roughness_anisotropy","coatRoughnessAnisotropy","COAT_ROUGHNESS_ANISOTROPY")),Se.set(this,i(this,dr,void 0)),this._coatIor=(i(this,xr),new L("coat_ior",1.5,"vCoatIor",1,0)),Me.set(this,i(this,Ar,void 0)),this._coatDarkening=(i(this,Er),new L("coat_darkening",1,"vCoatDarkening",1,0)),Ie.set(this,i(this,Mr,void 0)),this._coatDarkeningTexture=(i(this,Ir),new z("coat_darkening","coatDarkening","COAT_DARKENING")),this.useCoatRoughnessFromWeightTexture=!1,ke.set(this,i(this,yr,void 0)),this._fuzzWeight=(i(this,Or),new L("fuzz_weight",0,"vFuzzWeight",1,0)),Be.set(this,i(this,Fr,void 0)),this._fuzzWeightTexture=(i(this,Lr),new z("fuzz_weight","fuzzWeight","FUZZ_WEIGHT")),ze.set(this,i(this,Pr,void 0)),this._fuzzColor=(i(this,Nr),new L("fuzz_color",Re.White(),"vFuzzColor",3,0)),Ue.set(this,i(this,kr,void 0)),this._fuzzColorTexture=(i(this,Br),new z("fuzz_color","fuzzColor","FUZZ_COLOR")),We.set(this,i(this,Ur,void 0)),this._fuzzRoughness=(i(this,Wr),new L("fuzz_roughness",.5,"vFuzzRoughness",1,0)),we.set(this,i(this,Gr,void 0)),this._fuzzRoughnessTexture=(i(this,Hr),new z("fuzz_roughness","fuzzRoughness","FUZZ_ROUGHNESS")),Ge.set(this,i(this,Xr,void 0)),this._geometryThinWalled=(i(this,Yr),new L("geometry_thin_walled",0,"vGeometryThinWalled",1,0)),He.set(this,i(this,Kr,void 0)),this._geometryNormalTexture=(i(this,jr),new z("geometry_normal","geometryNormal","GEOMETRY_NORMAL")),Ve.set(this,i(this,qr,void 0)),this._geometryTangent=(i(this,$r),new L("geometry_tangent",new ve(1,0),"vSpecularAnisotropy",3,0)),Xe.set(this,i(this,ea,void 0)),this._geometryTangentTexture=(i(this,ta),new z("geometry_tangent","geometryTangent","GEOMETRY_TANGENT")),Ye.set(this,i(this,ia,void 0)),this._geometryCoatNormalTexture=(i(this,ra),new z("geometry_coat_normal","geometryCoatNormal","GEOMETRY_COAT_NORMAL")),Ze.set(this,i(this,na,void 0)),this._geometryCoatTangent=(i(this,la),new L("geometry_coat_tangent",new ve(1,0),"vGeometryCoatTangent",2,0)),Ke.set(this,i(this,ua,void 0)),this._geometryCoatTangentTexture=(i(this,ha),new z("geometry_coat_tangent","geometryCoatTangent","GEOMETRY_COAT_TANGENT")),je.set(this,i(this,_a,void 0)),this._geometryOpacity=(i(this,fa),new L("geometry_opacity",1,"vBaseColor",4,3)),Qe.set(this,i(this,ga,void 0)),this._geometryOpacityTexture=(i(this,ma),new z("geometry_opacity","geometryOpacity","GEOMETRY_OPACITY")),qe.set(this,i(this,da,void 0)),this._geometryThickness=(i(this,xa),new L("geometry_thickness",0,"vGeometryThickness",1,0)),$e.set(this,i(this,Aa,void 0)),this._geometryThicknessTexture=(i(this,Ea),new z("geometry_thickness","geometryThickness","GEOMETRY_THICKNESS")),Je.set(this,i(this,Ma,void 0)),this._emissionLuminance=(i(this,Ia),new L("emission_luminance",1,"vLightingIntensity",4,1)),et.set(this,i(this,ya,void 0)),this._emissionColor=(i(this,Oa),new L("emission_color",Re.Black(),"vEmissionColor",3)),tt.set(this,i(this,Fa,void 0)),this._emissionColorTexture=(i(this,La),new z("emission_color","emissionColor","EMISSION_COLOR")),st.set(this,i(this,Pa,void 0)),this._thinFilmWeight=(i(this,Na),new L("thin_film_weight",0,"vThinFilmWeight",1,0)),it.set(this,i(this,ka,void 0)),this._thinFilmWeightTexture=(i(this,Ba),new z("thin_film_weight","thinFilmWeight","THIN_FILM_WEIGHT")),rt.set(this,i(this,Ua,void 0)),this._thinFilmThickness=(i(this,Wa),new L("thin_film_thickness",.5,"vThinFilmThickness",2,0)),at.set(this,i(this,Ga,void 0)),this._thinFilmThicknessMin=(i(this,Ha),new L("thin_film_thickness_min",0,"vThinFilmThickness",2,1)),nt.set(this,i(this,Xa,void 0)),this._thinFilmThicknessTexture=(i(this,Ya),new z("thin_film_thickness","thinFilmThickness","THIN_FILM_THICKNESS")),lt.set(this,i(this,Ka,void 0)),this._thinFilmIor=(i(this,ja),new L("thin_film_ior",1.4,"vThinFilmIor",1,0)),ot.set(this,i(this,qa,void 0)),this._ambientOcclusionTexture=(i(this,$a),new z("ambient_occlusion","ambientOcclusion","AMBIENT_OCCLUSION")),this._sssQuality=r.SSS_QUALITY_MEDIUM,this._sssIrradianceTexture=null,this._sssDepthTexture=null,this._uniformsList={},this._uniformsArray=[],this._samplersList={},this._samplerDefines={},ut.set(this,i(this,en,1)),ht.set(this,(i(this,tn),i(this,rn,1))),ct.set(this,(i(this,an),i(this,ln,!1))),_t.set(this,(i(this,on),i(this,hn,!1))),ft.set(this,(i(this,cn),i(this,fn,.4))),Tt.set(this,(i(this,Tn),i(this,mn,!1))),gt.set(this,(i(this,pn),i(this,xn,!1))),mt.set(this,(i(this,Rn),i(this,Mn,!1))),pt.set(this,(i(this,In),i(this,yn,!1))),dt.set(this,(i(this,On),i(this,Fn,!1))),xt.set(this,(i(this,Ln),i(this,Pn,.05))),Rt.set(this,(i(this,Nn),i(this,kn,!1))),At.set(this,(i(this,Bn),i(this,Un,!1))),Et.set(this,(i(this,Wn),i(this,Gn,4))),St.set(this,(i(this,Hn),i(this,Xn,!1))),Mt.set(this,(i(this,Yn),i(this,Kn,!1))),It.set(this,(i(this,jn),i(this,qn,!1))),bt.set(this,(i(this,$n),i(this,el,!1))),yt.set(this,(i(this,tl),i(this,il,!1))),Ot.set(this,(i(this,rl),i(this,nl,null))),Ct.set(this,(i(this,ll),i(this,ul,!1))),Ft.set(this,(i(this,hl),i(this,_l,!1))),Lt.set(this,(i(this,fl),i(this,gl,!0))),Dt.set(this,(i(this,ml),i(this,dl,!0))),Pt.set(this,(i(this,xl),i(this,Al,!1))),Nt.set(this,(i(this,El),i(this,Ml,!1))),this._lightingInfos=(i(this,Il),new Gl(this.directIntensity,1,this.environmentIntensity,1)),this._radianceTexture=null,this._useSpecularWeightFromAlpha=!1,this._useSpecularWeightFromSpecularColorTexture=!1,this._useSpecularRoughnessAnisotropyFromTangentTexture=!1,this._useCoatRoughnessAnisotropyFromTangentTexture=!1,this._useCoatRoughnessFromGreenChannel=!1,this._useGltfStyleAnisotropy=!1,this._useFuzzRoughnessFromTextureAlpha=!1,this._useSubsurfaceWeightFromTextureAlpha=!1,this._useHorizonOcclusion=!0,this._useRadianceOcclusion=!0,this._useAlphaFromBaseColorTexture=!1,this._useAmbientOcclusionFromMetallicTextureRed=!1,this._useRoughnessFromMetallicTextureGreen=!1,this._useMetallicFromMetallicTextureBlue=!1,this._useThinFilmThicknessFromTextureGreen=!1,this._useGeometryThicknessFromGreenChannel=!1,this._lightFalloff=ne.LIGHTFALLOFF_PHYSICAL,this._useObjectSpaceNormalMap=!1,this._useParallax=!1,this._useParallaxOcclusion=!1,this._parallaxScaleBias=.05,this._disableLighting=!1,this._maxSimultaneousLights=4,this._invertNormalMapX=!1,this._invertNormalMapY=!1,this._twoSidedLighting=!1,this._alphaCutOff=.4,this._useAlphaFresnel=!1,this._useLinearAlphaFresnel=!1,this._environmentBRDFTexture=null,this._environmentFuzzBRDFTexture=null,this._backgroundRefractionTexture=null,this._refractionHighQualityBlur=!0,this._forceIrradianceInFragment=!1,this._realTimeFiltering=!1,this._realTimeFilteringQuality=8,this._fuzzSampleNumber=4,this._forceNormalForward=!1,this._enableSpecularAntiAliasing=!1,this._renderTargets=new eo(16),this._unlit=!1,this._applyDecalMapAfterDetailMap=!1,this._debugMode=0,this._shadersLoaded=!1,this._breakShaderLoadedCheck=!1,this._vertexPullingMetadata=null,vt.set(this,i(this,yl,0)),this.debugLimit=(i(this,Ol),-1),this.debugFactor=1,this._cacheHasRenderTargetTextures=!1,this._transparencyMode=ne.MATERIAL_OPAQUE,this.getScene()&&!this.getScene()?.getEngine().isWebGPU&&this.getScene().getEngine().webGLVersion<2&&De.Error("OpenPBRMaterial: WebGL 2.0 or above is required for this material."),r._noiseTextures[this.getScene().uniqueId]||(r._noiseTextures[this.getScene().uniqueId]=new Pe(to.GetAssetUrl("https://assets.babylonjs.com/core/blue_noise/blue_noise_rgb.png"),this.getScene(),!1,!0,1),this.getScene().onDisposeObservable.addOnce(()=>{r._noiseTextures[this.getScene().uniqueId]?.dispose(),delete r._noiseTextures[this.getScene().uniqueId]})),this._attachImageProcessingConfiguration(null),this.getRenderTargetTextures=()=>(this._renderTargets.reset(),ae.ReflectionTextureEnabled&&this._radianceTexture&&this._radianceTexture.isRenderTarget&&this._renderTargets.push(this._radianceTexture),ae.RefractionTextureEnabled&&this._backgroundRefractionTexture&&this._backgroundRefractionTexture.isRenderTarget&&this._renderTargets.push(this._backgroundRefractionTexture),this._eventInfo.renderTargets=this._renderTargets,this._callbackPluginEventFillRenderTargetTextures(this._eventInfo),this._renderTargets),this._environmentBRDFTexture=Wo(this.getScene()),this._environmentFuzzBRDFTexture=Nl(this.getScene()),this.prePassConfiguration=new Dl,this._propertyList={};for(const b of Object.getOwnPropertyNames(this)){const F=this[b];F instanceof L&&(this._propertyList[b]=F)}Object.keys(this._propertyList).forEach(b=>{const F=this._propertyList[b];let O=this._uniformsList[F.targetUniformName];O?O.numComponents!==F.targetUniformComponentNum?De.Error(`Uniform ${F.targetUniformName} already exists of size ${O.numComponents}, but trying to set it to ${F.targetUniformComponentNum}.`):O.requiredDefine!==F.requiredDefine&&(O.requiredDefine=void 0):(O=new Ne(F.targetUniformName,F.targetUniformComponentNum),O.requiredDefine=F.requiredDefine,this._uniformsList[F.targetUniformName]=O),O.firstLinkedKey===""&&(O.firstLinkedKey=F.name),O.linkedProperties[F.name]=F}),this._uniformsArray=Object.values(this._uniformsList),this._samplersList={};for(const b of Object.getOwnPropertyNames(this)){const F=this[b];F instanceof z&&(this._samplersList[b]=F)}for(const b in this._samplersList){const O=this._samplersList[b].textureDefine;this._samplerDefines[O]={type:"boolean",default:!1},this._samplerDefines[O+"DIRECTUV"]={type:"number",default:0},this._samplerDefines[O+"_GAMMA"]={type:"boolean",default:!1}}this._baseWeight,this._baseWeightTexture,this._baseColor,this._baseColorTexture,this._baseDiffuseRoughness,this._baseDiffuseRoughnessTexture,this._baseMetalness,this._baseMetalnessTexture,this._specularWeight,this._specularWeightTexture,this._specularColor,this._specularColorTexture,this._specularRoughness,this._specularIor,this._specularRoughnessTexture,this._specularRoughnessAnisotropy,this._specularRoughnessAnisotropyTexture,this._transmissionWeight,this._transmissionWeightTexture,this._transmissionColor,this._transmissionColorTexture,this._transmissionDepth,this._transmissionDepthTexture,this._transmissionScatter,this._transmissionScatterTexture,this._transmissionScatterAnisotropy,this._transmissionDispersionScale,this._transmissionDispersionScaleTexture,this._transmissionDispersionAbbeNumber,this._subsurfaceWeight,this._subsurfaceWeightTexture,this._subsurfaceColor,this._subsurfaceColorTexture,this._subsurfaceRadius,this._subsurfaceRadiusScale,this._subsurfaceRadiusScaleTexture,this._subsurfaceScatterAnisotropy,this._coatWeight,this._coatWeightTexture,this._coatColor,this._coatColorTexture,this._coatRoughness,this._coatRoughnessTexture,this._coatRoughnessAnisotropy,this._coatRoughnessAnisotropyTexture,this._coatIor,this._coatDarkening,this._coatDarkeningTexture,this._fuzzWeight,this._fuzzWeightTexture,this._fuzzColor,this._fuzzColorTexture,this._fuzzRoughness,this._fuzzRoughnessTexture,this._geometryThinWalled,this._geometryNormalTexture,this._geometryTangent,this._geometryTangentTexture,this._geometryCoatNormalTexture,this._geometryCoatTangent,this._geometryCoatTangentTexture,this._geometryOpacity,this._geometryOpacityTexture,this._geometryThickness,this._geometryThicknessTexture,this._thinFilmWeight,this._thinFilmWeightTexture,this._thinFilmThickness,this._thinFilmThicknessMin,this._thinFilmThicknessTexture,this._thinFilmIor,this._emissionLuminance,this._emissionColor,this._emissionColorTexture,this._ambientOcclusionTexture}get hasRenderTargetTextures(){return ae.ReflectionTextureEnabled&&this._radianceTexture&&this._radianceTexture.isRenderTarget||ae.RefractionTextureEnabled&&this._backgroundRefractionTexture&&this._backgroundRefractionTexture.isRenderTarget?!0:this._cacheHasRenderTargetTextures}get isPrePassCapable(){return!this.disableDepthWrite}getClassName(){return"OpenPBRMaterial"}get transparencyMode(){return this._transparencyMode}set transparencyMode(e){this._transparencyMode!==e&&(this._transparencyMode=e,this._markAllSubMeshesAsTexturesAndMiscDirty())}_shouldUseAlphaFromBaseColorTexture(){return this._hasAlphaChannel()&&this._transparencyMode!==ne.MATERIAL_OPAQUE&&!this.geometryOpacityTexture}_hasAlphaChannel(){return this.baseColorTexture!=null&&this.baseColorTexture.hasAlpha&&this._useAlphaFromBaseColorTexture||this.geometryOpacityTexture!=null}needAlphaBlending(){return this.geometryOpacity<1||this.geometryOpacityTexture!=null}needAlphaBlendingForMesh(e){return this.geometryOpacity<1||this.geometryOpacityTexture!=null||super.needAlphaBlendingForMesh(e)}clone(e,t=!0,a=""){const C=Pl.Clone(()=>new r(e,this.getScene()),this,{cloneTexturesOnlyOnce:t});return C.id=e,C.name=e,this.stencil.copyTo(C.stencil),this._clonePlugins(C,a),C}serialize(){const e=super.serialize();return e.customType="BABYLON.OpenPBRMaterial",e}static Parse(e,t,a){const C=Pl.Parse(()=>new r(e.name,t),e,t,a);return e.stencil&&C.stencil.parse(e.stencil,t,a),ne._ParsePlugins(e,C,t,a),C}forceCompilation(e,t,a){const C={clipPlane:!1,useInstances:!1,...a};this._uniformBufferLayoutBuilt||this.buildUniformLayout(),this._callbackPluginEventGeneric(4,this._eventInfo),(()=>{if(this._breakShaderLoadedCheck)return;const F=new Bl({...this._eventInfo.defineNames||{},...this._samplerDefines||{}}),O=this._prepareEffect(e,e,F,void 0,void 0,C.useInstances,C.clipPlane);this._onEffectCreatedObservable&&(Le.effect=O,Le.subMesh=null,this._onEffectCreatedObservable.notifyObservers(Le)),O.isReady()?t&&t(this):O.onCompileObservable.add(()=>{t&&t(this)})})()}isReadyForSubMesh(e,t,a){this._uniformBufferLayoutBuilt||this.buildUniformLayout();const C=t._drawWrapper;if(C.effect&&this.isFrozen&&C._wasPreviouslyReady&&C._wasPreviouslyUsingInstances===a)return!0;t.materialDefines||(this._callbackPluginEventGeneric(4,this._eventInfo),t.materialDefines=new Bl({...this._eventInfo.defineNames||{},...this._samplerDefines||{}}));const b=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const F=this.getScene(),O=F.getEngine();if(b._areTexturesDirty&&(this._eventInfo.hasRenderTargetTextures=!1,this._callbackPluginEventHasRenderTargetTextures(this._eventInfo),this._cacheHasRenderTargetTextures=this._eventInfo.hasRenderTargetTextures,F.texturesEnabled)){for(const re in this._samplersList){const H=this._samplersList[re];if(H.value&&!H.value.isReadyOrNotBlocking())return!1}const S=this._getRadianceTexture();if(S&&ae.ReflectionTextureEnabled){if(!S.isReadyOrNotBlocking())return!1;if(S.irradianceTexture){if(!S.irradianceTexture.isReadyOrNotBlocking())return!1}else if(!S.sphericalPolynomial&&S.getInternalTexture()?._sphericalPolynomialPromise)return!1}if(this._environmentBRDFTexture&&ae.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady()||this._environmentFuzzBRDFTexture&&ae.ReflectionTextureEnabled&&!this._environmentFuzzBRDFTexture.isReady()||this._backgroundRefractionTexture&&ae.RefractionTextureEnabled&&!this._backgroundRefractionTexture.isReadyOrNotBlocking()||r._noiseTextures[F.uniqueId]&&!r._noiseTextures[F.uniqueId].isReady()||this._sssIrradianceTexture&&this._sssDepthTexture&&(!this._sssIrradianceTexture.isReady()||!this._sssDepthTexture.isReady()))return!1}if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=b,this._eventInfo.subMesh=t,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh||b._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;if(b.AREALIGHTUSED){for(let S=0;S<e.lightSources.length;S++)if(!e.lightSources[S]._isReady())return!1}if(!O.getCaps().standardDerivatives&&!e.isVerticesDataPresent($.NormalKind)&&(e.createNormals(!0),De.Warn("OpenPBRMaterial: Normals have been created for the mesh: "+e.name)),!so(F,e,this._maxSimultaneousLights,this._disableLighting))return!1;const ge=t.effect,de=b._areLightsDisposed,w=this._prepareEffect(e,t.getRenderingMesh(),b,this.onCompiled,this.onError,a,null);let B=!1;if(w)if(this._onEffectCreatedObservable&&(Le.effect=w,Le.subMesh=t,this._onEffectCreatedObservable.notifyObservers(Le)),this.allowShaderHotSwapping&&ge&&!w.isReady()){if(b.markAsUnprocessed(),B=this.isFrozen,de)return b._areLightsDisposed=!0,!1}else F.resetCachedMaterial(),t.setEffect(w,b,this._materialContext);return!t.effect||!t.effect.isReady()?!1:(b._renderId=F.getRenderId(),C._wasPreviouslyReady=!B,C._wasPreviouslyUsingInstances=!!a,this._checkScenePerformancePriority(),!0)}buildUniformLayout(){const e=this._uniformBuffer;e.addUniform("vTangentSpaceParams",2),e.addUniform("vLightingIntensity",4),e.addUniform("pointSize",1),e.addUniform("vDebugMode",2),e.addUniform("renderTargetSize",2),e.addUniform("cameraInfo",4),e.addUniform("vTextureRepetitionHexTilingParams",4),e.addUniform("backgroundRefractionMatrix",16),e.addUniform("vBackgroundRefractionInfos",3),io(e,!0,!0,!0,!0,!0),Object.values(this._uniformsList).forEach(t=>{e.addUniform(t.name,t.numComponents)}),Object.values(this._samplersList).forEach(t=>{e.addUniform(t.samplerInfoName,2),e.addUniform(t.samplerMatrixName,16)}),super.buildUniformLayout()}bindPropertiesForSubMesh(e,t,a,C){if(this.geometryThickness===0)e.updateFloat("vGeometryThickness",0);else{C.getRenderingMesh().getWorldMatrix().decompose(pe.Vector3[0]);const b=Math.max(Math.abs(pe.Vector3[0].x),Math.abs(pe.Vector3[0].y),Math.abs(pe.Vector3[0].z));e.updateFloat("vGeometryThickness",this.geometryThickness*b)}}bindForSubMesh(e,t,a){const C=this.getScene(),b=a.materialDefines;if(!b)return;const F=a.effect;if(!F)return;this._activeEffect=F,t.getMeshUniformBuffer().bindToEffect(F,"Mesh"),t.transferToEffect(e);const O=C.getEngine();this._uniformBuffer.bindToEffect(F,"Material"),this.prePassConfiguration.bindForSubMesh(this._activeEffect,C,t,e,this.isFrozen),Ut.Bind(O.currentRenderPassId,this._activeEffect,t,e,this);const ge=C.activeCamera;ge?this._uniformBuffer.updateFloat4("cameraInfo",ge.minZ,ge.maxZ,0,0):this._uniformBuffer.updateFloat4("cameraInfo",0,0,0,0);const de=this.textureRepetitionHexTilingParams;this._uniformBuffer.updateFloat4("vTextureRepetitionHexTilingParams",de[0],de[1],de[2],de[3]),this._eventInfo.subMesh=a,this._callbackPluginEventHardBindForSubMesh(this._eventInfo),b.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));const w=this._mustRebind(C,F,a,t.visibility),B=O._features.needToAlwaysBindUniformBuffers;ro(t,this._activeEffect,this.prePassConfiguration),this._vertexPullingMetadata&&ao(this._activeEffect,this._vertexPullingMetadata);const S=this._uniformBuffer;if(w){this.bindViewProjection(F);const re=this._getRadianceTexture();if(!S.useUbo||!this.isFrozen||!S.isSync||a._drawWrapper._forceRebindOnNextCall){if(C.texturesEnabled){for(const K in this._samplersList){const me=this._samplersList[K];me.value&&(S.updateFloat2(me.samplerInfoName,me.value.coordinatesIndex,me.value.level),no(me.value,S,me.samplerPrefix))}(this.geometryNormalTexture||this.geometryCoatNormalTexture)&&(C._mirroredCameraPosition?S.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):S.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),lo(C,b,S,Re.White(),re,this.realTimeFiltering,!0,!0,!0,!0,!0)}this.pointsCloud&&S.updateFloat("pointSize",this.pointSize);const H=this._uniformsArray;for(let K=0,me=H.length;K<me;K++){const ee=H[K];ee.requiredDefine!==void 0&&!b[ee.requiredDefine]||(ee.numComponents===4?(ee.populateVectorFromLinkedProperties(pe.Vector4[0]),S.updateVector4(ee.name,pe.Vector4[0])):ee.numComponents===3?(ee.populateVectorFromLinkedProperties(pe.Vector3[0]),S.updateVector3(ee.name,pe.Vector3[0])):ee.numComponents===2?(ee.populateVectorFromLinkedProperties(pe.Vector2[0]),S.updateFloat2(ee.name,pe.Vector2[0].x,pe.Vector2[0].y)):ee.numComponents===1&&S.updateFloat(ee.name,ee.linkedProperties[ee.firstLinkedKey].value))}this._lightingInfos.x=this.directIntensity,this._lightingInfos.y=this.emissionLuminance,this._lightingInfos.z=this.environmentIntensity*C.environmentIntensity,this._lightingInfos.w=1,S.updateVector4("vLightingIntensity",this._lightingInfos),S.updateFloat2("vDebugMode",this.debugLimit,this.debugFactor)}if(C.texturesEnabled){for(const H in this._samplersList){const K=this._samplersList[H];K.value&&S.setTexture(K.samplerName,K.value)}if(oo(C,b,S,re,this.realTimeFiltering),b.ENVIRONMENTBRDF&&S.setTexture("environmentBrdfSampler",this._environmentBRDFTexture),b.FUZZENVIRONMENTBRDF&&S.setTexture("environmentFuzzBrdfSampler",this._environmentFuzzBRDFTexture),b.REFRACTED_BACKGROUND&&(S.setTexture("backgroundRefractionSampler",this._backgroundRefractionTexture),S.updateMatrix("backgroundRefractionMatrix",this._backgroundRefractionTexture.getReflectionTextureMatrix()),pe.Vector3[1].set(Math.log2(this._backgroundRefractionTexture.getSize().width),0,0),S.updateVector3("vBackgroundRefractionInfos",pe.Vector3[1])),(b.ANISOTROPIC||b.FUZZ||b.REFRACTED_BACKGROUND||b.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING)&&S.setTexture("blueNoiseSampler",r._noiseTextures[this.getScene().uniqueId]),b.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING&&this.sssIrradianceTexture&&this.sssDepthTexture){const H=this.sssIrradianceTexture.getSize().width,K=this.sssIrradianceTexture.getSize().height;S.setTexture("sceneIrradianceSampler",this.sssIrradianceTexture),S.setTexture("sceneDepthSampler",this.sssDepthTexture),S.updateFloat2("renderTargetSize",H,K)}}this.getScene().useOrderIndependentTransparency&&this.needAlphaBlendingForMesh(t)&&this.getScene().depthPeelingRenderer.bind(F),this._eventInfo.subMesh=a,this._callbackPluginEventBindForSubMesh(this._eventInfo),Wl(this._activeEffect,this,C),this.bindEyePosition(F)}else B&&(this._needToBindSceneUbo=!0);this.bindPropertiesForSubMesh(this._uniformBuffer,C,C.getEngine(),a),(w||!this.isFrozen||B)&&C.lightsEnabled&&!this._disableLighting&&uo(C,t,this._activeEffect,b,this._maxSimultaneousLights),(w||!this.isFrozen)&&(this.bindView(F),ho(C,t,this._activeEffect,!0),b.NUM_MORPH_INFLUENCERS&&wl(t,this._activeEffect),b.BAKED_VERTEX_ANIMATION_TEXTURE&&t.bakedVertexAnimationManager?.bind(F,b.INSTANCES),this._imageProcessingConfiguration.bind(this._activeEffect),co(b,this._activeEffect,C)),this._afterBind(t,this._activeEffect,a),S.update()}getAnimatables(){const e=super.getAnimatables();for(const t in this._samplersList){const a=this._samplersList[t];a.value&&a.value.animations&&a.value.animations.length>0&&e.push(a.value)}return this._radianceTexture&&this._radianceTexture.animations&&this._radianceTexture.animations.length>0&&e.push(this._radianceTexture),e}getActiveTextures(){const e=super.getActiveTextures();for(const t in this._samplersList){const a=this._samplersList[t];a.value&&e.push(a.value)}return this._radianceTexture&&e.push(this._radianceTexture),e}hasTexture(e){if(super.hasTexture(e))return!0;for(const t in this._samplersList)if(this._samplersList[t].value===e)return!0;return this._radianceTexture===e}setPrePassRenderer(){return!1}dispose(e,t){if(this._breakShaderLoadedCheck=!0,t){this._environmentBRDFTexture&&this.getScene().openPBREnvironmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),this._environmentFuzzBRDFTexture&&this.getScene().environmentFuzzBRDFTexture!==this._environmentFuzzBRDFTexture&&this._environmentFuzzBRDFTexture.dispose(),this._backgroundRefractionTexture=null;for(const a in this._samplersList)this._samplersList[a].value?.dispose();this._radianceTexture?.dispose()}this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),super.dispose(e,t)}_getRadianceTexture(){return this._radianceTexture?this._radianceTexture:this.getScene().environmentTexture}_prepareEffect(e,t,a,C=null,b=null,F=null,O=null){if(this._prepareDefines(e,t,a,F,O),!a.isDirty)return null;a.markAsProcessed();const de=this.getScene().getEngine(),w=new _o;let B=0;a.USESPHERICALINVERTEX&&w.addFallback(B++,"USESPHERICALINVERTEX"),a.FOG&&w.addFallback(B,"FOG"),a.SPECULARAA&&w.addFallback(B,"SPECULARAA"),a.POINTSIZE&&w.addFallback(B,"POINTSIZE"),a.LOGARITHMICDEPTH&&w.addFallback(B,"LOGARITHMICDEPTH"),a.PARALLAX&&w.addFallback(B,"PARALLAX"),a.PARALLAX_RHS&&w.addFallback(B,"PARALLAX_RHS"),a.PARALLAXOCCLUSION&&w.addFallback(B++,"PARALLAXOCCLUSION"),a.ENVIRONMENTBRDF&&w.addFallback(B++,"ENVIRONMENTBRDF"),a.TANGENT&&w.addFallback(B++,"TANGENT"),B=fo(a,w,this._maxSimultaneousLights,B),a.SPECULARTERM&&w.addFallback(B++,"SPECULARTERM"),a.USESPHERICALFROMREFLECTIONMAP&&w.addFallback(B++,"USESPHERICALFROMREFLECTIONMAP"),a.USEIRRADIANCEMAP&&w.addFallback(B++,"USEIRRADIANCEMAP"),a.NORMAL&&w.addFallback(B++,"NORMAL"),a.VERTEXCOLOR&&w.addFallback(B++,"VERTEXCOLOR"),a.MORPHTARGETS&&w.addFallback(B++,"MORPHTARGETS"),a.MULTIVIEW&&w.addFallback(0,"MULTIVIEW");const S=[$.PositionKind];a.NORMAL&&S.push($.NormalKind),a.TANGENT&&S.push($.TangentKind);for(let xe=1;xe<=6;++xe)a["UV"+xe]&&S.push(`uv${xe===1?"":xe}`);a.VERTEXCOLOR&&S.push($.ColorKind),To(S,e,a,w),go(S,a),mo(S,e,a),po(S,e,a);let re="openpbr";const H=["world","view","viewProjection","projection","vEyePosition","inverseProjection","renderTargetSize","vLightsType","visibility","vFogInfos","vFogColor","pointSize","mBones","normalMatrix","vLightingIntensity","logarithmicDepthConstant","vTangentSpaceParams","boneTextureInfo","vDebugMode","morphTargetTextureInfo","morphTargetTextureIndices","cameraInfo","vTextureRepetitionHexTilingParams","backgroundRefractionMatrix","vBackgroundRefractionInfos"];for(const xe in this._uniformsList)H.push(xe);const K=["environmentBrdfSampler","boneSampler","morphTargets","oitDepthSampler","oitFrontColorSampler","areaLightsLTC1Sampler","areaLightsLTC2Sampler"];a.FUZZENVIRONMENTBRDF&&K.push("environmentFuzzBrdfSampler"),a.REFRACTED_BACKGROUND&&K.push("backgroundRefractionSampler"),(a.ANISOTROPIC||a.FUZZ||a.REFRACTED_BACKGROUND||a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING)&&K.push("blueNoiseSampler"),a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING&&(K.push("sceneIrradianceSampler"),K.push("sceneDepthSampler"));for(const xe in this._samplersList){const Bt=this._samplersList[xe];K.push(Bt.samplerName),H.push(Bt.samplerInfoName),H.push(Bt.samplerMatrixName)}xo(H,K,!0);const me=["Material","Scene","Mesh"],ee={maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:a.NUM_MORPH_INFLUENCERS};if(this._eventInfo.fallbacks=w,this._eventInfo.fallbackRank=B,this._eventInfo.defines=a,this._eventInfo.uniforms=H,this._eventInfo.attributes=S,this._eventInfo.samplers=K,this._eventInfo.uniformBuffersNames=me,this._eventInfo.customCode=void 0,this._eventInfo.mesh=e,this._eventInfo.indexParameters=ee,this._callbackPluginEventGeneric(128,this._eventInfo),Ut.AddUniformsAndSamplers(H,K),Dl.AddUniforms(H),Ro(H),this._useVertexPulling){const xe=t?.geometry;xe&&(this._vertexPullingMetadata=Ao(xe),this._vertexPullingMetadata&&this._vertexPullingMetadata.forEach((Bt,Yl)=>{H.push(`vp_${Yl}_info`)}))}else this._vertexPullingMetadata=null;Wt&&(Wt.PrepareUniforms(H,a),Wt.PrepareSamplers(K,a)),Eo({uniformsNames:H,uniformBuffersNames:me,samplers:K,defines:a,maxSimultaneousLights:this._maxSimultaneousLights,shaderLanguage:this._shaderLanguage});const Fl={};this.customShaderNameResolve&&(re=this.customShaderNameResolve(re,H,me,K,a,S,Fl));const Vl=a.toString(),Xl=de.createEffect(re,{attributes:S,uniformsNames:H,uniformBuffersNames:me,samplers:K,defines:Vl,fallbacks:w,onCompiled:C,onError:b,indexParameters:ee,processFinalCode:Fl.processFinalCode,processCodeAfterIncludes:this._eventInfo.customCode,multiTarget:a.PREPASS,shaderLanguage:this._shaderLanguage,extraInitializationsAsync:this._shadersLoaded?void 0:async()=>{this.shaderLanguage===1?await Promise.all([be(()=>import("./openpbr.vertex-BpB-7aXl.js"),__vite__mapDeps([19,1,2,4,20,21,22,23,12,14,3,6,5,24,25]),import.meta.url),be(()=>import("./openpbr.fragment-BAOdoy3Z.js"),__vite__mapDeps([26,1,2,27,4,20,21,23,28,11,13,9,25,29,12,6,14,15]),import.meta.url)]):await Promise.all([be(()=>import("./openpbr.vertex-D-IjPutK.js"),__vite__mapDeps([30,1,2,31]),import.meta.url),be(()=>import("./openpbr.fragment-BmgNfxS4.js"),__vite__mapDeps([32,1,2,18,31]),import.meta.url)]),this._shadersLoaded=!0}},de);return this._eventInfo.customCode=void 0,Xl}_prepareDefines(e,t,a,C=null,b=null){const F=t.hasThinInstances,O=this.getScene(),ge=O.getEngine();So(O,e,a,!0,this._maxSimultaneousLights,this._disableLighting),a._needNormals=!0,Mo(O,a);const de=this.needAlphaBlendingForMesh(e)&&this.getScene().useOrderIndependentTransparency;if(Io(O,a,this.canRenderToMRT&&!de),bo(O,a,de),Ut.PrepareDefines(ge.currentRenderPassId,e,a),a._areTexturesDirty){a._needUVs=!1;for(let B=1;B<=6;++B)a["MAINUV"+B]=!1;if(O.texturesEnabled){for(const re in this._samplersList){const H=this._samplersList[re];H.value?(yo(H.value,a,H.textureDefine),a[H.textureDefine+"_GAMMA"]=H.value.gammaSpace):a[H.textureDefine]=!1}const B=this._getRadianceTexture(),S=this._forceIrradianceInFragment||this.realTimeFiltering||this._twoSidedLighting||ge.getCaps().maxVaryingVectors<=8||this._baseDiffuseRoughnessTexture!=null;if(Ul(O,B,a,this.realTimeFiltering,this.realTimeFilteringQuality,!S),this._baseMetalnessTexture&&(a.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed),a.SPECULAR_WEIGHT_IN_ALPHA=this._useSpecularWeightFromAlpha,a.SPECULAR_WEIGHT_FROM_SPECULAR_COLOR_TEXTURE=this._useSpecularWeightFromSpecularColorTexture,a.SPECULAR_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=this._useSpecularRoughnessAnisotropyFromTangentTexture,a.COAT_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=this._useCoatRoughnessAnisotropyFromTangentTexture,a.COAT_ROUGHNESS_FROM_GREEN_CHANNEL=this._useCoatRoughnessFromGreenChannel,a.SPECULAR_ROUGHNESS_FROM_METALNESS_TEXTURE_GREEN=this._useRoughnessFromMetallicTextureGreen,a.FUZZ_ROUGHNESS_FROM_TEXTURE_ALPHA=this._useFuzzRoughnessFromTextureAlpha,a.SUBSURFACE_WEIGHT_FROM_TEXTURE_ALPHA=this._useSubsurfaceWeightFromTextureAlpha,a.BASE_METALNESS_FROM_METALNESS_TEXTURE_BLUE=this._useMetallicFromMetallicTextureBlue,a.THIN_FILM_THICKNESS_FROM_THIN_FILM_TEXTURE=this._useThinFilmThicknessFromTextureGreen,a.GEOMETRY_THICKNESS_FROM_GREEN_CHANNEL=this._useGeometryThicknessFromGreenChannel,this.geometryNormalTexture?(this._useParallax&&this.baseColorTexture&&ae.DiffuseTextureEnabled?(a.PARALLAX=!0,a.PARALLAX_RHS=O.useRightHandedSystem,a.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):a.PARALLAX=!1,a.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):(a.PARALLAX=!1,a.PARALLAX_RHS=!1,a.PARALLAXOCCLUSION=!1,a.OBJECTSPACE_NORMALMAP=!1),this._environmentBRDFTexture&&ae.ReflectionTextureEnabled?(a.ENVIRONMENTBRDF=!0,a.ENVIRONMENTBRDF_RGBD=this._environmentBRDFTexture.isRGBD):(a.ENVIRONMENTBRDF=!1,a.ENVIRONMENTBRDF_RGBD=!1),this._environmentFuzzBRDFTexture?a.FUZZENVIRONMENTBRDF=!0:a.FUZZENVIRONMENTBRDF=!1,this.hasTransparency){a.REFRACTED_BACKGROUND=!!this._backgroundRefractionTexture&&ae.RefractionTextureEnabled,a.REFRACTION_HIGH_QUALITY_BLUR=this._refractionHighQualityBlur,a.REFRACTED_LIGHTS=!0;const re=this._getRadianceTexture();re?(a.REFRACTED_ENVIRONMENT=ae.RefractionTextureEnabled,a.REFRACTED_ENVIRONMENT_OPPOSITEZ=this.getScene().useRightHandedSystem?!re.invertZ:re.invertZ,a.REFRACTED_ENVIRONMENT_LOCAL_CUBE=re.isCube&&re.boundingBoxSize):a.REFRACTED_ENVIRONMENT=!1}else a.REFRACTED_BACKGROUND=!1,a.REFRACTED_LIGHTS=!1,a.REFRACTED_ENVIRONMENT=!1;this._shouldUseAlphaFromBaseColorTexture()?a.ALPHA_FROM_BASE_COLOR_TEXTURE=!0:a.ALPHA_FROM_BASE_COLOR_TEXTURE=!1}this._lightFalloff===ne.LIGHTFALLOFF_STANDARD?(a.USEPHYSICALLIGHTFALLOFF=!1,a.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===ne.LIGHTFALLOFF_GLTF?(a.USEPHYSICALLIGHTFALLOFF=!1,a.USEGLTFLIGHTFALLOFF=!0):(a.USEPHYSICALLIGHTFALLOFF=!0,a.USEGLTFLIGHTFALLOFF=!1),!this.backFaceCulling&&this._twoSidedLighting?a.TWOSIDEDLIGHTING=!0:a.TWOSIDEDLIGHTING=!1,a.MIRRORED=!!O._mirroredCameraPosition,a.SPECULARAA=ge.getCaps().standardDerivatives&&this._enableSpecularAntiAliasing}(a._areTexturesDirty||a._areMiscDirty)&&(a.ALPHATESTVALUE=`${this._alphaCutOff}${this._alphaCutOff%1===0?".":""}`,a.PREMULTIPLYALPHA=this.alphaMode===7||this.alphaMode===8,a.ALPHABLEND=this.needAlphaBlendingForMesh(e)),a._areTexturesDirty&&(a.TEXTURE_REPETITION_MODE=ge.version>1||ge.isWebGPU?this.textureRepetitionMode:0),a._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(a),a.FORCENORMALFORWARD=this._forceNormalForward,a.RADIANCEOCCLUSION=this._useRadianceOcclusion,a.HORIZONOCCLUSION=this._useHorizonOcclusion,(this.specularRoughnessAnisotropy>0||this.coatRoughnessAnisotropy>0)&&r._noiseTextures[O.uniqueId]&&ae.ReflectionTextureEnabled?(a.ANISOTROPIC=!0,e.isVerticesDataPresent($.TangentKind)||(a._needUVs=!0,a.MAINUV1=!0),this._useGltfStyleAnisotropy&&(a.USE_GLTF_STYLE_ANISOTROPY=!0),a.ANISOTROPIC_BASE=this.specularRoughnessAnisotropy>0,a.ANISOTROPIC_COAT=this.coatRoughnessAnisotropy>0):(a.ANISOTROPIC=!1,a.USE_GLTF_STYLE_ANISOTROPY=!1,a.ANISOTROPIC_BASE=!1,a.ANISOTROPIC_COAT=!1),a.THIN_FILM=this.thinFilmWeight>0,a.IRIDESCENCE=this.thinFilmWeight>0,a.DISPERSION=this.transmissionDispersionScale>0,a.SCATTERING=this.hasScattering;const w=[8,16,32];if(a.SSS_SAMPLE_COUNT=w[this._sssQuality]??16,a.TRANSMISSION_SLAB=this.transmissionWeight>0,a.TRANSMISSION_SLAB_VOLUME=this.transmissionWeight>0&&this.transmissionDepth>0,a.SUBSURFACE_SLAB=this.subsurfaceWeight>0,!a.PREPASS&&(a.SUBSURFACE_SLAB||a.TRANSMISSION_SLAB_VOLUME)){let B=!1;if(!this.sssIrradianceTexture&&O.geometryBufferRenderer){const S=O.geometryBufferRenderer.getTextureIndex(D.IRRADIANCE_TEXTURE_TYPE);this.sssIrradianceTexture=O.geometryBufferRenderer.getGBuffer().textures[S],B=!0}if(!this.sssDepthTexture&&O.geometryBufferRenderer){const S=O.geometryBufferRenderer.getTextureIndex(D.SCREENSPACE_DEPTH_TEXTURE_TYPE);this.sssDepthTexture=O.geometryBufferRenderer.getGBuffer().textures[S],B=!0}this.sssIrradianceTexture&&this.sssDepthTexture&&(a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING=!0,B&&(a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING_GBUFFER=!0))}a.FUZZ=this.fuzzWeight>0&&ae.ReflectionTextureEnabled,a.GEOMETRY_THIN_WALLED=this.geometryThinWalled!=0,a.FUZZ?(e.isVerticesDataPresent($.TangentKind)||(a._needUVs=!0,a.MAINUV1=!0),this._environmentFuzzBRDFTexture=Nl(this.getScene()),a.FUZZ_IBL_SAMPLES=this.fuzzSampleNumber):(this._environmentFuzzBRDFTexture=null,a.FUZZENVIRONMENTBRDF=!1,a.FUZZ_IBL_SAMPLES=0),a._areMiscDirty&&(Oo(e,O,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this.needAlphaTestingForMesh(e),a,this._applyDecalMapAfterDetailMap,this._useVertexPulling,t,this._isVertexOutputInvariant),a.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!e.isVerticesDataPresent($.NormalKind),a.DEBUGMODE=this._debugMode),Co(O,ge,this,a,!!C,b,F),this._eventInfo.defines=a,this._eventInfo.mesh=e,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),Fo(e,a,!0,!0,!0,this._transparencyMode!==ne.MATERIAL_OPAQUE),this._callbackPluginEventPrepareDefines(this._eventInfo)}},s=new WeakMap,o=new WeakMap,l=new WeakMap,n=new WeakMap,m=new WeakMap,d=new WeakMap,I=new WeakMap,k=new WeakMap,U=new WeakMap,M=new WeakMap,N=new WeakMap,J=new WeakMap,se=new WeakMap,_e=new WeakMap,te=new WeakMap,v=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap,G=new WeakMap,y=new WeakMap,T=new WeakMap,le=new WeakMap,ie=new WeakMap,V=new WeakMap,g=new WeakMap,f=new WeakMap,fe=new WeakMap,oe=new WeakMap,R=new WeakMap,ue=new WeakMap,E=new WeakMap,Q=new WeakMap,P=new WeakMap,he=new WeakMap,q=new WeakMap,Te=new WeakMap,ce=new WeakMap,j=new WeakMap,ye=new WeakMap,Oe=new WeakMap,Ce=new WeakMap,Fe=new WeakMap,Z=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Me=new WeakMap,Ie=new WeakMap,ke=new WeakMap,Be=new WeakMap,ze=new WeakMap,Ue=new WeakMap,We=new WeakMap,we=new WeakMap,Ge=new WeakMap,He=new WeakMap,Ve=new WeakMap,Xe=new WeakMap,Ye=new WeakMap,Ze=new WeakMap,Ke=new WeakMap,je=new WeakMap,Qe=new WeakMap,qe=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,st=new WeakMap,it=new WeakMap,rt=new WeakMap,at=new WeakMap,nt=new WeakMap,lt=new WeakMap,ot=new WeakMap,ut=new WeakMap,ht=new WeakMap,ct=new WeakMap,_t=new WeakMap,ft=new WeakMap,Tt=new WeakMap,gt=new WeakMap,mt=new WeakMap,pt=new WeakMap,dt=new WeakMap,xt=new WeakMap,Rt=new WeakMap,At=new WeakMap,Et=new WeakMap,St=new WeakMap,Mt=new WeakMap,It=new WeakMap,bt=new WeakMap,yt=new WeakMap,Ot=new WeakMap,Ct=new WeakMap,Ft=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Nt=new WeakMap,vt=new WeakMap,(()=>{const u=typeof Symbol=="function"&&Symbol.metadata?Object.create(Ht[Symbol.metadata]??null):void 0;Vt=[p("_markAllSubMeshesAsTexturesDirty")],Zt=[p("_markAllSubMeshesAsTexturesDirty")],Qt=[p("_markAllSubMeshesAsTexturesDirty")],Jt=[p("_markAllSubMeshesAsTexturesDirty")],ss=[p("_markAllSubMeshesAsTexturesDirty")],as=[p("_markAllSubMeshesAsTexturesDirty")],os=[p("_markAllSubMeshesAsTexturesDirty")],cs=[p("_markAllSubMeshesAsTexturesDirty")],Ts=[p("_markAllSubMeshesAsTexturesDirty")],ps=[p("_markAllSubMeshesAsTexturesDirty")],Rs=[p("_markAllSubMeshesAsTexturesDirty")],Ss=[p("_markAllSubMeshesAsTexturesDirty")],bs=[p("_markAllSubMeshesAsTexturesDirty")],Cs=[p("_markAllSubMeshesAsTexturesDirty")],Ds=[p("_markAllSubMeshesAsTexturesDirty")],vs=[p("_markAllSubMeshesAsTexturesDirty")],zs=[p("_markAllSubMeshesAsTexturesDirty")],ws=[p("_markAllSubMeshesAsTexturesDirty")],Vs=[p("_markAllSubMeshesAsTexturesDirty")],Zs=[p("_markAllSubMeshesAsTexturesDirty")],Qs=[p("_markAllSubMeshesAsTexturesDirty")],Js=[p("_markAllSubMeshesAsTexturesDirty")],si=[p("_markAllSubMeshesAsTexturesDirty")],ai=[p("_markAllSubMeshesAsTexturesDirty")],oi=[p("_markAllSubMeshesAsTexturesDirty")],ci=[p("_markAllSubMeshesAsTexturesDirty")],Ti=[p("_markAllSubMeshesAsTexturesDirty")],pi=[p("_markAllSubMeshesAsTexturesDirty")],Ri=[p("_markAllSubMeshesAsTexturesDirty")],Si=[p("_markAllSubMeshesAsTexturesDirty")],bi=[p("_markAllSubMeshesAsTexturesDirty")],Ci=[p("_markAllSubMeshesAsTexturesDirty")],Di=[p("_markAllSubMeshesAsTexturesDirty")],vi=[p("_markAllSubMeshesAsTexturesDirty")],zi=[p("_markAllSubMeshesAsTexturesDirty")],wi=[p("_markAllSubMeshesAsTexturesDirty")],Vi=[p("_markAllSubMeshesAsTexturesDirty")],Zi=[p("_markAllSubMeshesAsTexturesDirty")],Qi=[p("_markAllSubMeshesAsTexturesDirty")],Ji=[p("_markAllSubMeshesAsTexturesDirty")],sr=[p("_markAllSubMeshesAsTexturesDirty")],ar=[p("_markAllSubMeshesAsTexturesDirty")],or=[p("_markAllSubMeshesAsTexturesDirty")],cr=[p("_markAllSubMeshesAsTexturesDirty")],Tr=[p("_markAllSubMeshesAsTexturesDirty")],pr=[p("_markAllSubMeshesAsTexturesDirty")],Rr=[p("_markAllSubMeshesAsTexturesDirty")],Sr=[p("_markAllSubMeshesAsTexturesDirty")],br=[p("_markAllSubMeshesAsTexturesDirty")],Cr=[p("_markAllSubMeshesAsTexturesDirty")],Dr=[p("_markAllSubMeshesAsTexturesDirty")],vr=[p("_markAllSubMeshesAsTexturesDirty")],zr=[p("_markAllSubMeshesAsTexturesDirty")],wr=[p("_markAllSubMeshesAsTexturesDirty")],Vr=[p("_markAllSubMeshesAsTexturesDirty")],Zr=[p("_markAllSubMeshesAsTexturesDirty")],Qr=[p("_markAllSubMeshesAsTexturesDirty")],Jr=[p("_markAllSubMeshesAsTexturesDirty")],sa=[p("_markAllSubMeshesAsTexturesDirty")],aa=[p("_markAllSubMeshesAsTexturesDirty")],oa=[p("_markAllSubMeshesAsTexturesDirty")],ca=[p("_markAllSubMeshesAsTexturesDirty")],Ta=[p("_markAllSubMeshesAsTexturesDirty")],pa=[p("_markAllSubMeshesAsTexturesDirty")],Ra=[p("_markAllSubMeshesAsTexturesDirty")],Sa=[p("_markAllSubMeshesAsTexturesDirty")],ba=[p("_markAllSubMeshesAsTexturesDirty")],Ca=[p("_markAllSubMeshesAsTexturesDirty")],Da=[p("_markAllSubMeshesAsTexturesDirty")],va=[p("_markAllSubMeshesAsTexturesDirty")],za=[p("_markAllSubMeshesAsTexturesDirty")],wa=[p("_markAllSubMeshesAsTexturesDirty")],Va=[p("_markAllSubMeshesAsTexturesDirty")],Za=[p("_markAllSubMeshesAsTexturesDirty")],Qa=[p("_markAllSubMeshesAsTexturesDirty")],Ja=[X(),Y("_markAllSubMeshesAsTexturesDirty")],sn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],nn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],un=[X(),Y("_markAllSubMeshesAsTexturesAndMiscDirty")],_n=[X(),Y("_markAllSubMeshesAsTexturesAndMiscDirty")],gn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],dn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],An=[X()],En=[X()],Sn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],bn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Cn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Dn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],vn=[X(),Y("_markAllSubMeshesAsLightsDirty")],zn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],wn=[X(),Y("_markAllSubMeshesAsLightsDirty")],Vn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Zn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Qn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Jn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],sl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],al=[Y("_markAllSubMeshesAsTexturesDirty")],ol=[X(),Y("_markAllSubMeshesAsTexturesDirty")],cl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Tl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],pl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Rl=[X(),Y("_markAllSubMeshesAsMiscDirty")],Sl=[X(),Y("_markAllSubMeshesAsMiscDirty")],bl=[Y("_markAllSubMeshesAsMiscDirty")],Cl=[X()],h(r,null,Vt,{kind:"accessor",name:"baseWeight",static:!1,private:!1,access:{has:e=>"baseWeight"in e,get:e=>e.baseWeight,set:(e,t)=>{e.baseWeight=t}},metadata:u},Xt,Yt),h(r,null,Zt,{kind:"accessor",name:"baseWeightTexture",static:!1,private:!1,access:{has:e=>"baseWeightTexture"in e,get:e=>e.baseWeightTexture,set:(e,t)=>{e.baseWeightTexture=t}},metadata:u},Kt,jt),h(r,null,Qt,{kind:"accessor",name:"baseColor",static:!1,private:!1,access:{has:e=>"baseColor"in e,get:e=>e.baseColor,set:(e,t)=>{e.baseColor=t}},metadata:u},qt,$t),h(r,null,Jt,{kind:"accessor",name:"baseColorTexture",static:!1,private:!1,access:{has:e=>"baseColorTexture"in e,get:e=>e.baseColorTexture,set:(e,t)=>{e.baseColorTexture=t}},metadata:u},es,ts),h(r,null,ss,{kind:"accessor",name:"baseDiffuseRoughness",static:!1,private:!1,access:{has:e=>"baseDiffuseRoughness"in e,get:e=>e.baseDiffuseRoughness,set:(e,t)=>{e.baseDiffuseRoughness=t}},metadata:u},is,rs),h(r,null,as,{kind:"accessor",name:"baseDiffuseRoughnessTexture",static:!1,private:!1,access:{has:e=>"baseDiffuseRoughnessTexture"in e,get:e=>e.baseDiffuseRoughnessTexture,set:(e,t)=>{e.baseDiffuseRoughnessTexture=t}},metadata:u},ns,ls),h(r,null,os,{kind:"accessor",name:"baseMetalness",static:!1,private:!1,access:{has:e=>"baseMetalness"in e,get:e=>e.baseMetalness,set:(e,t)=>{e.baseMetalness=t}},metadata:u},us,hs),h(r,null,cs,{kind:"accessor",name:"baseMetalnessTexture",static:!1,private:!1,access:{has:e=>"baseMetalnessTexture"in e,get:e=>e.baseMetalnessTexture,set:(e,t)=>{e.baseMetalnessTexture=t}},metadata:u},_s,fs),h(r,null,Ts,{kind:"accessor",name:"specularWeight",static:!1,private:!1,access:{has:e=>"specularWeight"in e,get:e=>e.specularWeight,set:(e,t)=>{e.specularWeight=t}},metadata:u},gs,ms),h(r,null,ps,{kind:"accessor",name:"specularWeightTexture",static:!1,private:!1,access:{has:e=>"specularWeightTexture"in e,get:e=>e.specularWeightTexture,set:(e,t)=>{e.specularWeightTexture=t}},metadata:u},ds,xs),h(r,null,Rs,{kind:"accessor",name:"specularColor",static:!1,private:!1,access:{has:e=>"specularColor"in e,get:e=>e.specularColor,set:(e,t)=>{e.specularColor=t}},metadata:u},As,Es),h(r,null,Ss,{kind:"accessor",name:"specularColorTexture",static:!1,private:!1,access:{has:e=>"specularColorTexture"in e,get:e=>e.specularColorTexture,set:(e,t)=>{e.specularColorTexture=t}},metadata:u},Ms,Is),h(r,null,bs,{kind:"accessor",name:"specularRoughness",static:!1,private:!1,access:{has:e=>"specularRoughness"in e,get:e=>e.specularRoughness,set:(e,t)=>{e.specularRoughness=t}},metadata:u},ys,Os),h(r,null,Cs,{kind:"accessor",name:"specularRoughnessTexture",static:!1,private:!1,access:{has:e=>"specularRoughnessTexture"in e,get:e=>e.specularRoughnessTexture,set:(e,t)=>{e.specularRoughnessTexture=t}},metadata:u},Fs,Ls),h(r,null,Ds,{kind:"accessor",name:"specularRoughnessAnisotropy",static:!1,private:!1,access:{has:e=>"specularRoughnessAnisotropy"in e,get:e=>e.specularRoughnessAnisotropy,set:(e,t)=>{e.specularRoughnessAnisotropy=t}},metadata:u},Ps,Ns),h(r,null,vs,{kind:"accessor",name:"specularRoughnessAnisotropyTexture",static:!1,private:!1,access:{has:e=>"specularRoughnessAnisotropyTexture"in e,get:e=>e.specularRoughnessAnisotropyTexture,set:(e,t)=>{e.specularRoughnessAnisotropyTexture=t}},metadata:u},ks,Bs),h(r,null,zs,{kind:"accessor",name:"specularIor",static:!1,private:!1,access:{has:e=>"specularIor"in e,get:e=>e.specularIor,set:(e,t)=>{e.specularIor=t}},metadata:u},Us,Ws),h(r,null,ws,{kind:"accessor",name:"transmissionWeight",static:!1,private:!1,access:{has:e=>"transmissionWeight"in e,get:e=>e.transmissionWeight,set:(e,t)=>{e.transmissionWeight=t}},metadata:u},Gs,Hs),h(r,null,Vs,{kind:"accessor",name:"transmissionWeightTexture",static:!1,private:!1,access:{has:e=>"transmissionWeightTexture"in e,get:e=>e.transmissionWeightTexture,set:(e,t)=>{e.transmissionWeightTexture=t}},metadata:u},Xs,Ys),h(r,null,Zs,{kind:"accessor",name:"transmissionColor",static:!1,private:!1,access:{has:e=>"transmissionColor"in e,get:e=>e.transmissionColor,set:(e,t)=>{e.transmissionColor=t}},metadata:u},Ks,js),h(r,null,Qs,{kind:"accessor",name:"transmissionColorTexture",static:!1,private:!1,access:{has:e=>"transmissionColorTexture"in e,get:e=>e.transmissionColorTexture,set:(e,t)=>{e.transmissionColorTexture=t}},metadata:u},qs,$s),h(r,null,Js,{kind:"accessor",name:"transmissionDepth",static:!1,private:!1,access:{has:e=>"transmissionDepth"in e,get:e=>e.transmissionDepth,set:(e,t)=>{e.transmissionDepth=t}},metadata:u},ei,ti),h(r,null,si,{kind:"accessor",name:"transmissionDepthTexture",static:!1,private:!1,access:{has:e=>"transmissionDepthTexture"in e,get:e=>e.transmissionDepthTexture,set:(e,t)=>{e.transmissionDepthTexture=t}},metadata:u},ii,ri),h(r,null,ai,{kind:"accessor",name:"transmissionScatter",static:!1,private:!1,access:{has:e=>"transmissionScatter"in e,get:e=>e.transmissionScatter,set:(e,t)=>{e.transmissionScatter=t}},metadata:u},ni,li),h(r,null,oi,{kind:"accessor",name:"transmissionScatterTexture",static:!1,private:!1,access:{has:e=>"transmissionScatterTexture"in e,get:e=>e.transmissionScatterTexture,set:(e,t)=>{e.transmissionScatterTexture=t}},metadata:u},ui,hi),h(r,null,ci,{kind:"accessor",name:"transmissionScatterAnisotropy",static:!1,private:!1,access:{has:e=>"transmissionScatterAnisotropy"in e,get:e=>e.transmissionScatterAnisotropy,set:(e,t)=>{e.transmissionScatterAnisotropy=t}},metadata:u},_i,fi),h(r,null,Ti,{kind:"accessor",name:"transmissionDispersionScale",static:!1,private:!1,access:{has:e=>"transmissionDispersionScale"in e,get:e=>e.transmissionDispersionScale,set:(e,t)=>{e.transmissionDispersionScale=t}},metadata:u},gi,mi),h(r,null,pi,{kind:"accessor",name:"transmissionDispersionScaleTexture",static:!1,private:!1,access:{has:e=>"transmissionDispersionScaleTexture"in e,get:e=>e.transmissionDispersionScaleTexture,set:(e,t)=>{e.transmissionDispersionScaleTexture=t}},metadata:u},di,xi),h(r,null,Ri,{kind:"accessor",name:"transmissionDispersionAbbeNumber",static:!1,private:!1,access:{has:e=>"transmissionDispersionAbbeNumber"in e,get:e=>e.transmissionDispersionAbbeNumber,set:(e,t)=>{e.transmissionDispersionAbbeNumber=t}},metadata:u},Ai,Ei),h(r,null,Si,{kind:"accessor",name:"subsurfaceWeight",static:!1,private:!1,access:{has:e=>"subsurfaceWeight"in e,get:e=>e.subsurfaceWeight,set:(e,t)=>{e.subsurfaceWeight=t}},metadata:u},Mi,Ii),h(r,null,bi,{kind:"accessor",name:"subsurfaceWeightTexture",static:!1,private:!1,access:{has:e=>"subsurfaceWeightTexture"in e,get:e=>e.subsurfaceWeightTexture,set:(e,t)=>{e.subsurfaceWeightTexture=t}},metadata:u},yi,Oi),h(r,null,Ci,{kind:"accessor",name:"subsurfaceColor",static:!1,private:!1,access:{has:e=>"subsurfaceColor"in e,get:e=>e.subsurfaceColor,set:(e,t)=>{e.subsurfaceColor=t}},metadata:u},Fi,Li),h(r,null,Di,{kind:"accessor",name:"subsurfaceColorTexture",static:!1,private:!1,access:{has:e=>"subsurfaceColorTexture"in e,get:e=>e.subsurfaceColorTexture,set:(e,t)=>{e.subsurfaceColorTexture=t}},metadata:u},Pi,Ni),h(r,null,vi,{kind:"accessor",name:"subsurfaceRadius",static:!1,private:!1,access:{has:e=>"subsurfaceRadius"in e,get:e=>e.subsurfaceRadius,set:(e,t)=>{e.subsurfaceRadius=t}},metadata:u},ki,Bi),h(r,null,zi,{kind:"accessor",name:"subsurfaceRadiusScale",static:!1,private:!1,access:{has:e=>"subsurfaceRadiusScale"in e,get:e=>e.subsurfaceRadiusScale,set:(e,t)=>{e.subsurfaceRadiusScale=t}},metadata:u},Ui,Wi),h(r,null,wi,{kind:"accessor",name:"subsurfaceRadiusScaleTexture",static:!1,private:!1,access:{has:e=>"subsurfaceRadiusScaleTexture"in e,get:e=>e.subsurfaceRadiusScaleTexture,set:(e,t)=>{e.subsurfaceRadiusScaleTexture=t}},metadata:u},Gi,Hi),h(r,null,Vi,{kind:"accessor",name:"subsurfaceScatterAnisotropy",static:!1,private:!1,access:{has:e=>"subsurfaceScatterAnisotropy"in e,get:e=>e.subsurfaceScatterAnisotropy,set:(e,t)=>{e.subsurfaceScatterAnisotropy=t}},metadata:u},Xi,Yi),h(r,null,Zi,{kind:"accessor",name:"coatWeight",static:!1,private:!1,access:{has:e=>"coatWeight"in e,get:e=>e.coatWeight,set:(e,t)=>{e.coatWeight=t}},metadata:u},Ki,ji),h(r,null,Qi,{kind:"accessor",name:"coatWeightTexture",static:!1,private:!1,access:{has:e=>"coatWeightTexture"in e,get:e=>e.coatWeightTexture,set:(e,t)=>{e.coatWeightTexture=t}},metadata:u},qi,$i),h(r,null,Ji,{kind:"accessor",name:"coatColor",static:!1,private:!1,access:{has:e=>"coatColor"in e,get:e=>e.coatColor,set:(e,t)=>{e.coatColor=t}},metadata:u},er,tr),h(r,null,sr,{kind:"accessor",name:"coatColorTexture",static:!1,private:!1,access:{has:e=>"coatColorTexture"in e,get:e=>e.coatColorTexture,set:(e,t)=>{e.coatColorTexture=t}},metadata:u},ir,rr),h(r,null,ar,{kind:"accessor",name:"coatRoughness",static:!1,private:!1,access:{has:e=>"coatRoughness"in e,get:e=>e.coatRoughness,set:(e,t)=>{e.coatRoughness=t}},metadata:u},nr,lr),h(r,null,or,{kind:"accessor",name:"coatRoughnessTexture",static:!1,private:!1,access:{has:e=>"coatRoughnessTexture"in e,get:e=>e.coatRoughnessTexture,set:(e,t)=>{e.coatRoughnessTexture=t}},metadata:u},ur,hr),h(r,null,cr,{kind:"accessor",name:"coatRoughnessAnisotropy",static:!1,private:!1,access:{has:e=>"coatRoughnessAnisotropy"in e,get:e=>e.coatRoughnessAnisotropy,set:(e,t)=>{e.coatRoughnessAnisotropy=t}},metadata:u},_r,fr),h(r,null,Tr,{kind:"accessor",name:"coatRoughnessAnisotropyTexture",static:!1,private:!1,access:{has:e=>"coatRoughnessAnisotropyTexture"in e,get:e=>e.coatRoughnessAnisotropyTexture,set:(e,t)=>{e.coatRoughnessAnisotropyTexture=t}},metadata:u},gr,mr),h(r,null,pr,{kind:"accessor",name:"coatIor",static:!1,private:!1,access:{has:e=>"coatIor"in e,get:e=>e.coatIor,set:(e,t)=>{e.coatIor=t}},metadata:u},dr,xr),h(r,null,Rr,{kind:"accessor",name:"coatDarkening",static:!1,private:!1,access:{has:e=>"coatDarkening"in e,get:e=>e.coatDarkening,set:(e,t)=>{e.coatDarkening=t}},metadata:u},Ar,Er),h(r,null,Sr,{kind:"accessor",name:"coatDarkeningTexture",static:!1,private:!1,access:{has:e=>"coatDarkeningTexture"in e,get:e=>e.coatDarkeningTexture,set:(e,t)=>{e.coatDarkeningTexture=t}},metadata:u},Mr,Ir),h(r,null,br,{kind:"accessor",name:"fuzzWeight",static:!1,private:!1,access:{has:e=>"fuzzWeight"in e,get:e=>e.fuzzWeight,set:(e,t)=>{e.fuzzWeight=t}},metadata:u},yr,Or),h(r,null,Cr,{kind:"accessor",name:"fuzzWeightTexture",static:!1,private:!1,access:{has:e=>"fuzzWeightTexture"in e,get:e=>e.fuzzWeightTexture,set:(e,t)=>{e.fuzzWeightTexture=t}},metadata:u},Fr,Lr),h(r,null,Dr,{kind:"accessor",name:"fuzzColor",static:!1,private:!1,access:{has:e=>"fuzzColor"in e,get:e=>e.fuzzColor,set:(e,t)=>{e.fuzzColor=t}},metadata:u},Pr,Nr),h(r,null,vr,{kind:"accessor",name:"fuzzColorTexture",static:!1,private:!1,access:{has:e=>"fuzzColorTexture"in e,get:e=>e.fuzzColorTexture,set:(e,t)=>{e.fuzzColorTexture=t}},metadata:u},kr,Br),h(r,null,zr,{kind:"accessor",name:"fuzzRoughness",static:!1,private:!1,access:{has:e=>"fuzzRoughness"in e,get:e=>e.fuzzRoughness,set:(e,t)=>{e.fuzzRoughness=t}},metadata:u},Ur,Wr),h(r,null,wr,{kind:"accessor",name:"fuzzRoughnessTexture",static:!1,private:!1,access:{has:e=>"fuzzRoughnessTexture"in e,get:e=>e.fuzzRoughnessTexture,set:(e,t)=>{e.fuzzRoughnessTexture=t}},metadata:u},Gr,Hr),h(r,null,Vr,{kind:"accessor",name:"geometryThinWalled",static:!1,private:!1,access:{has:e=>"geometryThinWalled"in e,get:e=>e.geometryThinWalled,set:(e,t)=>{e.geometryThinWalled=t}},metadata:u},Xr,Yr),h(r,null,Zr,{kind:"accessor",name:"geometryNormalTexture",static:!1,private:!1,access:{has:e=>"geometryNormalTexture"in e,get:e=>e.geometryNormalTexture,set:(e,t)=>{e.geometryNormalTexture=t}},metadata:u},Kr,jr),h(r,null,Qr,{kind:"accessor",name:"geometryTangent",static:!1,private:!1,access:{has:e=>"geometryTangent"in e,get:e=>e.geometryTangent,set:(e,t)=>{e.geometryTangent=t}},metadata:u},qr,$r),h(r,null,Jr,{kind:"accessor",name:"geometryTangentTexture",static:!1,private:!1,access:{has:e=>"geometryTangentTexture"in e,get:e=>e.geometryTangentTexture,set:(e,t)=>{e.geometryTangentTexture=t}},metadata:u},ea,ta),h(r,null,sa,{kind:"accessor",name:"geometryCoatNormalTexture",static:!1,private:!1,access:{has:e=>"geometryCoatNormalTexture"in e,get:e=>e.geometryCoatNormalTexture,set:(e,t)=>{e.geometryCoatNormalTexture=t}},metadata:u},ia,ra),h(r,null,aa,{kind:"accessor",name:"geometryCoatTangent",static:!1,private:!1,access:{has:e=>"geometryCoatTangent"in e,get:e=>e.geometryCoatTangent,set:(e,t)=>{e.geometryCoatTangent=t}},metadata:u},na,la),h(r,null,oa,{kind:"accessor",name:"geometryCoatTangentTexture",static:!1,private:!1,access:{has:e=>"geometryCoatTangentTexture"in e,get:e=>e.geometryCoatTangentTexture,set:(e,t)=>{e.geometryCoatTangentTexture=t}},metadata:u},ua,ha),h(r,null,ca,{kind:"accessor",name:"geometryOpacity",static:!1,private:!1,access:{has:e=>"geometryOpacity"in e,get:e=>e.geometryOpacity,set:(e,t)=>{e.geometryOpacity=t}},metadata:u},_a,fa),h(r,null,Ta,{kind:"accessor",name:"geometryOpacityTexture",static:!1,private:!1,access:{has:e=>"geometryOpacityTexture"in e,get:e=>e.geometryOpacityTexture,set:(e,t)=>{e.geometryOpacityTexture=t}},metadata:u},ga,ma),h(r,null,pa,{kind:"accessor",name:"geometryThickness",static:!1,private:!1,access:{has:e=>"geometryThickness"in e,get:e=>e.geometryThickness,set:(e,t)=>{e.geometryThickness=t}},metadata:u},da,xa),h(r,null,Ra,{kind:"accessor",name:"geometryThicknessTexture",static:!1,private:!1,access:{has:e=>"geometryThicknessTexture"in e,get:e=>e.geometryThicknessTexture,set:(e,t)=>{e.geometryThicknessTexture=t}},metadata:u},Aa,Ea),h(r,null,Sa,{kind:"accessor",name:"emissionLuminance",static:!1,private:!1,access:{has:e=>"emissionLuminance"in e,get:e=>e.emissionLuminance,set:(e,t)=>{e.emissionLuminance=t}},metadata:u},Ma,Ia),h(r,null,ba,{kind:"accessor",name:"emissionColor",static:!1,private:!1,access:{has:e=>"emissionColor"in e,get:e=>e.emissionColor,set:(e,t)=>{e.emissionColor=t}},metadata:u},ya,Oa),h(r,null,Ca,{kind:"accessor",name:"emissionColorTexture",static:!1,private:!1,access:{has:e=>"emissionColorTexture"in e,get:e=>e.emissionColorTexture,set:(e,t)=>{e.emissionColorTexture=t}},metadata:u},Fa,La),h(r,null,Da,{kind:"accessor",name:"thinFilmWeight",static:!1,private:!1,access:{has:e=>"thinFilmWeight"in e,get:e=>e.thinFilmWeight,set:(e,t)=>{e.thinFilmWeight=t}},metadata:u},Pa,Na),h(r,null,va,{kind:"accessor",name:"thinFilmWeightTexture",static:!1,private:!1,access:{has:e=>"thinFilmWeightTexture"in e,get:e=>e.thinFilmWeightTexture,set:(e,t)=>{e.thinFilmWeightTexture=t}},metadata:u},ka,Ba),h(r,null,za,{kind:"accessor",name:"thinFilmThickness",static:!1,private:!1,access:{has:e=>"thinFilmThickness"in e,get:e=>e.thinFilmThickness,set:(e,t)=>{e.thinFilmThickness=t}},metadata:u},Ua,Wa),h(r,null,wa,{kind:"accessor",name:"thinFilmThicknessMin",static:!1,private:!1,access:{has:e=>"thinFilmThicknessMin"in e,get:e=>e.thinFilmThicknessMin,set:(e,t)=>{e.thinFilmThicknessMin=t}},metadata:u},Ga,Ha),h(r,null,Va,{kind:"accessor",name:"thinFilmThicknessTexture",static:!1,private:!1,access:{has:e=>"thinFilmThicknessTexture"in e,get:e=>e.thinFilmThicknessTexture,set:(e,t)=>{e.thinFilmThicknessTexture=t}},metadata:u},Xa,Ya),h(r,null,Za,{kind:"accessor",name:"thinFilmIor",static:!1,private:!1,access:{has:e=>"thinFilmIor"in e,get:e=>e.thinFilmIor,set:(e,t)=>{e.thinFilmIor=t}},metadata:u},Ka,ja),h(r,null,Qa,{kind:"accessor",name:"ambientOcclusionTexture",static:!1,private:!1,access:{has:e=>"ambientOcclusionTexture"in e,get:e=>e.ambientOcclusionTexture,set:(e,t)=>{e.ambientOcclusionTexture=t}},metadata:u},qa,$a),h(r,null,Ja,{kind:"accessor",name:"directIntensity",static:!1,private:!1,access:{has:e=>"directIntensity"in e,get:e=>e.directIntensity,set:(e,t)=>{e.directIntensity=t}},metadata:u},en,tn),h(r,null,sn,{kind:"accessor",name:"environmentIntensity",static:!1,private:!1,access:{has:e=>"environmentIntensity"in e,get:e=>e.environmentIntensity,set:(e,t)=>{e.environmentIntensity=t}},metadata:u},rn,an),h(r,null,nn,{kind:"accessor",name:"useSpecularWeightFromTextureAlpha",static:!1,private:!1,access:{has:e=>"useSpecularWeightFromTextureAlpha"in e,get:e=>e.useSpecularWeightFromTextureAlpha,set:(e,t)=>{e.useSpecularWeightFromTextureAlpha=t}},metadata:u},ln,on),h(r,null,un,{kind:"accessor",name:"forceAlphaTest",static:!1,private:!1,access:{has:e=>"forceAlphaTest"in e,get:e=>e.forceAlphaTest,set:(e,t)=>{e.forceAlphaTest=t}},metadata:u},hn,cn),h(r,null,_n,{kind:"accessor",name:"alphaCutOff",static:!1,private:!1,access:{has:e=>"alphaCutOff"in e,get:e=>e.alphaCutOff,set:(e,t)=>{e.alphaCutOff=t}},metadata:u},fn,Tn),h(r,null,gn,{kind:"accessor",name:"useAmbientOcclusionFromMetallicTextureRed",static:!1,private:!1,access:{has:e=>"useAmbientOcclusionFromMetallicTextureRed"in e,get:e=>e.useAmbientOcclusionFromMetallicTextureRed,set:(e,t)=>{e.useAmbientOcclusionFromMetallicTextureRed=t}},metadata:u},mn,pn),h(r,null,dn,{kind:"accessor",name:"useAmbientInGrayScale",static:!1,private:!1,access:{has:e=>"useAmbientInGrayScale"in e,get:e=>e.useAmbientInGrayScale,set:(e,t)=>{e.useAmbientInGrayScale=t}},metadata:u},xn,Rn),h(r,null,An,{kind:"getter",name:"usePhysicalLightFalloff",static:!1,private:!1,access:{has:e=>"usePhysicalLightFalloff"in e,get:e=>e.usePhysicalLightFalloff},metadata:u},null,kt),h(r,null,En,{kind:"getter",name:"useGLTFLightFalloff",static:!1,private:!1,access:{has:e=>"useGLTFLightFalloff"in e,get:e=>e.useGLTFLightFalloff},metadata:u},null,kt),h(r,null,Sn,{kind:"accessor",name:"useObjectSpaceNormalMap",static:!1,private:!1,access:{has:e=>"useObjectSpaceNormalMap"in e,get:e=>e.useObjectSpaceNormalMap,set:(e,t)=>{e.useObjectSpaceNormalMap=t}},metadata:u},Mn,In),h(r,null,bn,{kind:"accessor",name:"useParallax",static:!1,private:!1,access:{has:e=>"useParallax"in e,get:e=>e.useParallax,set:(e,t)=>{e.useParallax=t}},metadata:u},yn,On),h(r,null,Cn,{kind:"accessor",name:"useParallaxOcclusion",static:!1,private:!1,access:{has:e=>"useParallaxOcclusion"in e,get:e=>e.useParallaxOcclusion,set:(e,t)=>{e.useParallaxOcclusion=t}},metadata:u},Fn,Ln),h(r,null,Dn,{kind:"accessor",name:"parallaxScaleBias",static:!1,private:!1,access:{has:e=>"parallaxScaleBias"in e,get:e=>e.parallaxScaleBias,set:(e,t)=>{e.parallaxScaleBias=t}},metadata:u},Pn,Nn),h(r,null,vn,{kind:"accessor",name:"disableLighting",static:!1,private:!1,access:{has:e=>"disableLighting"in e,get:e=>e.disableLighting,set:(e,t)=>{e.disableLighting=t}},metadata:u},kn,Bn),h(r,null,zn,{kind:"accessor",name:"forceIrradianceInFragment",static:!1,private:!1,access:{has:e=>"forceIrradianceInFragment"in e,get:e=>e.forceIrradianceInFragment,set:(e,t)=>{e.forceIrradianceInFragment=t}},metadata:u},Un,Wn),h(r,null,wn,{kind:"accessor",name:"maxSimultaneousLights",static:!1,private:!1,access:{has:e=>"maxSimultaneousLights"in e,get:e=>e.maxSimultaneousLights,set:(e,t)=>{e.maxSimultaneousLights=t}},metadata:u},Gn,Hn),h(r,null,Vn,{kind:"accessor",name:"invertNormalMapX",static:!1,private:!1,access:{has:e=>"invertNormalMapX"in e,get:e=>e.invertNormalMapX,set:(e,t)=>{e.invertNormalMapX=t}},metadata:u},Xn,Yn),h(r,null,Zn,{kind:"accessor",name:"invertNormalMapY",static:!1,private:!1,access:{has:e=>"invertNormalMapY"in e,get:e=>e.invertNormalMapY,set:(e,t)=>{e.invertNormalMapY=t}},metadata:u},Kn,jn),h(r,null,Qn,{kind:"accessor",name:"twoSidedLighting",static:!1,private:!1,access:{has:e=>"twoSidedLighting"in e,get:e=>e.twoSidedLighting,set:(e,t)=>{e.twoSidedLighting=t}},metadata:u},qn,$n),h(r,null,Jn,{kind:"accessor",name:"useAlphaFresnel",static:!1,private:!1,access:{has:e=>"useAlphaFresnel"in e,get:e=>e.useAlphaFresnel,set:(e,t)=>{e.useAlphaFresnel=t}},metadata:u},el,tl),h(r,null,sl,{kind:"accessor",name:"useLinearAlphaFresnel",static:!1,private:!1,access:{has:e=>"useLinearAlphaFresnel"in e,get:e=>e.useLinearAlphaFresnel,set:(e,t)=>{e.useLinearAlphaFresnel=t}},metadata:u},il,rl),h(r,null,al,{kind:"accessor",name:"environmentBRDFTexture",static:!1,private:!1,access:{has:e=>"environmentBRDFTexture"in e,get:e=>e.environmentBRDFTexture,set:(e,t)=>{e.environmentBRDFTexture=t}},metadata:u},nl,ll),h(r,null,ol,{kind:"accessor",name:"forceNormalForward",static:!1,private:!1,access:{has:e=>"forceNormalForward"in e,get:e=>e.forceNormalForward,set:(e,t)=>{e.forceNormalForward=t}},metadata:u},ul,hl),h(r,null,cl,{kind:"accessor",name:"enableSpecularAntiAliasing",static:!1,private:!1,access:{has:e=>"enableSpecularAntiAliasing"in e,get:e=>e.enableSpecularAntiAliasing,set:(e,t)=>{e.enableSpecularAntiAliasing=t}},metadata:u},_l,fl),h(r,null,Tl,{kind:"accessor",name:"useHorizonOcclusion",static:!1,private:!1,access:{has:e=>"useHorizonOcclusion"in e,get:e=>e.useHorizonOcclusion,set:(e,t)=>{e.useHorizonOcclusion=t}},metadata:u},gl,ml),h(r,null,pl,{kind:"accessor",name:"useRadianceOcclusion",static:!1,private:!1,access:{has:e=>"useRadianceOcclusion"in e,get:e=>e.useRadianceOcclusion,set:(e,t)=>{e.useRadianceOcclusion=t}},metadata:u},dl,xl),h(r,null,Rl,{kind:"accessor",name:"unlit",static:!1,private:!1,access:{has:e=>"unlit"in e,get:e=>e.unlit,set:(e,t)=>{e.unlit=t}},metadata:u},Al,El),h(r,null,Sl,{kind:"accessor",name:"applyDecalMapAfterDetailMap",static:!1,private:!1,access:{has:e=>"applyDecalMapAfterDetailMap"in e,get:e=>e.applyDecalMapAfterDetailMap,set:(e,t)=>{e.applyDecalMapAfterDetailMap=t}},metadata:u},Ml,Il),h(r,null,bl,{kind:"accessor",name:"debugMode",static:!1,private:!1,access:{has:e=>"debugMode"in e,get:e=>e.debugMode,set:(e,t)=>{e.debugMode=t}},metadata:u},yl,Ol),h(r,null,Cl,{kind:"getter",name:"transparencyMode",static:!1,private:!1,access:{has:e=>"transparencyMode"in e,get:e=>e.transparencyMode},metadata:u},null,kt),u&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:u})})(),r.SSS_QUALITY_LOW=0,r.SSS_QUALITY_MEDIUM=1,r.SSS_QUALITY_HIGH=2,r._noiseTextures={},r.ForceGLSL=!1,r})(),zl=!1;function tu(){zl||(zl=!0,Do(),Po("BABYLON.OpenPBRMaterial",qo))}export{qo as OpenPBRMaterial,Bl as OpenPBRMaterialDefines,tu as RegisterOpenpbrMaterial};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./geometry.vertex-C4cLov7Q.js","./index-YcXsPtFI.js","./index-DcTTrc-8.css","./bakedVertexAnimation-CZalW6MY.js","./sceneUboDeclaration-1bB3YoON.js","./clipPlaneVertex-ChqMABPH.js","./harmonicsFunctions-BVmgiiRj.js","./bumpVertex-DLicej86.js","./geometry.fragment-Dr1pGbVQ.js","./clipPlaneFragment-Cllz8e_G.js","./bumpFragment-VvIKAANw.js","./reflectionFunction-CpMEFzxv.js","./helperFunctions-DeCJcXoK.js","./pbrIBLFunctions-D5A_AxnZ.js","./pbrBRDFFunctions-C50h7JEU.js","./openpbrTransmissionLayerData-Yc4m_LFv.js","./geometry.vertex--elQa6vQ.js","./geometry.fragment-BEdt-FQu.js","./openpbrTransmissionLayerData-D2UaStdu.js","./openpbr.vertex-Cis9aL4z.js","./meshUboDeclaration-dDsFbRSv.js","./openpbrUboDeclaration-DfY3S0VX.js","./vertexColorMixing-C6OHmVcI.js","./mainUVVaryingDeclaration-CoUbOUEQ.js","./logDepthVertex-Dt5zdVFA.js","./logDepthDeclaration-DHeJwlJR.js","./openpbr.fragment-BJTs78x9.js","./oitFragment-C1JYx8fS.js","./pbrDebug-RHma8ghT.js","./fogFragment-BzLCRCIz.js","./openpbr.vertex-Qr3-JJak.js","./openpbrUboDeclaration-YAeSpo2n.js","./openpbr.fragment-CnBW8BK7.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bp as Ae,L as De,av as Ll,aS as Zl,aw as Pe,b8 as zt,aN as wt,aA as Gt,ay as be,aR as $,bq as ae,br as Ul,bs as Kl,bt as jl,bu as Ql,M as ql,bv as $l,aT as ne,bw as Wl,bx as wl,by as Jl,bz as c,bA as _,a9 as ve,c as Re,aO as i,a7 as Gl,bB as eo,au as to,bC as Dl,bD as Pl,bE as so,bF as io,a0 as pe,bG as Ut,bH as ro,bI as ao,bJ as no,bK as lo,bL as oo,bM as uo,bN as ho,bO as co,bP as _o,bQ as fo,bR as To,bS as go,bT as mo,bU as po,bV as xo,bW as Ro,bX as Ao,bY as Wt,bZ as Eo,b_ as So,b$ as Mo,c0 as Io,c1 as bo,c2 as yo,c3 as Oo,c4 as Co,c5 as Fo,aU as h,c6 as Lo,c7 as Do,i as Po,c8 as No,c9 as vo,V as ko,ca as Bo,cb as zo,cc as Uo,cd as p,aV as X,ce as Y}from"./index-YcXsPtFI.js";import{G as Wo,a as Nl}from"./brdfTextureTools-BHIclPmG.js";function wo(r){return class extends r{constructor(){super(...arguments),this.REFLECTION=!1,this.REFLECTIONMAP_3D=!1,this.REFLECTIONMAP_SPHERICAL=!1,this.REFLECTIONMAP_PLANAR=!1,this.REFLECTIONMAP_CUBIC=!1,this.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,this.REFLECTIONMAP_PROJECTION=!1,this.REFLECTIONMAP_SKYBOX=!1,this.REFLECTIONMAP_EXPLICIT=!1,this.REFLECTIONMAP_EQUIRECTANGULAR=!1,this.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,this.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,this.INVERTCUBICMAP=!1,this.USESPHERICALFROMREFLECTIONMAP=!1,this.USEIRRADIANCEMAP=!1,this.USE_IRRADIANCE_DOMINANT_DIRECTION=!1,this.USESPHERICALINVERTEX=!1,this.REFLECTIONMAP_OPPOSITEZ=!1,this.LODINREFLECTIONALPHA=!1,this.GAMMAREFLECTION=!1,this.RGBDREFLECTION=!1}}}let vl=!1;function Go(){vl||(vl=!0,Ae.prototype.restoreSingleAttachment=function(){const r=this._gl;this.bindAttachments([r.BACK])},Ae.prototype.restoreSingleAttachmentForRenderTarget=function(){const r=this._gl;this.bindAttachments([r.COLOR_ATTACHMENT0])},Ae.prototype.buildTextureLayout=function(r,s=!1){const o=this._gl,l=[];if(s)l.push(o.BACK);else for(let n=0;n<r.length;n++)r[n]?l.push(o["COLOR_ATTACHMENT"+n]):l.push(o.NONE);return l},Ae.prototype.bindAttachments=function(r){this._gl.drawBuffers(r)},Ae.prototype.unBindMultiColorAttachmentFramebuffer=function(r,s=!1,o){this._currentRenderTarget=null,r.disableAutomaticMSAAResolve||this.resolveMultiFramebuffer(r),s||this.generateMipMapsMultiFramebuffer(r),o&&(r._MSAAFramebuffer&&this._bindUnboundFramebuffer(r._framebuffer),o()),this._bindUnboundFramebuffer(null)},Ae.prototype.createMultipleRenderTarget=function(r,s,o=!0){let l=!1,n=!0,m=!1,d=!1,I,k=1,U=1;const M=0,N=3,J=!1,se=5,_e=3553;let te=[],v=[],x=[],A=[],W=[],G=[],y=[],T=[],le=[],ie=!1;const V=this._createHardwareRenderTargetWrapper(!0,!1,r);s!==void 0&&(l=s.generateMipMaps===void 0?!1:s.generateMipMaps,n=s.generateDepthBuffer===void 0?!0:s.generateDepthBuffer,m=s.generateStencilBuffer===void 0?!1:s.generateStencilBuffer,d=s.generateDepthTexture===void 0?!1:s.generateDepthTexture,k=s.textureCount??1,U=s.samples??U,te=s.types||te,v=s.samplingModes||v,x=s.useSRGBBuffers||x,A=s.formats||A,W=s.targetTypes||W,G=s.faceIndex||G,y=s.layerIndex||y,T=s.layerCounts||T,le=s.labels||le,ie=s.dontCreateTextures??!1,this.webGLVersion>1&&(s.depthTextureFormat===13||s.depthTextureFormat===17||s.depthTextureFormat===16||s.depthTextureFormat===14||s.depthTextureFormat===18)&&(I=s.depthTextureFormat)),I===void 0&&(I=m?13:14);const g=this._gl,f=this._currentFramebuffer,fe=g.createFramebuffer();this._bindUnboundFramebuffer(fe);const oe=r.width??r,R=r.height??r,ue=[],E=[],Q=this.webGLVersion>1&&(I===13||I===17||I===18);V.label=s?.label??"MultiRenderTargetWrapper",V._framebuffer=fe,V._generateDepthBuffer=d||n,V._generateStencilBuffer=d?Q:m,V._depthStencilBuffer=this._setupFramebufferDepthAttachments(V._generateStencilBuffer,V._generateDepthBuffer,oe,R,1,I),V._attachments=E;for(let P=0;P<k;P++){let he=v[P]||N,q=te[P]||M,Te=x[P]||J;const ce=A[P]||se,j=W[P]||_e,ye=T[P]??1;(q===1&&!this._caps.textureFloatLinearFiltering||q===2&&!this._caps.textureHalfFloatLinearFiltering)&&(he=1);const Oe=this._getSamplingParameters(he,l);q===1&&!this._caps.textureFloat&&(q=0,De.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type")),Te=Te&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU);const Ce=this.webGLVersion>1,Fe=g[Ce?"COLOR_ATTACHMENT"+P:"COLOR_ATTACHMENT"+P+"_WEBGL"];if(E.push(Fe),j===-1||ie)continue;const Z=new Ll(this,6);ue[P]=Z,g.activeTexture(g["TEXTURE"+P]),g.bindTexture(j,Z._hardwareTexture.underlyingResource),g.texParameteri(j,g.TEXTURE_MAG_FILTER,Oe.mag),g.texParameteri(j,g.TEXTURE_MIN_FILTER,Oe.min),g.texParameteri(j,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(j,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE);const Ee=this._getRGBABufferInternalSizedFormat(q,ce,Te),Se=this._getInternalFormat(ce),Me=this._getWebGLTextureType(q);if(Ce&&(j===35866||j===32879))j===35866?Z.is2DArray=!0:Z.is3D=!0,Z.baseDepth=Z.depth=ye,g.texImage3D(j,0,Ee,oe,R,ye,0,Se,Me,null);else if(j===34067){for(let Ie=0;Ie<6;Ie++)g.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,Ee,oe,R,0,Se,Me,null);Z.isCube=!0}else g.texImage2D(g.TEXTURE_2D,0,Ee,oe,R,0,Se,Me,null);l&&g.generateMipmap(j),this._bindTextureDirectly(j,null),Z.baseWidth=oe,Z.baseHeight=R,Z.width=oe,Z.height=R,Z.isReady=!0,Z.samples=1,Z.generateMipMaps=l,Z.samplingMode=he,Z.type=q,Z._useSRGBBuffer=Te,Z.format=ce,Z.label=le[P]??V.label+"-Texture"+P,this._internalTexturesCache.push(Z)}if(d&&this._caps.depthTextureExtension&&!ie){const P=new Ll(this,14);let he=5,q=g.DEPTH_COMPONENT16,Te=g.DEPTH_COMPONENT,ce=g.UNSIGNED_SHORT,j=g.DEPTH_ATTACHMENT;this.webGLVersion<2?q=g.DEPTH_COMPONENT:I===14?(he=1,ce=g.FLOAT,q=g.DEPTH_COMPONENT32F):I===18?(he=0,ce=g.FLOAT_32_UNSIGNED_INT_24_8_REV,q=g.DEPTH32F_STENCIL8,Te=g.DEPTH_STENCIL,j=g.DEPTH_STENCIL_ATTACHMENT):I===16?(he=0,ce=g.UNSIGNED_INT,q=g.DEPTH_COMPONENT24,j=g.DEPTH_ATTACHMENT):(I===13||I===17)&&(he=12,ce=g.UNSIGNED_INT_24_8,q=g.DEPTH24_STENCIL8,Te=g.DEPTH_STENCIL,j=g.DEPTH_STENCIL_ATTACHMENT),this._bindTextureDirectly(g.TEXTURE_2D,P,!0),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.NEAREST),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.NEAREST),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texImage2D(g.TEXTURE_2D,0,q,oe,R,0,Te,ce,null),g.framebufferTexture2D(g.FRAMEBUFFER,j,g.TEXTURE_2D,P._hardwareTexture.underlyingResource,0),this._bindTextureDirectly(g.TEXTURE_2D,null),V._depthStencilTexture=P,V._depthStencilTextureWithStencil=Q,P.baseWidth=oe,P.baseHeight=R,P.width=oe,P.height=R,P.isReady=!0,P.samples=1,P.generateMipMaps=l,P.samplingMode=1,P.format=I,P.type=he,P.label=V.label+"-DepthStencil",ue[k]=P,this._internalTexturesCache.push(P)}if(V.setTextures(ue),o&&g.drawBuffers(E),this._bindUnboundFramebuffer(f),V.setLayerAndFaceIndices(y,G),this.resetTextureCache(),!ie)this.updateMultipleRenderTargetTextureSampleCount(V,U,o);else if(U>1){const P=g.createFramebuffer();if(!P)throw new Error("Unable to create multi sampled framebuffer");V._samples=U,V._MSAAFramebuffer=P,k>0&&o&&(this._bindUnboundFramebuffer(P),g.drawBuffers(E),this._bindUnboundFramebuffer(f))}return V},Ae.prototype.updateMultipleRenderTargetTextureSampleCount=function(r,s,o=!0){if(this.webGLVersion<2||!r)return 1;if(r.samples===s)return s;const l=this._gl;s=Math.min(s,this.getCaps().maxMSAASamples),r._depthStencilBuffer&&(l.deleteRenderbuffer(r._depthStencilBuffer),r._depthStencilBuffer=null),r._MSAAFramebuffer&&(l.deleteFramebuffer(r._MSAAFramebuffer),r._MSAAFramebuffer=null);const n=r._attachments.length;for(let d=0;d<n;d++)r.textures[d]._hardwareTexture?.releaseMSAARenderBuffers();if(s>1&&typeof l.renderbufferStorageMultisample=="function"){const d=l.createFramebuffer();if(!d)throw new Error("Unable to create multi sampled framebuffer");r._MSAAFramebuffer=d,this._bindUnboundFramebuffer(d);const I=[];for(let k=0;k<n;k++){const U=r.textures[k],M=U._hardwareTexture,N=l[this.webGLVersion>1?"COLOR_ATTACHMENT"+k:"COLOR_ATTACHMENT"+k+"_WEBGL"],J=this._createRenderBuffer(U.width,U.height,s,-1,this._getRGBABufferInternalSizedFormat(U.type,U.format,U._useSRGBBuffer),N);if(!J)throw new Error("Unable to create multi sampled framebuffer");M.addMSAARenderBuffer(J),U.samples=s,I.push(N)}o&&l.drawBuffers(I)}else this._bindUnboundFramebuffer(r._framebuffer);const m=r._depthStencilTexture?r._depthStencilTexture.format:void 0;return r._depthStencilBuffer=this._setupFramebufferDepthAttachments(r._generateStencilBuffer,r._generateDepthBuffer,r.width,r.height,s,m),this._bindUnboundFramebuffer(null),r._samples=s,s},Ae.prototype.generateMipMapsMultiFramebuffer=function(r){const s=r,o=this._gl;if(s.isMulti)for(let l=0;l<s._attachments.length;l++){const n=s.textures[l];n?.generateMipMaps&&!n?.isCube&&!n?.is3D&&(this._bindTextureDirectly(o.TEXTURE_2D,n,!0),o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null))}},Ae.prototype.resolveMultiFramebuffer=function(r){const s=r,o=this._gl;if(!s._MSAAFramebuffer||!s.isMulti)return;let l=s.resolveMSAAColors?o.COLOR_BUFFER_BIT:0;l|=s._generateDepthBuffer&&s.resolveMSAADepth?o.DEPTH_BUFFER_BIT:0,l|=s._generateStencilBuffer&&s.resolveMSAAStencil?o.STENCIL_BUFFER_BIT:0;const n=s._attachments,m=n.length;o.bindFramebuffer(o.READ_FRAMEBUFFER,s._MSAAFramebuffer),o.bindFramebuffer(o.DRAW_FRAMEBUFFER,s._framebuffer);for(let d=0;d<m;d++){const I=s.textures[d];for(let k=0;k<m;k++)n[k]=o.NONE;n[d]=o[this.webGLVersion>1?"COLOR_ATTACHMENT"+d:"COLOR_ATTACHMENT"+d+"_WEBGL"],o.readBuffer(n[d]),o.drawBuffers(n),o.blitFramebuffer(0,0,I.width,I.height,0,0,I.width,I.height,l,o.NEAREST)}for(let d=0;d<m;d++)n[d]=o[this.webGLVersion>1?"COLOR_ATTACHMENT"+d:"COLOR_ATTACHMENT"+d+"_WEBGL"];o.drawBuffers(n),o.bindFramebuffer(this._gl.FRAMEBUFFER,s._MSAAFramebuffer)})}class Ho extends Zl{get isSupported(){return this._engine?.getCaps().drawBuffersExtension??!1}get textures(){return this._textures}get count(){return this._count}get depthTexture(){return this._textures[this._textures.length-1]}set wrapU(s){if(this._textures)for(let o=0;o<this._textures.length;o++)this._textures[o].wrapU=s}set wrapV(s){if(this._textures)for(let o=0;o<this._textures.length;o++)this._textures[o].wrapV=s}constructor(s,o,l,n,m,d){const I=m&&m.generateMipMaps?m.generateMipMaps:!1,k=m&&m.generateDepthTexture?m.generateDepthTexture:!1,U=m&&m.depthTextureFormat?m.depthTextureFormat:15,M=!m||m.doNotChangeAspectRatio===void 0?!0:m.doNotChangeAspectRatio,N=m&&m.drawOnlyOnFirstAttachmentByDefault?m.drawOnlyOnFirstAttachmentByDefault:!1;if(super(s,o,n,I,M,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0),Go(),!this.isSupported){this.dispose();return}this._textureNames=d;const J=[],se=[],_e=[],te=[],v=[],x=[],A=[],W=[];this._initTypes(l,J,se,_e,te,v,x,A,W,m);const G=!m||m.generateDepthBuffer===void 0?!0:m.generateDepthBuffer,y=!m||m.generateStencilBuffer===void 0?!1:m.generateStencilBuffer,T=m&&m.samples?m.samples:1;this._multiRenderTargetOptions={samplingModes:se,generateMipMaps:I,generateDepthBuffer:G,generateStencilBuffer:y,generateDepthTexture:k,depthTextureFormat:U,types:J,textureCount:l,useSRGBBuffers:_e,samples:T,formats:te,targetTypes:v,faceIndex:x,layerIndex:A,layerCounts:W,labels:d,label:s},this._count=l,this._drawOnlyOnFirstAttachmentByDefault=N,l>0&&(this._createInternalTextures(),this._createTextures(d))}_initTypes(s,o,l,n,m,d,I,k,U,M){for(let N=0;N<s;N++)M&&M.types&&M.types[N]!==void 0?o.push(M.types[N]):o.push(M&&M.defaultType?M.defaultType:0),M&&M.samplingModes&&M.samplingModes[N]!==void 0?l.push(M.samplingModes[N]):l.push(Pe.BILINEAR_SAMPLINGMODE),M&&M.useSRGBBuffers&&M.useSRGBBuffers[N]!==void 0?n.push(M.useSRGBBuffers[N]):n.push(!1),M&&M.formats&&M.formats[N]!==void 0?m.push(M.formats[N]):m.push(5),M&&M.targetTypes&&M.targetTypes[N]!==void 0?d.push(M.targetTypes[N]):d.push(3553),M&&M.faceIndex&&M.faceIndex[N]!==void 0?I.push(M.faceIndex[N]):I.push(0),M&&M.layerIndex&&M.layerIndex[N]!==void 0?k.push(M.layerIndex[N]):k.push(0),M&&M.layerCounts&&M.layerCounts[N]!==void 0?U.push(M.layerCounts[N]):U.push(1)}_createInternaTextureIndexMapping(){const s={},o=[];if(!this._renderTarget)return o;const l=this._renderTarget.textures;for(let n=0;n<l.length;n++){const m=l[n];if(!m)continue;const d=s[m.uniqueId];d!==void 0?o[n]=d:s[m.uniqueId]=n}return o}_rebuild(s=!1,o=!1,l){if(this._count<1||s)return;const n=this._createInternaTextureIndexMapping();this.releaseInternalTextures(),this._createInternalTextures(),o&&(this._releaseTextures(),this._createTextures(l));const m=this._renderTarget.textures;for(let d=0;d<m.length;d++){const I=this._textures[d];n[d]!==void 0&&this._renderTarget.setTexture(m[n[d]],d),I._texture=m[d],I._texture&&(I._noMipmap=!I._texture.useMipMaps,I._useSRGBBuffer=I._texture._useSRGBBuffer)}this.samples!==1&&this._renderTarget.setSamples(this.samples,!this._drawOnlyOnFirstAttachmentByDefault,!0)}_createInternalTextures(){this._renderTarget=this._getEngine().createMultipleRenderTarget(this._size,this._multiRenderTargetOptions,!this._drawOnlyOnFirstAttachmentByDefault),this._texture=this._renderTarget.texture}_releaseTextures(){if(this._textures)for(let s=0;s<this._textures.length;s++)this._textures[s]._texture=null,this._textures[s].dispose()}_createTextures(s){const o=this._renderTarget.textures;this._textures=[];for(let l=0;l<o.length;l++){const n=new Pe(null,this.getScene());s?.[l]&&(n.name=s[l]),n._texture=o[l],n._texture&&(n._noMipmap=!n._texture.useMipMaps,n._useSRGBBuffer=n._texture._useSRGBBuffer),this._textures.push(n)}}setInternalTexture(s,o,l=!0){if(this.renderTarget&&(o===0&&(this._texture=s),this.renderTarget.setTexture(s,o,l),this.textures[o]||(this.textures[o]=new Pe(null,this.getScene()),this.textures[o].name=this._textureNames?.[o]??this.textures[o].name),this.textures[o]._texture=s,this.textures[o]._noMipmap=!s.useMipMaps,this.textures[o]._useSRGBBuffer=s._useSRGBBuffer,this._count=this.renderTarget.textures?this.renderTarget.textures.length:0,this._multiRenderTargetOptions.types&&(this._multiRenderTargetOptions.types[o]=s.type),this._multiRenderTargetOptions.samplingModes&&(this._multiRenderTargetOptions.samplingModes[o]=s.samplingMode),this._multiRenderTargetOptions.useSRGBBuffers&&(this._multiRenderTargetOptions.useSRGBBuffers[o]=s._useSRGBBuffer),this._multiRenderTargetOptions.targetTypes&&this._multiRenderTargetOptions.targetTypes[o]!==-1)){let n;s.is2DArray?n=35866:s.isCube?n=34067:s.is3D?n=32879:n=3553,this._multiRenderTargetOptions.targetTypes[o]=n}}setLayerAndFaceIndex(s,o=-1,l=-1){!this.textures[s]||!this.renderTarget||(this._multiRenderTargetOptions.layerIndex&&(this._multiRenderTargetOptions.layerIndex[s]=o),this._multiRenderTargetOptions.faceIndex&&(this._multiRenderTargetOptions.faceIndex[s]=l),this.renderTarget.setLayerAndFaceIndex(s,o,l))}setLayerAndFaceIndices(s,o){this.renderTarget&&(this._multiRenderTargetOptions.layerIndex=s,this._multiRenderTargetOptions.faceIndex=o,this.renderTarget.setLayerAndFaceIndices(s,o))}get samples(){return this._samples}set samples(s){this._renderTarget?this._samples=this._renderTarget.setSamples(s):this._samples=s}resize(s){this._processSizeParameter(s),this._rebuild(!1,void 0,this._textureNames)}updateCount(s,o,l){this._multiRenderTargetOptions.textureCount=s,this._count=s;const n=[],m=[],d=[],I=[],k=[],U=[],M=[],N=[];this._textureNames=l,this._initTypes(s,n,m,d,I,k,U,M,N,o),this._multiRenderTargetOptions.types=n,this._multiRenderTargetOptions.samplingModes=m,this._multiRenderTargetOptions.useSRGBBuffers=d,this._multiRenderTargetOptions.formats=I,this._multiRenderTargetOptions.targetTypes=k,this._multiRenderTargetOptions.faceIndex=U,this._multiRenderTargetOptions.layerIndex=M,this._multiRenderTargetOptions.layerCounts=N,this._multiRenderTargetOptions.labels=l,this._rebuild(!1,!0,l)}_unbindFrameBuffer(s,o){this._renderTarget&&s.unBindMultiColorAttachmentFramebuffer(this._renderTarget,this.isCube,()=>{this.onAfterRenderObservable.notifyObservers(o)})}dispose(s=!1){this._releaseTextures(),s?this._texture=null:this.releaseInternalTextures(),super.dispose()}releaseInternalTextures(){const s=this._renderTarget?.textures;if(s){for(let o=s.length-1;o>=0;o--)this._textures[o]._texture=null;this._renderTarget?.dispose(),this._renderTarget=null}}}class Vo{constructor(s){this.name=wt.NAME_GEOMETRYBUFFERRENDERER,this.scene=s}register(){this.scene._gatherRenderTargetsStage.registerStep(wt.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER,this,this._gatherRenderTargets)}rebuild(){}dispose(){}_gatherRenderTargets(s){this.scene._geometryBufferRenderer&&s.push(this.scene._geometryBufferRenderer.getGBuffer())}}let kl=!1;function Xo(r){kl||(kl=!0,Object.defineProperty(zt.prototype,"geometryBufferRenderer",{get:function(){return this._geometryBufferRenderer},set:function(s){s&&s.isSupported&&(this._geometryBufferRenderer=s)},enumerable:!0,configurable:!0}),zt.prototype.enableGeometryBufferRenderer=function(s=1,o=15,l){return this._geometryBufferRenderer?this._geometryBufferRenderer:(this._geometryBufferRenderer=new r(this,s,o,l),this._geometryBufferRenderer.isSupported||(this._geometryBufferRenderer=null),this._geometryBufferRenderer)},zt.prototype.disableGeometryBufferRenderer=function(){this._geometryBufferRenderer&&(this._geometryBufferRenderer.dispose(),this._geometryBufferRenderer=null)},r._SceneComponentInitialization=s=>{let o=s._getComponent(wt.NAME_GEOMETRYBUFFERRENDERER);o||(o=new Vo(s),s._addComponent(o))})}const Yo=["diffuseSampler","bumpSampler","reflectivitySampler","albedoSampler","morphTargets","boneSampler","transmissionWeightSampler","subsurfaceWeightSampler","iblShadowSampler"],Zo=["world","mBones","viewProjection","diffuseMatrix","view","previousWorld","previousViewProjection","mPreviousBones","bumpMatrix","reflectivityMatrix","albedoMatrix","reflectivityColor","albedoColor","reflectionMatrix","vTransmissionWeight","vSubsurfaceWeight","vEyePosition","vTransmissionScatterAnisotropy","vSubsurfaceScatterAnisotropy","shadowTextureSize","metallic","glossiness","vTangentSpaceParams","vBumpInfos","morphTargetInfluences","morphTargetCount","morphTargetTextureInfo","morphTargetTextureIndices","boneTextureInfo"];class D{get normalsAreUnsigned(){return this._normalsAreUnsigned}_linkPrePassRenderer(s){this._linkedWithPrePass=!0,this._prePassRenderer=s,this._multiRenderTarget&&(this._multiRenderTarget.onClearObservable.clear(),this._multiRenderTarget.onClearObservable.add(()=>{}))}_unlinkPrePassRenderer(){this._linkedWithPrePass=!1,this._createRenderTargets()}_resetLayout(){this._enableDepth=!0,this._enableNormal=!0,this._enablePosition=!1,this._enableReflectivity=!1,this._enableVelocity=!1,this._enableVelocityLinear=!1,this._enableScreenspaceDepth=!1,this._enableIrradiance=!1,this._attachmentsFromPrePass=[]}_forceTextureType(s,o){s===D.POSITION_TEXTURE_TYPE?(this._positionIndex=o,this._enablePosition=!0):s===D.VELOCITY_TEXTURE_TYPE?(this._velocityIndex=o,this._enableVelocity=!0):s===D.VELOCITY_LINEAR_TEXTURE_TYPE?(this._velocityLinearIndex=o,this._enableVelocityLinear=!0):s===D.REFLECTIVITY_TEXTURE_TYPE?(this._reflectivityIndex=o,this._enableReflectivity=!0):s===D.DEPTH_TEXTURE_TYPE?(this._depthIndex=o,this._enableDepth=!0):s===D.NORMAL_TEXTURE_TYPE?(this._normalIndex=o,this._enableNormal=!0):s===D.SCREENSPACE_DEPTH_TEXTURE_TYPE?(this._screenspaceDepthIndex=o,this._enableScreenspaceDepth=!0):s===D.IRRADIANCE_TEXTURE_TYPE&&(this._irradianceIndex=o,this._enableIrradiance=!0)}_setAttachments(s){this._attachmentsFromPrePass=s}_linkInternalTexture(s){this._multiRenderTarget.setInternalTexture(s,0,!1)}get renderList(){return this._multiRenderTarget.renderList}set renderList(s){this._multiRenderTarget.renderList=s}get isSupported(){return this._multiRenderTarget.isSupported}getTextureIndex(s){switch(s){case D.POSITION_TEXTURE_TYPE:return this._positionIndex;case D.VELOCITY_TEXTURE_TYPE:return this._velocityIndex;case D.VELOCITY_LINEAR_TEXTURE_TYPE:return this._velocityLinearIndex;case D.REFLECTIVITY_TEXTURE_TYPE:return this._reflectivityIndex;case D.DEPTH_TEXTURE_TYPE:return this._depthIndex;case D.NORMAL_TEXTURE_TYPE:return this._normalIndex;case D.SCREENSPACE_DEPTH_TEXTURE_TYPE:return this._screenspaceDepthIndex;case D.IRRADIANCE_TEXTURE_TYPE:return this._irradianceIndex;default:return-1}}get enableDepth(){return this._enableDepth}set enableDepth(s){this._enableDepth=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableNormal(){return this._enableNormal}set enableNormal(s){this._enableNormal=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enablePosition(){return this._enablePosition}set enablePosition(s){this._enablePosition=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableVelocity(){return this._enableVelocity}set enableVelocity(s){this._enableVelocity=s,s||(this._previousTransformationMatrices={}),this._linkedWithPrePass||(this.dispose(),this._createRenderTargets()),this._scene.needsPreviousWorldMatrices=s}get enableVelocityLinear(){return this._enableVelocityLinear}set enableVelocityLinear(s){this._enableVelocityLinear=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableReflectivity(){return this._enableReflectivity}set enableReflectivity(s){this._enableReflectivity=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableScreenspaceDepth(){return this._enableScreenspaceDepth}set enableScreenspaceDepth(s){this._enableScreenspaceDepth=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get enableIrradiance(){return this._enableIrradiance}set enableIrradiance(s){this._enableIrradiance=s,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())}get scene(){return this._scene}get ratio(){return typeof this._ratioOrDimensions=="object"?1:this._ratioOrDimensions}get shaderLanguage(){return this._shaderLanguage}constructor(s,o=1,l=15,n){this._previousTransformationMatrices={},this._previousBonesTransformationMatrices={},this.excludedSkinnedMeshesFromVelocity=[],this.renderTransparentMeshes=!0,this.generateNormalsInWorldSpace=!1,this._normalsAreUnsigned=!1,this._resizeObserver=null,this._enableDepth=!0,this._enableNormal=!0,this._enablePosition=!1,this._enableVelocity=!1,this._enableVelocityLinear=!1,this._enableReflectivity=!1,this._enableScreenspaceDepth=!1,this._enableIrradiance=!1,this._clearColor=new Gt(0,0,0,0),this._clearDepthColor=new Gt(0,0,0,1),this._positionIndex=-1,this._velocityIndex=-1,this._velocityLinearIndex=-1,this._reflectivityIndex=-1,this._depthIndex=-1,this._normalIndex=-1,this._screenspaceDepthIndex=-1,this._irradianceIndex=-1,this._linkedWithPrePass=!1,this.generateIrradianceWithScatterMask=!1,this.useSpecificClearForDepthTexture=!1,this._shaderLanguage=0,this._shadersLoaded=!1,this._scene=s,this._ratioOrDimensions=o,this._useUbo=s.getEngine().supportsUniformBuffers,this._depthFormat=l,this._textureTypesAndFormats=n||{},this._initShaderSourceAsync(),Xo(D),D._SceneComponentInitialization(this._scene),this._createRenderTargets()}async _initShaderSourceAsync(){this._scene.getEngine().isWebGPU&&!D.ForceGLSL?(this._shaderLanguage=1,await Promise.all([be(()=>import("./geometry.vertex-C4cLov7Q.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),be(()=>import("./geometry.fragment-Dr1pGbVQ.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,4,14,15]),import.meta.url)])):await Promise.all([be(()=>import("./geometry.vertex--elQa6vQ.js"),__vite__mapDeps([16,1,2]),import.meta.url),be(()=>import("./geometry.fragment-BEdt-FQu.js"),__vite__mapDeps([17,1,2,18]),import.meta.url)]),this._shadersLoaded=!0}isReady(s,o){if(!this._shadersLoaded)return!1;const l=s.getMaterial();if(l&&l.disableDepthWrite||s.getMesh().getClassName()==="GaussianSplattingMesh")return!1;const n=[],m=[$.PositionKind],d=s.getMesh();d.isVerticesDataPresent($.NormalKind)&&(n.push("#define HAS_NORMAL_ATTRIBUTE"),m.push($.NormalKind));let k=!1,U=!1;const M=!1;if(l){let v=!1;if(l.needAlphaTestingForMesh(d)&&l.getAlphaTestTexture()&&(n.push("#define ALPHATEST"),n.push(`#define ALPHATEST_UV${l.getAlphaTestTexture().coordinatesIndex+1}`),v=!0),(l.bumpTexture||l.normalTexture||l.geometryNormalTexture)&&ae.BumpTextureEnabled){const x=l.bumpTexture||l.normalTexture||l.geometryNormalTexture;n.push("#define BUMP"),n.push(`#define BUMP_UV${x.coordinatesIndex+1}`),v=!0}if(this._enableReflectivity){let x=!1;if(l.getClassName()==="PBRMetallicRoughnessMaterial")l.metallicRoughnessTexture&&(n.push("#define ORMTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.metallicRoughnessTexture.coordinatesIndex+1}`),n.push("#define METALLICWORKFLOW"),v=!0,x=!0),l.metallic!=null&&(n.push("#define METALLIC"),n.push("#define METALLICWORKFLOW"),x=!0),l.roughness!=null&&(n.push("#define ROUGHNESS"),n.push("#define METALLICWORKFLOW"),x=!0),x&&(l.baseTexture&&(n.push("#define ALBEDOTEXTURE"),n.push(`#define ALBEDO_UV${l.baseTexture.coordinatesIndex+1}`),l.baseTexture.gammaSpace&&n.push("#define GAMMAALBEDO"),v=!0),l.baseColor&&n.push("#define ALBEDOCOLOR"));else if(l.getClassName()==="PBRSpecularGlossinessMaterial")l.specularGlossinessTexture?(n.push("#define SPECULARGLOSSINESSTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.specularGlossinessTexture.coordinatesIndex+1}`),v=!0,l.specularGlossinessTexture.gammaSpace&&n.push("#define GAMMAREFLECTIVITYTEXTURE")):l.specularColor&&n.push("#define REFLECTIVITYCOLOR"),l.glossiness!=null&&n.push("#define GLOSSINESS");else if(l.getClassName()==="PBRMaterial")l.metallicTexture&&(n.push("#define ORMTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.metallicTexture.coordinatesIndex+1}`),n.push("#define METALLICWORKFLOW"),v=!0,x=!0),l.metallic!=null&&(n.push("#define METALLIC"),n.push("#define METALLICWORKFLOW"),x=!0),l.roughness!=null&&(n.push("#define ROUGHNESS"),n.push("#define METALLICWORKFLOW"),x=!0),x?(l.albedoTexture&&(n.push("#define ALBEDOTEXTURE"),n.push(`#define ALBEDO_UV${l.albedoTexture.coordinatesIndex+1}`),l.albedoTexture.gammaSpace&&n.push("#define GAMMAALBEDO"),v=!0),l.albedoColor&&n.push("#define ALBEDOCOLOR")):(l.reflectivityTexture?(n.push("#define SPECULARGLOSSINESSTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.reflectivityTexture.coordinatesIndex+1}`),l.reflectivityTexture.gammaSpace&&n.push("#define GAMMAREFLECTIVITYTEXTURE"),v=!0):l.reflectivityColor&&n.push("#define REFLECTIVITYCOLOR"),l.microSurface!=null&&n.push("#define GLOSSINESS"));else if(l.getClassName()==="StandardMaterial")l.specularTexture&&(n.push("#define REFLECTIVITYTEXTURE"),n.push(`#define REFLECTIVITY_UV${l.specularTexture.coordinatesIndex+1}`),l.specularTexture.gammaSpace&&n.push("#define GAMMAREFLECTIVITYTEXTURE"),v=!0),l.specularColor&&n.push("#define REFLECTIVITYCOLOR");else if(l.getClassName()==="OpenPBRMaterial"){const A=l;n.push("#define METALLIC"),n.push("#define ROUGHNESS"),A._useRoughnessFromMetallicTextureGreen&&A.baseMetalnessTexture?(n.push("#define ORMTEXTURE"),n.push(`#define REFLECTIVITY_UV${A.baseMetalnessTexture.coordinatesIndex+1}`),v=!0):A.baseMetalnessTexture?(n.push("#define METALLIC_TEXTURE"),n.push(`#define METALLIC_UV${A.baseMetalnessTexture.coordinatesIndex+1}`),v=!0):A.specularRoughnessTexture&&(n.push("#define ROUGHNESS_TEXTURE"),n.push(`#define ROUGHNESS_UV${A.specularRoughnessTexture.coordinatesIndex+1}`),v=!0),A.baseColorTexture&&(n.push("#define ALBEDOTEXTURE"),n.push(`#define ALBEDO_UV${A.baseColorTexture.coordinatesIndex+1}`),A.baseColorTexture.gammaSpace&&n.push("#define GAMMAALBEDO"),v=!0),A.baseColor&&n.push("#define ALBEDOCOLOR")}}if(this._enableIrradiance&&this.generateIrradianceWithScatterMask&&(n.push("#define IRRADIANCE_SCATTER_MASK"),l.getClassName()==="OpenPBRMaterial")){const x=l;x.subsurfaceWeight>0&&x.subsurfaceWeightTexture&&(n.push("#define SUBSURFACE_WEIGHT"),n.push(`#define SUBSURFACEWEIGHT_UV${x.subsurfaceWeightTexture.coordinatesIndex+1}`),v=!0),x.transmissionWeight>0&&x.transmissionWeightTexture&&(n.push("#define TRANSMISSION_WEIGHT"),n.push(`#define TRANSMISSIONWEIGHT_UV${x.transmissionWeightTexture.coordinatesIndex+1}`),v=!0)}v&&(n.push("#define NEED_UV"),d.isVerticesDataPresent($.UVKind)&&(m.push($.UVKind),n.push("#define UV1"),k=!0),d.isVerticesDataPresent($.UV2Kind)&&(m.push($.UV2Kind),n.push("#define UV2"),U=!0))}if(this._enableDepth&&(n.push("#define DEPTH"),n.push("#define DEPTH_INDEX "+this._depthIndex)),this._enableNormal&&(n.push("#define NORMAL"),n.push("#define NORMAL_INDEX "+this._normalIndex)),this._enablePosition&&(n.push("#define POSITION"),n.push("#define POSITION_INDEX "+this._positionIndex)),this._enableVelocity&&(n.push("#define VELOCITY"),n.push("#define VELOCITY_INDEX "+this._velocityIndex),this.excludedSkinnedMeshesFromVelocity.indexOf(d)===-1&&n.push("#define BONES_VELOCITY_ENABLED")),this._enableVelocityLinear&&(n.push("#define VELOCITY_LINEAR"),n.push("#define VELOCITY_LINEAR_INDEX "+this._velocityLinearIndex),this.excludedSkinnedMeshesFromVelocity.indexOf(d)===-1&&n.push("#define BONES_VELOCITY_ENABLED")),this._enableReflectivity&&(n.push("#define REFLECTIVITY"),n.push("#define REFLECTIVITY_INDEX "+this._reflectivityIndex)),this._enableScreenspaceDepth&&this._screenspaceDepthIndex!==-1&&(n.push("#define SCREENSPACE_DEPTH_INDEX "+this._screenspaceDepthIndex),n.push("#define SCREENSPACE_DEPTH")),this._enableIrradiance&&this._irradianceIndex!==-1){n.push("#define IRRADIANCE_INDEX "+this._irradianceIndex),n.push("#define IRRADIANCE");const v=this._scene;if(v.environmentTexture){const x={};let A=!1,W=0;(l.getClassName()==="OpenPBRMaterial"||l.getClassName()==="StandardMaterial"||l.getClassName()==="PBRMetallicRoughnessMaterial"||l.getClassName()==="PBRSpecularGlossinessMaterial"||l.getClassName()==="PBRMaterial")&&(A=!!l.realtimeFiltering,W=l.realtimeFilteringQuality||0),Ul(v,v.environmentTexture,x,A,W,!0);for(const y in x)x[y]&&n.push("#define "+y);x.USEIRRADIANCEMAP||n.push("#define SPHERICAL_HARMONICS");const G=v.postProcessRenderPipelineManager.supportedPipelines.find(y=>y.getClassName()==="IBLShadowsRenderPipeline");if(G){const y=G;y._getAccumulatedTexture()&&(n.push("#define IBL_SHADOW_TEXTURE"),y.coloredShadows&&n.push("#define COLORED_IBL_SHADOWS"))}}}this.generateNormalsInWorldSpace&&n.push("#define NORMAL_WORLDSPACE"),this._normalsAreUnsigned&&n.push("#define ENCODE_NORMAL"),d.useBones&&d.computeBonesUsingShaders&&d.skeleton?(m.push($.MatricesIndicesKind),m.push($.MatricesWeightsKind),d.numBoneInfluencers>4&&(m.push($.MatricesIndicesExtraKind),m.push($.MatricesWeightsExtraKind)),n.push("#define NUM_BONE_INFLUENCERS "+d.numBoneInfluencers),n.push("#define BONETEXTURE "+d.skeleton.isUsingTextureForMatrices),n.push("#define BonesPerMesh "+(d.skeleton.bones.length+1))):(n.push("#define NUM_BONE_INFLUENCERS 0"),n.push("#define BONETEXTURE false"),n.push("#define BonesPerMesh 0"));const N=d.morphTargetManager?Kl(d.morphTargetManager,n,m,d,!0,!0,!1,k,U,M):0;o&&(n.push("#define INSTANCES"),jl(m,this._enableVelocity||this._enableVelocityLinear),s.getRenderingMesh().hasThinInstances&&n.push("#define THIN_INSTANCES")),this._linkedWithPrePass?n.push("#define SCENE_MRT_COUNT "+this._attachmentsFromPrePass.length):n.push("#define SCENE_MRT_COUNT "+this._multiRenderTarget.textures.length),Ql(l,this._scene,n);const J=this._scene.getEngine(),se=s._getDrawWrapper(void 0,!0),_e=se.defines,te=n.join(`
|
|
3
|
+
`);return _e!==te&&se.setEffect(J.createEffect("geometry",{attributes:m,uniformsNames:Zo,samplers:Yo,defines:te,onCompiled:null,fallbacks:null,onError:null,uniformBuffersNames:["Scene"],indexParameters:{buffersCount:this._multiRenderTarget.textures.length-1,maxSimultaneousMorphTargets:N},shaderLanguage:this.shaderLanguage},J),te),se.effect.isReady()}getGBuffer(){return this._multiRenderTarget}get samples(){return this._multiRenderTarget.samples}set samples(s){this._multiRenderTarget.samples=s}dispose(){this._resizeObserver&&(this._scene.getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this._multiRenderTarget?.renderTarget&&this.scene.getEngine()._currentRenderTarget===this._multiRenderTarget.renderTarget&&this.scene.getEngine().unBindFramebuffer(this._multiRenderTarget?.renderTarget),this.getGBuffer().dispose()}_assignRenderTargetIndices(){const s=[],o=[];let l=0;return this._enableDepth&&(this._depthIndex=l,l++,s.push("gBuffer_Depth"),o.push(this._textureTypesAndFormats[D.DEPTH_TEXTURE_TYPE])),this._enableNormal&&(this._normalIndex=l,l++,s.push("gBuffer_Normal"),o.push(this._textureTypesAndFormats[D.NORMAL_TEXTURE_TYPE])),this._enablePosition&&(this._positionIndex=l,l++,s.push("gBuffer_Position"),o.push(this._textureTypesAndFormats[D.POSITION_TEXTURE_TYPE])),this._enableVelocity&&(this._velocityIndex=l,l++,s.push("gBuffer_Velocity"),o.push(this._textureTypesAndFormats[D.VELOCITY_TEXTURE_TYPE])),this._enableVelocityLinear&&(this._velocityLinearIndex=l,l++,s.push("gBuffer_VelocityLinear"),o.push(this._textureTypesAndFormats[D.VELOCITY_LINEAR_TEXTURE_TYPE])),this._enableReflectivity&&(this._reflectivityIndex=l,l++,s.push("gBuffer_Reflectivity"),o.push(this._textureTypesAndFormats[D.REFLECTIVITY_TEXTURE_TYPE])),this._enableScreenspaceDepth&&(this._screenspaceDepthIndex=l,l++,s.push("gBuffer_ScreenspaceDepth"),o.push(this._textureTypesAndFormats[D.SCREENSPACE_DEPTH_TEXTURE_TYPE])),this._enableIrradiance&&(this._irradianceIndex=l,l++,s.push("gBuffer_Irradiance"),o.push(this._textureTypesAndFormats[D.IRRADIANCE_TEXTURE_TYPE])),[l,s,o]}_createRenderTargets(){const s=this._scene.getEngine(),[o,l,n]=this._assignRenderTargetIndices();let m=0;s._caps.textureFloat&&s._caps.textureFloatLinearFiltering?m=1:s._caps.textureHalfFloat&&s._caps.textureHalfFloatLinearFiltering&&(m=2);const d=this._ratioOrDimensions.width!==void 0?this._ratioOrDimensions:{width:s.getRenderWidth()*this._ratioOrDimensions,height:s.getRenderHeight()*this._ratioOrDimensions},I=[],k=[],U=[];for(const x of n)x?(I.push(x.textureType),k.push(x.textureFormat),U.push(x.samplingMode??2)):(I.push(m),k.push(5),U.push(2));if(this._normalsAreUnsigned=I[D.NORMAL_TEXTURE_TYPE]===11||I[D.NORMAL_TEXTURE_TYPE]===13,this._multiRenderTarget=new Ho("gBuffer",d,o,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,types:I,formats:k,samplingModes:U,depthTextureFormat:this._depthFormat},l.concat("gBuffer_DepthBuffer")),!this.isSupported)return;this._multiRenderTarget.wrapU=Pe.CLAMP_ADDRESSMODE,this._multiRenderTarget.wrapV=Pe.CLAMP_ADDRESSMODE,this._multiRenderTarget.refreshRate=1,this._multiRenderTarget.renderParticles=!1,this._multiRenderTarget.renderList=null;const M=[!0],N=[!1],J=[!0];for(let x=1;x<o;++x)M.push(!0),J.push(!1),N.push(!0);const se=s.buildTextureLayout(M),_e=s.buildTextureLayout(N),te=s.buildTextureLayout(J);this._multiRenderTarget.onClearObservable.add(x=>{x.bindAttachments(this.useSpecificClearForDepthTexture?_e:se),x.clear(this._clearColor,!0,!0,!0),this.useSpecificClearForDepthTexture&&(x.bindAttachments(te),x.clear(this._clearDepthColor,!0,!0,!0)),x.bindAttachments(se)}),this._resizeObserver=s.onResizeObservable.add(()=>{if(this._multiRenderTarget){const x=this._ratioOrDimensions.width!==void 0?this._ratioOrDimensions:{width:s.getRenderWidth()*this._ratioOrDimensions,height:s.getRenderHeight()*this._ratioOrDimensions};this._multiRenderTarget.resize(x)}});const v=x=>{const A=x.getRenderingMesh(),W=x.getEffectiveMesh(),G=this._scene,y=G.getEngine(),T=x.getMaterial();if(!T)return;if(W._internalAbstractMeshDataInfo._isActiveIntermediate=!1,(this._enableVelocity||this._enableVelocityLinear)&&!this._previousTransformationMatrices[W.uniqueId]&&(this._previousTransformationMatrices[W.uniqueId]={world:ql.Identity(),viewProjection:G.getTransformMatrix()},A.skeleton)){const g=A.skeleton.getTransformMatrices(A);this._previousBonesTransformationMatrices[A.uniqueId]=this._copyBonesTransformationMatrices(g,new Float32Array(g.length))}const le=A._getInstancesRenderList(x._id,!!x.getReplacementMesh());if(le.mustReturn)return;const ie=y.getCaps().instancedArrays&&(le.visibleInstances[x._id]!==null||A.hasThinInstances),V=W.getWorldMatrix();if(this.isReady(x,ie)){const g=x._getDrawWrapper();if(!g)return;const f=g.effect;y.enableEffect(g),ie||A._bind(x,f,T.fillMode),this._useUbo?($l(f,this._scene.getSceneUniformBuffer()),this._scene.finalizeSceneUbo()):(f.setMatrix("viewProjection",G.getTransformMatrix()),f.setMatrix("view",G.getViewMatrix()),this._scene.bindEyePosition(f,"vEyePosition"));let fe;if(!A._instanceDataStorage.isFrozen&&(T.backFaceCulling||T.sideOrientation!==null)){const R=W._getWorldMatrixDeterminant();fe=T._getEffectiveOrientation(A),R<0&&(fe=fe===ne.ClockWiseSideOrientation?ne.CounterClockWiseSideOrientation:ne.ClockWiseSideOrientation)}else fe=A._effectiveSideOrientation;if(T._preBind(g,fe),T.needAlphaTestingForMesh(W)){const R=T.getAlphaTestTexture();R&&(f.setTexture("diffuseSampler",R),f.setMatrix("diffuseMatrix",R.getTextureMatrix()))}if((T.bumpTexture||T.normalTexture||T.geometryNormalTexture)&&G.getEngine().getCaps().standardDerivatives&&ae.BumpTextureEnabled){const R=T.bumpTexture||T.normalTexture||T.geometryNormalTexture;f.setFloat3("vBumpInfos",R.coordinatesIndex,1/R.level,T.parallaxScaleBias),f.setMatrix("bumpMatrix",R.getTextureMatrix()),f.setTexture("bumpSampler",R),f.setFloat2("vTangentSpaceParams",T.invertNormalMapX?-1:1,T.invertNormalMapY?-1:1)}if(this._enableReflectivity){if(T.getClassName()==="PBRMetallicRoughnessMaterial")T.metallicRoughnessTexture!==null&&(f.setTexture("reflectivitySampler",T.metallicRoughnessTexture),f.setMatrix("reflectivityMatrix",T.metallicRoughnessTexture.getTextureMatrix())),T.metallic!==null&&f.setFloat("metallic",T.metallic),T.roughness!==null&&f.setFloat("glossiness",1-T.roughness),T.baseTexture!==null&&(f.setTexture("albedoSampler",T.baseTexture),f.setMatrix("albedoMatrix",T.baseTexture.getTextureMatrix())),T.baseColor!==null&&f.setColor3("albedoColor",T.baseColor);else if(T.getClassName()==="PBRSpecularGlossinessMaterial")T.specularGlossinessTexture!==null?(f.setTexture("reflectivitySampler",T.specularGlossinessTexture),f.setMatrix("reflectivityMatrix",T.specularGlossinessTexture.getTextureMatrix())):T.specularColor!==null&&f.setColor3("reflectivityColor",T.specularColor),T.glossiness!==null&&f.setFloat("glossiness",T.glossiness);else if(T.getClassName()==="PBRMaterial")T.metallicTexture!==null&&(f.setTexture("reflectivitySampler",T.metallicTexture),f.setMatrix("reflectivityMatrix",T.metallicTexture.getTextureMatrix())),T.metallic!==null&&f.setFloat("metallic",T.metallic),T.roughness!==null&&f.setFloat("glossiness",1-T.roughness),T.roughness!==null||T.metallic!==null||T.metallicTexture!==null?(T.albedoTexture!==null&&(f.setTexture("albedoSampler",T.albedoTexture),f.setMatrix("albedoMatrix",T.albedoTexture.getTextureMatrix())),T.albedoColor!==null&&f.setColor3("albedoColor",T.albedoColor)):(T.reflectivityTexture!==null?(f.setTexture("reflectivitySampler",T.reflectivityTexture),f.setMatrix("reflectivityMatrix",T.reflectivityTexture.getTextureMatrix())):T.reflectivityColor!==null&&f.setColor3("reflectivityColor",T.reflectivityColor),T.microSurface!==null&&f.setFloat("glossiness",T.microSurface));else if(T.getClassName()==="StandardMaterial")T.specularTexture!==null&&(f.setTexture("reflectivitySampler",T.specularTexture),f.setMatrix("reflectivityMatrix",T.specularTexture.getTextureMatrix())),T.specularColor!==null&&f.setColor3("reflectivityColor",T.specularColor);else if(T.getClassName()==="OpenPBRMaterial"){const R=T;R._useRoughnessFromMetallicTextureGreen&&R.baseMetalnessTexture?(f.setTexture("reflectivitySampler",R.baseMetalnessTexture),f.setMatrix("reflectivityMatrix",R.baseMetalnessTexture.getTextureMatrix())):R.baseMetalnessTexture?(f.setTexture("metallicSampler",R.baseMetalnessTexture),f.setMatrix("metallicMatrix",R.baseMetalnessTexture.getTextureMatrix())):R.specularRoughnessTexture&&(f.setTexture("roughnessSampler",R.specularRoughnessTexture),f.setMatrix("roughnessMatrix",R.specularRoughnessTexture.getTextureMatrix())),f.setFloat("metallic",R.baseMetalness),f.setFloat("glossiness",1-R.specularRoughness),R.baseColorTexture!==null&&(f.setTexture("albedoSampler",R.baseColorTexture),f.setMatrix("albedoMatrix",R.baseColorTexture.getTextureMatrix())),R.baseColor!==null&&f.setColor3("albedoColor",R.baseColor)}}if(this._enableIrradiance&&G.environmentTexture){const R=G.environmentTexture,ue=G.postProcessRenderPipelineManager.supportedPipelines.find(E=>E.getClassName()==="IBLShadowsRenderPipeline");if(ue){const Q=ue._getAccumulatedTexture();Q&&(f.setTexture("iblShadowSampler",Q),f.setFloat2("shadowTextureSize",Q.getSize().width,Q.getSize().height))}if(f.setMatrix("reflectionMatrix",R.getReflectionTextureMatrix()),f.setFloat2("vReflectionInfos",R.level*G.iblIntensity,0),f.setTexture("reflectionSampler",R),R.irradianceTexture&&(f.setTexture("irradianceSampler",R.irradianceTexture),R.irradianceTexture._dominantDirection&&f.setVector3("vReflectionDominantDirection",R.irradianceTexture._dominantDirection)),R.sphericalPolynomial){const E=R.sphericalPolynomial;if(E.preScaledHarmonics){const Q=E.preScaledHarmonics;f.setVector3("vSphericalL00",Q.l00),f.setVector3("vSphericalL1_1",Q.l1_1),f.setVector3("vSphericalL10",Q.l10),f.setVector3("vSphericalL11",Q.l11),f.setVector3("vSphericalL2_2",Q.l2_2),f.setVector3("vSphericalL2_1",Q.l2_1),f.setVector3("vSphericalL20",Q.l20),f.setVector3("vSphericalL21",Q.l21),f.setVector3("vSphericalL22",Q.l22)}else f.setFloat3("vSphericalX",E.x.x,E.x.y,E.x.z),f.setFloat3("vSphericalY",E.y.x,E.y.y,E.y.z),f.setFloat3("vSphericalZ",E.z.x,E.z.y,E.z.z),f.setFloat3("vSphericalXX_ZZ",E.xx.x-E.zz.x,E.xx.y-E.zz.y,E.xx.z-E.zz.z),f.setFloat3("vSphericalYY_ZZ",E.yy.x-E.zz.x,E.yy.y-E.zz.y,E.yy.z-E.zz.z),f.setFloat3("vSphericalZZ",E.zz.x,E.zz.y,E.zz.z),f.setFloat3("vSphericalXY",E.xy.x,E.xy.y,E.xy.z),f.setFloat3("vSphericalYZ",E.yz.x,E.yz.y,E.yz.z),f.setFloat3("vSphericalZX",E.zx.x,E.zx.y,E.zx.z)}if(this.generateIrradianceWithScatterMask&&T.getClassName()==="OpenPBRMaterial"){const E=T;f.setFloat("vSubsurfaceWeight",E.subsurfaceWeight),E.subsurfaceWeightTexture&&(f.setTexture("subsurfaceWeightSampler",E.subsurfaceWeightTexture),f.setMatrix("subsurfaceWeightMatrix",E.subsurfaceWeightTexture.getTextureMatrix())),f.setFloat("vTransmissionWeight",E.transmissionWeight),E.transmissionWeightTexture&&(f.setTexture("transmissionWeightSampler",E.transmissionWeightTexture),f.setMatrix("transmissionWeightMatrix",E.transmissionWeightTexture.getTextureMatrix())),f.setFloat("vTransmissionScatterAnisotropy",E.transmissionScatterAnisotropy),f.setFloat("vSubsurfaceScatterAnisotropy",E.subsurfaceScatterAnisotropy)}}if(Wl(f,T,this._scene),A.useBones&&A.computeBonesUsingShaders&&A.skeleton){const R=A.skeleton;if(R.isUsingTextureForMatrices&&f.getUniformIndex("boneTextureInfo")>-1){const ue=R.getTransformMatrixTexture(A);f.setTexture("boneSampler",ue),f.setFloat2("boneTextureInfo",R._textureWidth,R._textureHeight)}else f.setMatrices("mBones",A.skeleton.getTransformMatrices(A));(this._enableVelocity||this._enableVelocityLinear)&&f.setMatrices("mPreviousBones",this._previousBonesTransformationMatrices[A.uniqueId])}wl(A,f),A.morphTargetManager&&A.morphTargetManager.isUsingTextureForTargets&&A.morphTargetManager._bind(f),(this._enableVelocity||this._enableVelocityLinear)&&(f.setMatrix("previousWorld",this._previousTransformationMatrices[W.uniqueId].world),f.setMatrix("previousViewProjection",this._previousTransformationMatrices[W.uniqueId].viewProjection)),ie&&A.hasThinInstances&&f.setMatrix("world",V),A._processRendering(W,x,f,T.fillMode,le,ie,(R,ue)=>{R||f.setMatrix("world",ue)})}(this._enableVelocity||this._enableVelocityLinear)&&(this._previousTransformationMatrices[W.uniqueId].world=V.clone(),this._previousTransformationMatrices[W.uniqueId].viewProjection=this._scene.getTransformMatrix().clone(),A.skeleton&&this._copyBonesTransformationMatrices(A.skeleton.getTransformMatrices(A),this._previousBonesTransformationMatrices[W.uniqueId]))};this._multiRenderTarget.customIsReadyFunction=(x,A,W)=>{if((W||A===0)&&x.subMeshes)for(let G=0;G<x.subMeshes.length;++G){const y=x.subMeshes[G],T=y.getMaterial(),le=y.getRenderingMesh();if(!T)continue;const ie=le._getInstancesRenderList(y._id,!!y.getReplacementMesh()),V=s.getCaps().instancedArrays&&(ie.visibleInstances[y._id]!==null||le.hasThinInstances);if(!this.isReady(y,V))return!1}return!0},this._multiRenderTarget.customRenderFunction=(x,A,W,G)=>{let y;if(this._linkedWithPrePass){if(!this._prePassRenderer.enabled)return;this._scene.getEngine().bindAttachments(this._attachmentsFromPrePass)}if(G.length){for(s.setColorWrite(!1),y=0;y<G.length;y++)v(G.data[y]);s.setColorWrite(!0)}for(y=0;y<x.length;y++)v(x.data[y]);for(s.setDepthWrite(!1),y=0;y<A.length;y++)v(A.data[y]);if(this.renderTransparentMeshes)for(y=0;y<W.length;y++)v(W.data[y]);s.setDepthWrite(!0)}}_copyBonesTransformationMatrices(s,o){for(let l=0;l<s.length;l++)o[l]=s[l];return o}}D.ForceGLSL=!1;D.DEPTH_TEXTURE_TYPE=0;D.NORMAL_TEXTURE_TYPE=1;D.POSITION_TEXTURE_TYPE=2;D.VELOCITY_TEXTURE_TYPE=3;D.REFLECTIVITY_TEXTURE_TYPE=4;D.SCREENSPACE_DEPTH_TEXTURE_TYPE=5;D.VELOCITY_LINEAR_TEXTURE_TYPE=6;D.IRRADIANCE_TEXTURE_TYPE=7;D._SceneComponentInitialization=r=>{throw Jl("GeometryBufferRendererSceneComponent")};const Le={effect:null,subMesh:null};function Hl(r){if(typeof r=="number")return 1;if(r instanceof ve)return 2;if(r instanceof ko||r instanceof Re)return 3;if(r instanceof Gl||r instanceof Gt)return 4;throw new Error("Unsupported OpenPBR property type.")}class Ne{populateVectorFromLinkedProperties(s){const o=Hl(s);for(const l in this.linkedProperties){const n=this.linkedProperties[l],m=n.numComponents;if(o<m||n.targetUniformComponentOffset>o-m){m==1?De.Error(`Float property ${n.name} has an offset that is too large.`):De.Error(`Vector${m} property ${n.name} won't fit in Vector${o} or has an offset that is too large.`);return}typeof n.value=="number"?Ne._tmpArray[n.targetUniformComponentOffset]=n.value:n.value.toArray(Ne._tmpArray,n.targetUniformComponentOffset)}s.fromArray(Ne._tmpArray)}constructor(s,o){this.linkedProperties={},this.firstLinkedKey="",this.name=s,this.numComponents=o}}Ne._tmpArray=[0,0,0,0];class L{constructor(s,o,l,n,m=0,d){this.targetUniformComponentNum=4,this.targetUniformComponentOffset=0,this.name=s,this.targetUniformName=l,this.defaultValue=o,this.value=o,this.targetUniformComponentNum=n,this.targetUniformComponentOffset=m,this.requiredDefine=d}get numComponents(){return typeof this.defaultValue=="number"?1:Hl(this.defaultValue)}}class z{get samplerName(){return this.samplerPrefix+"Sampler"}get samplerInfoName(){return"v"+this.samplerPrefix.charAt(0).toUpperCase()+this.samplerPrefix.slice(1)+"Infos"}get samplerMatrixName(){return this.samplerPrefix+"Matrix"}constructor(s,o,l){this.value=null,this.samplerPrefix="",this.textureDefine="",this.name=s,this.samplerPrefix=o,this.textureDefine=l}}class Ko extends Bo(zo(Uo)){}class jo extends wo(Ko){}class Bl extends Lo(jo){constructor(s){super(s),this.NUM_SAMPLES="0",this.REALTIME_FILTERING=!1,this.IBL_CDF_FILTERING=!1,this.LIGHTCOUNT=0,this.VERTEXCOLOR=!1,this.BAKED_VERTEX_ANIMATION_TEXTURE=!1,this.VERTEXALPHA=!1,this.ALPHATEST=!1,this.DEPTHPREPASS=!1,this.ALPHABLEND=!1,this.ALPHA_FROM_BASE_COLOR_TEXTURE=!1,this.ALPHATESTVALUE="0.5",this.PREMULTIPLYALPHA=!1,this.REFLECTIVITY_GAMMA=!1,this.REFLECTIVITYDIRECTUV=0,this.SPECULARTERM=!1,this.LODBASEDMICROSFURACE=!0,this.SPECULAR_ROUGHNESS_FROM_METALNESS_TEXTURE_GREEN=!1,this.BASE_METALNESS_FROM_METALNESS_TEXTURE_BLUE=!1,this.AOSTOREINMETALMAPRED=!1,this.SPECULAR_WEIGHT_IN_ALPHA=!1,this.SPECULAR_WEIGHT_FROM_SPECULAR_COLOR_TEXTURE=!1,this.SPECULAR_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=!1,this.COAT_ROUGHNESS_FROM_GREEN_CHANNEL=!1,this.COAT_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=!1,this.USE_GLTF_STYLE_ANISOTROPY=!1,this.THIN_FILM_THICKNESS_FROM_THIN_FILM_TEXTURE=!1,this.FUZZ_ROUGHNESS_FROM_TEXTURE_ALPHA=!1,this.SUBSURFACE_WEIGHT_FROM_TEXTURE_ALPHA=!1,this.GEOMETRY_THICKNESS_FROM_GREEN_CHANNEL=!1,this.ENVIRONMENTBRDF=!1,this.ENVIRONMENTBRDF_RGBD=!1,this.FUZZENVIRONMENTBRDF=!1,this.NORMAL=!1,this.TANGENT=!1,this.OBJECTSPACE_NORMALMAP=!1,this.PARALLAX=!1,this.PARALLAX_RHS=!1,this.PARALLAXOCCLUSION=!1,this.NORMALXYSCALE=!0,this.ANISOTROPIC=!1,this.ANISOTROPIC_OPENPBR=!0,this.ANISOTROPIC_BASE=!1,this.ANISOTROPIC_COAT=!1,this.FUZZ_IBL_SAMPLES=6,this.REFRACTION_HIGH_QUALITY_BLUR=!1,this.FUZZ=!1,this.THIN_FILM=!1,this.IRIDESCENCE=!1,this.DISPERSION=!1,this.SCATTERING=!1,this.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING=!1,this.SSS_SAMPLE_COUNT=16,this.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING_GBUFFER=!1,this.TRANSMISSION_SLAB=!1,this.TRANSMISSION_SLAB_VOLUME=!1,this.SUBSURFACE_SLAB=!1,this.GEOMETRY_THIN_WALLED=!1,this.REFRACTED_BACKGROUND=!1,this.REFRACTED_LIGHTS=!1,this.REFRACTED_ENVIRONMENT=!1,this.REFRACTED_ENVIRONMENT_OPPOSITEZ=!1,this.REFRACTED_ENVIRONMENT_LOCAL_CUBE=!1,this.RADIANCEOCCLUSION=!1,this.HORIZONOCCLUSION=!1,this.INSTANCES=!1,this.THIN_INSTANCES=!1,this.INSTANCESCOLOR=!1,this.NUM_BONE_INFLUENCERS=0,this.BonesPerMesh=0,this.BONETEXTURE=!1,this.BONES_VELOCITY_ENABLED=!1,this.NONUNIFORMSCALING=!1,this.MORPHTARGETS=!1,this.MORPHTARGETS_POSITION=!1,this.MORPHTARGETS_NORMAL=!1,this.MORPHTARGETS_TANGENT=!1,this.MORPHTARGETS_UV=!1,this.MORPHTARGETS_UV2=!1,this.MORPHTARGETS_COLOR=!1,this.MORPHTARGETTEXTURE_HASPOSITIONS=!1,this.MORPHTARGETTEXTURE_HASNORMALS=!1,this.MORPHTARGETTEXTURE_HASTANGENTS=!1,this.MORPHTARGETTEXTURE_HASUVS=!1,this.MORPHTARGETTEXTURE_HASUV2S=!1,this.MORPHTARGETTEXTURE_HASCOLORS=!1,this.NUM_MORPH_INFLUENCERS=0,this.MORPHTARGETS_TEXTURE=!1,this.USEPHYSICALLIGHTFALLOFF=!1,this.USEGLTFLIGHTFALLOFF=!1,this.TWOSIDEDLIGHTING=!1,this.MIRRORED=!1,this.SHADOWFLOAT=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.POINTSIZE=!1,this.FOG=!1,this.LOGARITHMICDEPTH=!1,this.CAMERA_ORTHOGRAPHIC=!1,this.CAMERA_PERSPECTIVE=!1,this.AREALIGHTSUPPORTED=!0,this.FORCENORMALFORWARD=!1,this.SPECULARAA=!1,this.UNLIT=!1,this.DECAL_AFTER_DETAIL=!1,this.TEXTURE_REPETITION_MODE=0,this.DEBUGMODE=0,this.USE_VERTEX_PULLING=!1,this.VERTEX_PULLING_USE_INDEX_BUFFER=!1,this.VERTEX_PULLING_INDEX_BUFFER_32BITS=!1,this.RIGHT_HANDED=!1,this.CLUSTLIGHT_SLICES=0,this.CLUSTLIGHT_BATCH=0,this.BRDF_V_HEIGHT_CORRELATED=!0,this.MS_BRDF_ENERGY_CONSERVATION=!0,this.SPHERICAL_HARMONICS=!0,this.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=!0,this.MIX_IBL_RADIANCE_WITH_IRRADIANCE=!0,this.LEGACY_SPECULAR_ENERGY_CONSERVATION=!1,this.BASE_DIFFUSE_MODEL=0,this.DIELECTRIC_SPECULAR_MODEL=1,this.CONDUCTOR_SPECULAR_MODEL=1,this.rebuild()}reset(){super.reset(),this.ALPHATESTVALUE="0.5",this.NORMALXYSCALE=!0}}class Qo extends No(vo){}let qo=(()=>{var r,s,o,l,n,m,d,I,k,U,M,N,J,se,_e,te,v,x,A,W,G,y,T,le,ie,V,g,f,fe,oe,R,ue,E,Q,P,he,q,Te,ce,j,ye,Oe,Ce,Fe,Z,Ee,Se,Me,Ie,ke,Be,ze,Ue,We,we,Ge,He,Ve,Xe,Ye,Ze,Ke,je,Qe,qe,$e,Je,et,tt,st,it,rt,at,nt,lt,ot,ut,ht,ct,_t,ft,Tt,gt,mt,pt,dt,xt,Rt,At,Et,St,Mt,It,bt,yt,Ot,Ct,Ft,Lt,Dt,Pt,Nt,vt;let Ht=Qo,kt=[],Vt,Xt=[],Yt=[],Zt,Kt=[],jt=[],Qt,qt=[],$t=[],Jt,es=[],ts=[],ss,is=[],rs=[],as,ns=[],ls=[],os,us=[],hs=[],cs,_s=[],fs=[],Ts,gs=[],ms=[],ps,ds=[],xs=[],Rs,As=[],Es=[],Ss,Ms=[],Is=[],bs,ys=[],Os=[],Cs,Fs=[],Ls=[],Ds,Ps=[],Ns=[],vs,ks=[],Bs=[],zs,Us=[],Ws=[],ws,Gs=[],Hs=[],Vs,Xs=[],Ys=[],Zs,Ks=[],js=[],Qs,qs=[],$s=[],Js,ei=[],ti=[],si,ii=[],ri=[],ai,ni=[],li=[],oi,ui=[],hi=[],ci,_i=[],fi=[],Ti,gi=[],mi=[],pi,di=[],xi=[],Ri,Ai=[],Ei=[],Si,Mi=[],Ii=[],bi,yi=[],Oi=[],Ci,Fi=[],Li=[],Di,Pi=[],Ni=[],vi,ki=[],Bi=[],zi,Ui=[],Wi=[],wi,Gi=[],Hi=[],Vi,Xi=[],Yi=[],Zi,Ki=[],ji=[],Qi,qi=[],$i=[],Ji,er=[],tr=[],sr,ir=[],rr=[],ar,nr=[],lr=[],or,ur=[],hr=[],cr,_r=[],fr=[],Tr,gr=[],mr=[],pr,dr=[],xr=[],Rr,Ar=[],Er=[],Sr,Mr=[],Ir=[],br,yr=[],Or=[],Cr,Fr=[],Lr=[],Dr,Pr=[],Nr=[],vr,kr=[],Br=[],zr,Ur=[],Wr=[],wr,Gr=[],Hr=[],Vr,Xr=[],Yr=[],Zr,Kr=[],jr=[],Qr,qr=[],$r=[],Jr,ea=[],ta=[],sa,ia=[],ra=[],aa,na=[],la=[],oa,ua=[],ha=[],ca,_a=[],fa=[],Ta,ga=[],ma=[],pa,da=[],xa=[],Ra,Aa=[],Ea=[],Sa,Ma=[],Ia=[],ba,ya=[],Oa=[],Ca,Fa=[],La=[],Da,Pa=[],Na=[],va,ka=[],Ba=[],za,Ua=[],Wa=[],wa,Ga=[],Ha=[],Va,Xa=[],Ya=[],Za,Ka=[],ja=[],Qa,qa=[],$a=[],Ja,en=[],tn=[],sn,rn=[],an=[],nn,ln=[],on=[],un,hn=[],cn=[],_n,fn=[],Tn=[],gn,mn=[],pn=[],dn,xn=[],Rn=[],An,En,Sn,Mn=[],In=[],bn,yn=[],On=[],Cn,Fn=[],Ln=[],Dn,Pn=[],Nn=[],vn,kn=[],Bn=[],zn,Un=[],Wn=[],wn,Gn=[],Hn=[],Vn,Xn=[],Yn=[],Zn,Kn=[],jn=[],Qn,qn=[],$n=[],Jn,el=[],tl=[],sl,il=[],rl=[],al,nl=[],ll=[],ol,ul=[],hl=[],cl,_l=[],fl=[],Tl,gl=[],ml=[],pl,dl=[],xl=[],Rl,Al=[],El=[],Sl,Ml=[],Il=[],bl,yl=[],Ol=[],Cl;return r=class extends Ht{get baseWeight(){return c(this,s,"f")}set baseWeight(e){_(this,s,e,"f")}get baseWeightTexture(){return c(this,o,"f")}set baseWeightTexture(e){_(this,o,e,"f")}get baseColor(){return c(this,l,"f")}set baseColor(e){_(this,l,e,"f")}get baseColorTexture(){return c(this,n,"f")}set baseColorTexture(e){_(this,n,e,"f")}get baseDiffuseRoughness(){return c(this,m,"f")}set baseDiffuseRoughness(e){_(this,m,e,"f")}get baseDiffuseRoughnessTexture(){return c(this,d,"f")}set baseDiffuseRoughnessTexture(e){_(this,d,e,"f")}get baseMetalness(){return c(this,I,"f")}set baseMetalness(e){_(this,I,e,"f")}get baseMetalnessTexture(){return c(this,k,"f")}set baseMetalnessTexture(e){_(this,k,e,"f")}get specularWeight(){return c(this,U,"f")}set specularWeight(e){_(this,U,e,"f")}get specularWeightTexture(){return c(this,M,"f")}set specularWeightTexture(e){_(this,M,e,"f")}get specularColor(){return c(this,N,"f")}set specularColor(e){_(this,N,e,"f")}get specularColorTexture(){return c(this,J,"f")}set specularColorTexture(e){_(this,J,e,"f")}get specularRoughness(){return c(this,se,"f")}set specularRoughness(e){_(this,se,e,"f")}get specularRoughnessTexture(){return c(this,_e,"f")}set specularRoughnessTexture(e){_(this,_e,e,"f")}get specularRoughnessAnisotropy(){return c(this,te,"f")}set specularRoughnessAnisotropy(e){_(this,te,e,"f")}get specularRoughnessAnisotropyTexture(){return c(this,v,"f")}set specularRoughnessAnisotropyTexture(e){_(this,v,e,"f")}get specularIor(){return c(this,x,"f")}set specularIor(e){_(this,x,e,"f")}get transmissionWeight(){return c(this,A,"f")}set transmissionWeight(e){_(this,A,e,"f")}get transmissionWeightTexture(){return c(this,W,"f")}set transmissionWeightTexture(e){_(this,W,e,"f")}get transmissionColor(){return c(this,G,"f")}set transmissionColor(e){_(this,G,e,"f")}get transmissionColorTexture(){return c(this,y,"f")}set transmissionColorTexture(e){_(this,y,e,"f")}get transmissionDepth(){return c(this,T,"f")}set transmissionDepth(e){_(this,T,e,"f")}get transmissionDepthTexture(){return c(this,le,"f")}set transmissionDepthTexture(e){_(this,le,e,"f")}get transmissionScatter(){return c(this,ie,"f")}set transmissionScatter(e){_(this,ie,e,"f")}get transmissionScatterTexture(){return c(this,V,"f")}set transmissionScatterTexture(e){_(this,V,e,"f")}get transmissionScatterAnisotropy(){return c(this,g,"f")}set transmissionScatterAnisotropy(e){_(this,g,e,"f")}get transmissionDispersionScale(){return c(this,f,"f")}set transmissionDispersionScale(e){_(this,f,e,"f")}get transmissionDispersionScaleTexture(){return c(this,fe,"f")}set transmissionDispersionScaleTexture(e){_(this,fe,e,"f")}get transmissionDispersionAbbeNumber(){return c(this,oe,"f")}set transmissionDispersionAbbeNumber(e){_(this,oe,e,"f")}get subsurfaceWeight(){return c(this,R,"f")}set subsurfaceWeight(e){_(this,R,e,"f")}get subsurfaceWeightTexture(){return c(this,ue,"f")}set subsurfaceWeightTexture(e){_(this,ue,e,"f")}get subsurfaceColor(){return c(this,E,"f")}set subsurfaceColor(e){_(this,E,e,"f")}get subsurfaceColorTexture(){return c(this,Q,"f")}set subsurfaceColorTexture(e){_(this,Q,e,"f")}get subsurfaceRadius(){return c(this,P,"f")}set subsurfaceRadius(e){_(this,P,e,"f")}get subsurfaceRadiusScale(){return c(this,he,"f")}set subsurfaceRadiusScale(e){_(this,he,e,"f")}get subsurfaceRadiusScaleTexture(){return c(this,q,"f")}set subsurfaceRadiusScaleTexture(e){_(this,q,e,"f")}get subsurfaceScatterAnisotropy(){return c(this,Te,"f")}set subsurfaceScatterAnisotropy(e){_(this,Te,e,"f")}get coatWeight(){return c(this,ce,"f")}set coatWeight(e){_(this,ce,e,"f")}get coatWeightTexture(){return c(this,j,"f")}set coatWeightTexture(e){_(this,j,e,"f")}get coatColor(){return c(this,ye,"f")}set coatColor(e){_(this,ye,e,"f")}get coatColorTexture(){return c(this,Oe,"f")}set coatColorTexture(e){_(this,Oe,e,"f")}get coatRoughness(){return c(this,Ce,"f")}set coatRoughness(e){_(this,Ce,e,"f")}get coatRoughnessTexture(){return c(this,Fe,"f")}set coatRoughnessTexture(e){_(this,Fe,e,"f")}get coatRoughnessAnisotropy(){return c(this,Z,"f")}set coatRoughnessAnisotropy(e){_(this,Z,e,"f")}get coatRoughnessAnisotropyTexture(){return c(this,Ee,"f")}set coatRoughnessAnisotropyTexture(e){_(this,Ee,e,"f")}get coatIor(){return c(this,Se,"f")}set coatIor(e){_(this,Se,e,"f")}get coatDarkening(){return c(this,Me,"f")}set coatDarkening(e){_(this,Me,e,"f")}get coatDarkeningTexture(){return c(this,Ie,"f")}set coatDarkeningTexture(e){_(this,Ie,e,"f")}get fuzzWeight(){return c(this,ke,"f")}set fuzzWeight(e){_(this,ke,e,"f")}get fuzzWeightTexture(){return c(this,Be,"f")}set fuzzWeightTexture(e){_(this,Be,e,"f")}get fuzzColor(){return c(this,ze,"f")}set fuzzColor(e){_(this,ze,e,"f")}get fuzzColorTexture(){return c(this,Ue,"f")}set fuzzColorTexture(e){_(this,Ue,e,"f")}get fuzzRoughness(){return c(this,We,"f")}set fuzzRoughness(e){_(this,We,e,"f")}get fuzzRoughnessTexture(){return c(this,we,"f")}set fuzzRoughnessTexture(e){_(this,we,e,"f")}get geometryThinWalled(){return c(this,Ge,"f")}set geometryThinWalled(e){_(this,Ge,e,"f")}get geometryNormalTexture(){return c(this,He,"f")}set geometryNormalTexture(e){_(this,He,e,"f")}get geometryTangent(){return c(this,Ve,"f")}set geometryTangent(e){_(this,Ve,e,"f")}get geometryTangentAngle(){return Math.atan2(this.geometryTangent.y,this.geometryTangent.x)}set geometryTangentAngle(e){this.geometryTangent=new ve(Math.cos(e),Math.sin(e))}get geometryTangentTexture(){return c(this,Xe,"f")}set geometryTangentTexture(e){_(this,Xe,e,"f")}get geometryCoatNormalTexture(){return c(this,Ye,"f")}set geometryCoatNormalTexture(e){_(this,Ye,e,"f")}get geometryCoatTangent(){return c(this,Ze,"f")}set geometryCoatTangent(e){_(this,Ze,e,"f")}get geometryCoatTangentAngle(){return Math.atan2(this.geometryCoatTangent.y,this.geometryCoatTangent.x)}set geometryCoatTangentAngle(e){this.geometryCoatTangent=new ve(Math.cos(e),Math.sin(e))}get geometryCoatTangentTexture(){return c(this,Ke,"f")}set geometryCoatTangentTexture(e){_(this,Ke,e,"f")}get geometryOpacity(){return c(this,je,"f")}set geometryOpacity(e){_(this,je,e,"f")}get geometryOpacityTexture(){return c(this,Qe,"f")}set geometryOpacityTexture(e){_(this,Qe,e,"f")}get geometryThickness(){return c(this,qe,"f")}set geometryThickness(e){_(this,qe,e,"f")}get geometryThicknessTexture(){return c(this,$e,"f")}set geometryThicknessTexture(e){_(this,$e,e,"f")}get emissionLuminance(){return c(this,Je,"f")}set emissionLuminance(e){_(this,Je,e,"f")}get emissionColor(){return c(this,et,"f")}set emissionColor(e){_(this,et,e,"f")}get emissionColorTexture(){return c(this,tt,"f")}set emissionColorTexture(e){_(this,tt,e,"f")}get thinFilmWeight(){return c(this,st,"f")}set thinFilmWeight(e){_(this,st,e,"f")}get thinFilmWeightTexture(){return c(this,it,"f")}set thinFilmWeightTexture(e){_(this,it,e,"f")}get thinFilmThickness(){return c(this,rt,"f")}set thinFilmThickness(e){_(this,rt,e,"f")}get thinFilmThicknessMin(){return c(this,at,"f")}set thinFilmThicknessMin(e){_(this,at,e,"f")}get thinFilmThicknessTexture(){return c(this,nt,"f")}set thinFilmThicknessTexture(e){_(this,nt,e,"f")}get thinFilmIor(){return c(this,lt,"f")}set thinFilmIor(e){_(this,lt,e,"f")}get ambientOcclusionTexture(){return c(this,ot,"f")}set ambientOcclusionTexture(e){_(this,ot,e,"f")}get sssQuality(){return this._sssQuality}set sssQuality(e){this._sssQuality!==e&&(this._sssQuality=e,this.markAsDirty(1))}get sssIrradianceTexture(){return this._sssIrradianceTexture}set sssIrradianceTexture(e){this._sssIrradianceTexture!==e&&(this._sssIrradianceTexture=e,this._markAllSubMeshesAsTexturesDirty())}get sssDepthTexture(){return this._sssDepthTexture}set sssDepthTexture(e){this._sssDepthTexture!==e&&(this._sssDepthTexture=e,this._markAllSubMeshesAsTexturesDirty())}get directIntensity(){return c(this,ut,"f")}set directIntensity(e){_(this,ut,e,"f")}get environmentIntensity(){return c(this,ht,"f")}set environmentIntensity(e){_(this,ht,e,"f")}get useSpecularWeightFromTextureAlpha(){return c(this,ct,"f")}set useSpecularWeightFromTextureAlpha(e){_(this,ct,e,"f")}get forceAlphaTest(){return c(this,_t,"f")}set forceAlphaTest(e){_(this,_t,e,"f")}get alphaCutOff(){return c(this,ft,"f")}set alphaCutOff(e){_(this,ft,e,"f")}get useAmbientOcclusionFromMetallicTextureRed(){return c(this,Tt,"f")}set useAmbientOcclusionFromMetallicTextureRed(e){_(this,Tt,e,"f")}get useAmbientInGrayScale(){return c(this,gt,"f")}set useAmbientInGrayScale(e){_(this,gt,e,"f")}get hasTransparency(){return this.subsurfaceWeight>0||this.transmissionWeight>0}get hasScattering(){return this.transmissionWeight>0&&this.transmissionDepth>0&&!this.transmissionScatter.equals(Re.BlackReadOnly)||this.subsurfaceWeight>0}get usePhysicalLightFalloff(){return this._lightFalloff===ne.LIGHTFALLOFF_PHYSICAL}set usePhysicalLightFalloff(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),e?this._lightFalloff=ne.LIGHTFALLOFF_PHYSICAL:this._lightFalloff=ne.LIGHTFALLOFF_STANDARD)}get useGLTFLightFalloff(){return this._lightFalloff===ne.LIGHTFALLOFF_GLTF}set useGLTFLightFalloff(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),e?this._lightFalloff=ne.LIGHTFALLOFF_GLTF:this._lightFalloff=ne.LIGHTFALLOFF_STANDARD)}get useObjectSpaceNormalMap(){return c(this,mt,"f")}set useObjectSpaceNormalMap(e){_(this,mt,e,"f")}get useParallax(){return c(this,pt,"f")}set useParallax(e){_(this,pt,e,"f")}get useParallaxOcclusion(){return c(this,dt,"f")}set useParallaxOcclusion(e){_(this,dt,e,"f")}get parallaxScaleBias(){return c(this,xt,"f")}set parallaxScaleBias(e){_(this,xt,e,"f")}get disableLighting(){return c(this,Rt,"f")}set disableLighting(e){_(this,Rt,e,"f")}get forceIrradianceInFragment(){return c(this,At,"f")}set forceIrradianceInFragment(e){_(this,At,e,"f")}get maxSimultaneousLights(){return c(this,Et,"f")}set maxSimultaneousLights(e){_(this,Et,e,"f")}get invertNormalMapX(){return c(this,St,"f")}set invertNormalMapX(e){_(this,St,e,"f")}get invertNormalMapY(){return c(this,Mt,"f")}set invertNormalMapY(e){_(this,Mt,e,"f")}get twoSidedLighting(){return c(this,It,"f")}set twoSidedLighting(e){_(this,It,e,"f")}get useAlphaFresnel(){return c(this,bt,"f")}set useAlphaFresnel(e){_(this,bt,e,"f")}get useLinearAlphaFresnel(){return c(this,yt,"f")}set useLinearAlphaFresnel(e){_(this,yt,e,"f")}get environmentBRDFTexture(){return c(this,Ot,"f")}set environmentBRDFTexture(e){_(this,Ot,e,"f")}get forceNormalForward(){return c(this,Ct,"f")}set forceNormalForward(e){_(this,Ct,e,"f")}get enableSpecularAntiAliasing(){return c(this,Ft,"f")}set enableSpecularAntiAliasing(e){_(this,Ft,e,"f")}get useHorizonOcclusion(){return c(this,Lt,"f")}set useHorizonOcclusion(e){_(this,Lt,e,"f")}get useRadianceOcclusion(){return c(this,Dt,"f")}set useRadianceOcclusion(e){_(this,Dt,e,"f")}get unlit(){return c(this,Pt,"f")}set unlit(e){_(this,Pt,e,"f")}get applyDecalMapAfterDetailMap(){return c(this,Nt,"f")}set applyDecalMapAfterDetailMap(e){_(this,Nt,e,"f")}get backgroundRefractionTexture(){return this._backgroundRefractionTexture}set backgroundRefractionTexture(e){this._backgroundRefractionTexture=e,this._markAllSubMeshesAsTexturesDirty()}get refractionHighQualityBlur(){return this._refractionHighQualityBlur}set refractionHighQualityBlur(e){this._refractionHighQualityBlur!==e&&(this._refractionHighQualityBlur=e,this.markAsDirty(1))}get realTimeFiltering(){return this._realTimeFiltering}set realTimeFiltering(e){this._realTimeFiltering=e,this.markAsDirty(1)}get realTimeFilteringQuality(){return this._realTimeFilteringQuality}set realTimeFilteringQuality(e){this._realTimeFilteringQuality=e,this.markAsDirty(1)}get fuzzSampleNumber(){return this._fuzzSampleNumber}set fuzzSampleNumber(e){this._fuzzSampleNumber=e,this.markAsDirty(1)}get canRenderToMRT(){return!0}get debugMode(){return c(this,vt,"f")}set debugMode(e){_(this,vt,e,"f")}constructor(e,t,a=!1){super(e,t,void 0,a||r.ForceGLSL),s.set(this,(i(this,kt),i(this,Xt,void 0))),this._baseWeight=(i(this,Yt),new L("base_weight",1,"vBaseWeight",1)),o.set(this,i(this,Kt,void 0)),this._baseWeightTexture=(i(this,jt),new z("base_weight","baseWeight","BASE_WEIGHT")),l.set(this,i(this,qt,void 0)),this._baseColor=(i(this,$t),new L("base_color",Re.White(),"vBaseColor",4)),n.set(this,i(this,es,void 0)),this._baseColorTexture=(i(this,ts),new z("base_color","baseColor","BASE_COLOR")),m.set(this,i(this,is,void 0)),this._baseDiffuseRoughness=(i(this,rs),new L("base_diffuse_roughness",0,"vBaseDiffuseRoughness",1)),d.set(this,i(this,ns,void 0)),this._baseDiffuseRoughnessTexture=(i(this,ls),new z("base_diffuse_roughness","baseDiffuseRoughness","BASE_DIFFUSE_ROUGHNESS")),I.set(this,i(this,us,void 0)),this._baseMetalness=(i(this,hs),new L("base_metalness",0,"vReflectanceInfo",4,0)),k.set(this,i(this,_s,void 0)),this._baseMetalnessTexture=(i(this,fs),new z("base_metalness","baseMetalness","BASE_METALNESS")),U.set(this,i(this,gs,void 0)),this._specularWeight=(i(this,ms),new L("specular_weight",1,"vReflectanceInfo",4,3)),M.set(this,i(this,ds,void 0)),this._specularWeightTexture=(i(this,xs),new z("specular_weight","specularWeight","SPECULAR_WEIGHT")),N.set(this,i(this,As,void 0)),this._specularColor=(i(this,Es),new L("specular_color",Re.White(),"vSpecularColor",4)),J.set(this,i(this,Ms,void 0)),this._specularColorTexture=(i(this,Is),new z("specular_color","specularColor","SPECULAR_COLOR")),se.set(this,i(this,ys,void 0)),this._specularRoughness=(i(this,Os),new L("specular_roughness",.3,"vReflectanceInfo",4,1)),_e.set(this,i(this,Fs,void 0)),this._specularRoughnessTexture=(i(this,Ls),new z("specular_roughness","specularRoughness","SPECULAR_ROUGHNESS")),te.set(this,i(this,Ps,void 0)),this._specularRoughnessAnisotropy=(i(this,Ns),new L("specular_roughness_anisotropy",0,"vSpecularAnisotropy",3,2)),v.set(this,i(this,ks,void 0)),this._specularRoughnessAnisotropyTexture=(i(this,Bs),new z("specular_roughness_anisotropy","specularRoughnessAnisotropy","SPECULAR_ROUGHNESS_ANISOTROPY")),x.set(this,i(this,Us,void 0)),this._specularIor=(i(this,Ws),new L("specular_ior",1.5,"vReflectanceInfo",4,2)),A.set(this,i(this,Gs,void 0)),this._transmissionWeight=(i(this,Hs),new L("transmission_weight",0,"vTransmissionWeight",1)),W.set(this,i(this,Xs,void 0)),this._transmissionWeightTexture=(i(this,Ys),new z("transmission_weight","transmissionWeight","TRANSMISSION_WEIGHT")),G.set(this,i(this,Ks,void 0)),this._transmissionColor=(i(this,js),new L("transmission_color",Re.White(),"vTransmissionColor",3,0)),y.set(this,i(this,qs,void 0)),this._transmissionColorTexture=(i(this,$s),new z("transmission_color","transmissionColor","TRANSMISSION_COLOR")),T.set(this,i(this,ei,void 0)),this._transmissionDepth=(i(this,ti),new L("transmission_depth",0,"vTransmissionDepth",1,0)),le.set(this,i(this,ii,void 0)),this._transmissionDepthTexture=(i(this,ri),new z("transmission_depth","transmissionDepth","TRANSMISSION_DEPTH")),ie.set(this,i(this,ni,void 0)),this._transmissionScatter=(i(this,li),new L("transmission_scatter",Re.Black(),"vTransmissionScatter",3,0)),V.set(this,i(this,ui,void 0)),this._transmissionScatterTexture=(i(this,hi),new z("transmission_scatter","transmissionScatter","TRANSMISSION_SCATTER")),g.set(this,i(this,_i,void 0)),this._transmissionScatterAnisotropy=(i(this,fi),new L("transmission_scatter_anisotropy",0,"vTransmissionScatterAnisotropy",1,0)),f.set(this,i(this,gi,void 0)),this._transmissionDispersionScale=(i(this,mi),new L("transmission_dispersion_scale",0,"vTransmissionDispersionScale",1,0)),fe.set(this,i(this,di,void 0)),this._transmissionDispersionScaleTexture=(i(this,xi),new z("transmission_dispersion_scale","transmissionDispersionScale","TRANSMISSION_DISPERSION_SCALE")),oe.set(this,i(this,Ai,void 0)),this._transmissionDispersionAbbeNumber=(i(this,Ei),new L("transmission_dispersion_abbe_number",20,"vTransmissionDispersionAbbeNumber",1,0)),R.set(this,i(this,Mi,void 0)),this._subsurfaceWeight=(i(this,Ii),new L("subsurface_weight",0,"vSubsurfaceWeight",1,0,"SUBSURFACE_SLAB")),ue.set(this,i(this,yi,void 0)),this._subsurfaceWeightTexture=(i(this,Oi),new z("subsurface_weight","subsurfaceWeight","SUBSURFACE_WEIGHT")),E.set(this,i(this,Fi,void 0)),this._subsurfaceColor=(i(this,Li),new L("subsurface_color",new Re(.8,.8,.8),"vSubsurfaceColor",3,0,"SUBSURFACE_SLAB")),Q.set(this,i(this,Pi,void 0)),this._subsurfaceColorTexture=(i(this,Ni),new z("subsurface_color","subsurfaceColor","SUBSURFACE_COLOR")),P.set(this,i(this,ki,void 0)),this._subsurfaceRadius=(i(this,Bi),new L("subsurface_radius",.1,"vSubsurfaceRadius",1,0,"SUBSURFACE_SLAB")),he.set(this,i(this,Ui,void 0)),this._subsurfaceRadiusScale=(i(this,Wi),new L("subsurface_radius_scale",new Re(1,.5,.25),"vSubsurfaceRadiusScale",3,0,"SUBSURFACE_SLAB")),q.set(this,i(this,Gi,void 0)),this._subsurfaceRadiusScaleTexture=(i(this,Hi),new z("subsurface_radius_scale","subsurfaceRadiusScale","SUBSURFACE_RADIUS_SCALE")),Te.set(this,i(this,Xi,void 0)),this._subsurfaceScatterAnisotropy=(i(this,Yi),new L("subsurface_scatter_anisotropy",0,"vSubsurfaceScatterAnisotropy",1,0,"SUBSURFACE_SLAB")),ce.set(this,i(this,Ki,void 0)),this._coatWeight=(i(this,ji),new L("coat_weight",0,"vCoatWeight",1,0)),j.set(this,i(this,qi,void 0)),this._coatWeightTexture=(i(this,$i),new z("coat_weight","coatWeight","COAT_WEIGHT")),ye.set(this,i(this,er,void 0)),this._coatColor=(i(this,tr),new L("coat_color",Re.White(),"vCoatColor",3,0)),Oe.set(this,i(this,ir,void 0)),this._coatColorTexture=(i(this,rr),new z("coat_color","coatColor","COAT_COLOR")),Ce.set(this,i(this,nr,void 0)),this._coatRoughness=(i(this,lr),new L("coat_roughness",0,"vCoatRoughness",1,0)),Fe.set(this,i(this,ur,void 0)),this._coatRoughnessTexture=(i(this,hr),new z("coat_roughness","coatRoughness","COAT_ROUGHNESS")),Z.set(this,i(this,_r,void 0)),this._coatRoughnessAnisotropy=(i(this,fr),new L("coat_roughness_anisotropy",0,"vCoatRoughnessAnisotropy",1)),Ee.set(this,i(this,gr,void 0)),this._coatRoughnessAnisotropyTexture=(i(this,mr),new z("coat_roughness_anisotropy","coatRoughnessAnisotropy","COAT_ROUGHNESS_ANISOTROPY")),Se.set(this,i(this,dr,void 0)),this._coatIor=(i(this,xr),new L("coat_ior",1.5,"vCoatIor",1,0)),Me.set(this,i(this,Ar,void 0)),this._coatDarkening=(i(this,Er),new L("coat_darkening",1,"vCoatDarkening",1,0)),Ie.set(this,i(this,Mr,void 0)),this._coatDarkeningTexture=(i(this,Ir),new z("coat_darkening","coatDarkening","COAT_DARKENING")),this.useCoatRoughnessFromWeightTexture=!1,ke.set(this,i(this,yr,void 0)),this._fuzzWeight=(i(this,Or),new L("fuzz_weight",0,"vFuzzWeight",1,0)),Be.set(this,i(this,Fr,void 0)),this._fuzzWeightTexture=(i(this,Lr),new z("fuzz_weight","fuzzWeight","FUZZ_WEIGHT")),ze.set(this,i(this,Pr,void 0)),this._fuzzColor=(i(this,Nr),new L("fuzz_color",Re.White(),"vFuzzColor",3,0)),Ue.set(this,i(this,kr,void 0)),this._fuzzColorTexture=(i(this,Br),new z("fuzz_color","fuzzColor","FUZZ_COLOR")),We.set(this,i(this,Ur,void 0)),this._fuzzRoughness=(i(this,Wr),new L("fuzz_roughness",.5,"vFuzzRoughness",1,0)),we.set(this,i(this,Gr,void 0)),this._fuzzRoughnessTexture=(i(this,Hr),new z("fuzz_roughness","fuzzRoughness","FUZZ_ROUGHNESS")),Ge.set(this,i(this,Xr,void 0)),this._geometryThinWalled=(i(this,Yr),new L("geometry_thin_walled",0,"vGeometryThinWalled",1,0)),He.set(this,i(this,Kr,void 0)),this._geometryNormalTexture=(i(this,jr),new z("geometry_normal","geometryNormal","GEOMETRY_NORMAL")),Ve.set(this,i(this,qr,void 0)),this._geometryTangent=(i(this,$r),new L("geometry_tangent",new ve(1,0),"vSpecularAnisotropy",3,0)),Xe.set(this,i(this,ea,void 0)),this._geometryTangentTexture=(i(this,ta),new z("geometry_tangent","geometryTangent","GEOMETRY_TANGENT")),Ye.set(this,i(this,ia,void 0)),this._geometryCoatNormalTexture=(i(this,ra),new z("geometry_coat_normal","geometryCoatNormal","GEOMETRY_COAT_NORMAL")),Ze.set(this,i(this,na,void 0)),this._geometryCoatTangent=(i(this,la),new L("geometry_coat_tangent",new ve(1,0),"vGeometryCoatTangent",2,0)),Ke.set(this,i(this,ua,void 0)),this._geometryCoatTangentTexture=(i(this,ha),new z("geometry_coat_tangent","geometryCoatTangent","GEOMETRY_COAT_TANGENT")),je.set(this,i(this,_a,void 0)),this._geometryOpacity=(i(this,fa),new L("geometry_opacity",1,"vBaseColor",4,3)),Qe.set(this,i(this,ga,void 0)),this._geometryOpacityTexture=(i(this,ma),new z("geometry_opacity","geometryOpacity","GEOMETRY_OPACITY")),qe.set(this,i(this,da,void 0)),this._geometryThickness=(i(this,xa),new L("geometry_thickness",0,"vGeometryThickness",1,0)),$e.set(this,i(this,Aa,void 0)),this._geometryThicknessTexture=(i(this,Ea),new z("geometry_thickness","geometryThickness","GEOMETRY_THICKNESS")),Je.set(this,i(this,Ma,void 0)),this._emissionLuminance=(i(this,Ia),new L("emission_luminance",1,"vLightingIntensity",4,1)),et.set(this,i(this,ya,void 0)),this._emissionColor=(i(this,Oa),new L("emission_color",Re.Black(),"vEmissionColor",3)),tt.set(this,i(this,Fa,void 0)),this._emissionColorTexture=(i(this,La),new z("emission_color","emissionColor","EMISSION_COLOR")),st.set(this,i(this,Pa,void 0)),this._thinFilmWeight=(i(this,Na),new L("thin_film_weight",0,"vThinFilmWeight",1,0)),it.set(this,i(this,ka,void 0)),this._thinFilmWeightTexture=(i(this,Ba),new z("thin_film_weight","thinFilmWeight","THIN_FILM_WEIGHT")),rt.set(this,i(this,Ua,void 0)),this._thinFilmThickness=(i(this,Wa),new L("thin_film_thickness",.5,"vThinFilmThickness",2,0)),at.set(this,i(this,Ga,void 0)),this._thinFilmThicknessMin=(i(this,Ha),new L("thin_film_thickness_min",0,"vThinFilmThickness",2,1)),nt.set(this,i(this,Xa,void 0)),this._thinFilmThicknessTexture=(i(this,Ya),new z("thin_film_thickness","thinFilmThickness","THIN_FILM_THICKNESS")),lt.set(this,i(this,Ka,void 0)),this._thinFilmIor=(i(this,ja),new L("thin_film_ior",1.4,"vThinFilmIor",1,0)),ot.set(this,i(this,qa,void 0)),this._ambientOcclusionTexture=(i(this,$a),new z("ambient_occlusion","ambientOcclusion","AMBIENT_OCCLUSION")),this._sssQuality=r.SSS_QUALITY_MEDIUM,this._sssIrradianceTexture=null,this._sssDepthTexture=null,this._uniformsList={},this._uniformsArray=[],this._samplersList={},this._samplerDefines={},ut.set(this,i(this,en,1)),ht.set(this,(i(this,tn),i(this,rn,1))),ct.set(this,(i(this,an),i(this,ln,!1))),_t.set(this,(i(this,on),i(this,hn,!1))),ft.set(this,(i(this,cn),i(this,fn,.4))),Tt.set(this,(i(this,Tn),i(this,mn,!1))),gt.set(this,(i(this,pn),i(this,xn,!1))),mt.set(this,(i(this,Rn),i(this,Mn,!1))),pt.set(this,(i(this,In),i(this,yn,!1))),dt.set(this,(i(this,On),i(this,Fn,!1))),xt.set(this,(i(this,Ln),i(this,Pn,.05))),Rt.set(this,(i(this,Nn),i(this,kn,!1))),At.set(this,(i(this,Bn),i(this,Un,!1))),Et.set(this,(i(this,Wn),i(this,Gn,4))),St.set(this,(i(this,Hn),i(this,Xn,!1))),Mt.set(this,(i(this,Yn),i(this,Kn,!1))),It.set(this,(i(this,jn),i(this,qn,!1))),bt.set(this,(i(this,$n),i(this,el,!1))),yt.set(this,(i(this,tl),i(this,il,!1))),Ot.set(this,(i(this,rl),i(this,nl,null))),Ct.set(this,(i(this,ll),i(this,ul,!1))),Ft.set(this,(i(this,hl),i(this,_l,!1))),Lt.set(this,(i(this,fl),i(this,gl,!0))),Dt.set(this,(i(this,ml),i(this,dl,!0))),Pt.set(this,(i(this,xl),i(this,Al,!1))),Nt.set(this,(i(this,El),i(this,Ml,!1))),this._lightingInfos=(i(this,Il),new Gl(this.directIntensity,1,this.environmentIntensity,1)),this._radianceTexture=null,this._useSpecularWeightFromAlpha=!1,this._useSpecularWeightFromSpecularColorTexture=!1,this._useSpecularRoughnessAnisotropyFromTangentTexture=!1,this._useCoatRoughnessAnisotropyFromTangentTexture=!1,this._useCoatRoughnessFromGreenChannel=!1,this._useGltfStyleAnisotropy=!1,this._useFuzzRoughnessFromTextureAlpha=!1,this._useSubsurfaceWeightFromTextureAlpha=!1,this._useHorizonOcclusion=!0,this._useRadianceOcclusion=!0,this._useAlphaFromBaseColorTexture=!1,this._useAmbientOcclusionFromMetallicTextureRed=!1,this._useRoughnessFromMetallicTextureGreen=!1,this._useMetallicFromMetallicTextureBlue=!1,this._useThinFilmThicknessFromTextureGreen=!1,this._useGeometryThicknessFromGreenChannel=!1,this._lightFalloff=ne.LIGHTFALLOFF_PHYSICAL,this._useObjectSpaceNormalMap=!1,this._useParallax=!1,this._useParallaxOcclusion=!1,this._parallaxScaleBias=.05,this._disableLighting=!1,this._maxSimultaneousLights=4,this._invertNormalMapX=!1,this._invertNormalMapY=!1,this._twoSidedLighting=!1,this._alphaCutOff=.4,this._useAlphaFresnel=!1,this._useLinearAlphaFresnel=!1,this._environmentBRDFTexture=null,this._environmentFuzzBRDFTexture=null,this._backgroundRefractionTexture=null,this._refractionHighQualityBlur=!0,this._forceIrradianceInFragment=!1,this._realTimeFiltering=!1,this._realTimeFilteringQuality=8,this._fuzzSampleNumber=4,this._forceNormalForward=!1,this._enableSpecularAntiAliasing=!1,this._renderTargets=new eo(16),this._unlit=!1,this._applyDecalMapAfterDetailMap=!1,this._debugMode=0,this._shadersLoaded=!1,this._breakShaderLoadedCheck=!1,this._vertexPullingMetadata=null,vt.set(this,i(this,yl,0)),this.debugLimit=(i(this,Ol),-1),this.debugFactor=1,this._cacheHasRenderTargetTextures=!1,this._transparencyMode=ne.MATERIAL_OPAQUE,this.getScene()&&!this.getScene()?.getEngine().isWebGPU&&this.getScene().getEngine().webGLVersion<2&&De.Error("OpenPBRMaterial: WebGL 2.0 or above is required for this material."),r._noiseTextures[this.getScene().uniqueId]||(r._noiseTextures[this.getScene().uniqueId]=new Pe(to.GetAssetUrl("https://assets.babylonjs.com/core/blue_noise/blue_noise_rgb.png"),this.getScene(),!1,!0,1),this.getScene().onDisposeObservable.addOnce(()=>{r._noiseTextures[this.getScene().uniqueId]?.dispose(),delete r._noiseTextures[this.getScene().uniqueId]})),this._attachImageProcessingConfiguration(null),this.getRenderTargetTextures=()=>(this._renderTargets.reset(),ae.ReflectionTextureEnabled&&this._radianceTexture&&this._radianceTexture.isRenderTarget&&this._renderTargets.push(this._radianceTexture),ae.RefractionTextureEnabled&&this._backgroundRefractionTexture&&this._backgroundRefractionTexture.isRenderTarget&&this._renderTargets.push(this._backgroundRefractionTexture),this._eventInfo.renderTargets=this._renderTargets,this._callbackPluginEventFillRenderTargetTextures(this._eventInfo),this._renderTargets),this._environmentBRDFTexture=Wo(this.getScene()),this._environmentFuzzBRDFTexture=Nl(this.getScene()),this.prePassConfiguration=new Dl,this._propertyList={};for(const b of Object.getOwnPropertyNames(this)){const F=this[b];F instanceof L&&(this._propertyList[b]=F)}Object.keys(this._propertyList).forEach(b=>{const F=this._propertyList[b];let O=this._uniformsList[F.targetUniformName];O?O.numComponents!==F.targetUniformComponentNum?De.Error(`Uniform ${F.targetUniformName} already exists of size ${O.numComponents}, but trying to set it to ${F.targetUniformComponentNum}.`):O.requiredDefine!==F.requiredDefine&&(O.requiredDefine=void 0):(O=new Ne(F.targetUniformName,F.targetUniformComponentNum),O.requiredDefine=F.requiredDefine,this._uniformsList[F.targetUniformName]=O),O.firstLinkedKey===""&&(O.firstLinkedKey=F.name),O.linkedProperties[F.name]=F}),this._uniformsArray=Object.values(this._uniformsList),this._samplersList={};for(const b of Object.getOwnPropertyNames(this)){const F=this[b];F instanceof z&&(this._samplersList[b]=F)}for(const b in this._samplersList){const O=this._samplersList[b].textureDefine;this._samplerDefines[O]={type:"boolean",default:!1},this._samplerDefines[O+"DIRECTUV"]={type:"number",default:0},this._samplerDefines[O+"_GAMMA"]={type:"boolean",default:!1}}this._baseWeight,this._baseWeightTexture,this._baseColor,this._baseColorTexture,this._baseDiffuseRoughness,this._baseDiffuseRoughnessTexture,this._baseMetalness,this._baseMetalnessTexture,this._specularWeight,this._specularWeightTexture,this._specularColor,this._specularColorTexture,this._specularRoughness,this._specularIor,this._specularRoughnessTexture,this._specularRoughnessAnisotropy,this._specularRoughnessAnisotropyTexture,this._transmissionWeight,this._transmissionWeightTexture,this._transmissionColor,this._transmissionColorTexture,this._transmissionDepth,this._transmissionDepthTexture,this._transmissionScatter,this._transmissionScatterTexture,this._transmissionScatterAnisotropy,this._transmissionDispersionScale,this._transmissionDispersionScaleTexture,this._transmissionDispersionAbbeNumber,this._subsurfaceWeight,this._subsurfaceWeightTexture,this._subsurfaceColor,this._subsurfaceColorTexture,this._subsurfaceRadius,this._subsurfaceRadiusScale,this._subsurfaceRadiusScaleTexture,this._subsurfaceScatterAnisotropy,this._coatWeight,this._coatWeightTexture,this._coatColor,this._coatColorTexture,this._coatRoughness,this._coatRoughnessTexture,this._coatRoughnessAnisotropy,this._coatRoughnessAnisotropyTexture,this._coatIor,this._coatDarkening,this._coatDarkeningTexture,this._fuzzWeight,this._fuzzWeightTexture,this._fuzzColor,this._fuzzColorTexture,this._fuzzRoughness,this._fuzzRoughnessTexture,this._geometryThinWalled,this._geometryNormalTexture,this._geometryTangent,this._geometryTangentTexture,this._geometryCoatNormalTexture,this._geometryCoatTangent,this._geometryCoatTangentTexture,this._geometryOpacity,this._geometryOpacityTexture,this._geometryThickness,this._geometryThicknessTexture,this._thinFilmWeight,this._thinFilmWeightTexture,this._thinFilmThickness,this._thinFilmThicknessMin,this._thinFilmThicknessTexture,this._thinFilmIor,this._emissionLuminance,this._emissionColor,this._emissionColorTexture,this._ambientOcclusionTexture}get hasRenderTargetTextures(){return ae.ReflectionTextureEnabled&&this._radianceTexture&&this._radianceTexture.isRenderTarget||ae.RefractionTextureEnabled&&this._backgroundRefractionTexture&&this._backgroundRefractionTexture.isRenderTarget?!0:this._cacheHasRenderTargetTextures}get isPrePassCapable(){return!this.disableDepthWrite}getClassName(){return"OpenPBRMaterial"}get transparencyMode(){return this._transparencyMode}set transparencyMode(e){this._transparencyMode!==e&&(this._transparencyMode=e,this._markAllSubMeshesAsTexturesAndMiscDirty())}_shouldUseAlphaFromBaseColorTexture(){return this._hasAlphaChannel()&&this._transparencyMode!==ne.MATERIAL_OPAQUE&&!this.geometryOpacityTexture}_hasAlphaChannel(){return this.baseColorTexture!=null&&this.baseColorTexture.hasAlpha&&this._useAlphaFromBaseColorTexture||this.geometryOpacityTexture!=null}needAlphaBlending(){return this.geometryOpacity<1||this.geometryOpacityTexture!=null}needAlphaBlendingForMesh(e){return this.geometryOpacity<1||this.geometryOpacityTexture!=null||super.needAlphaBlendingForMesh(e)}clone(e,t=!0,a=""){const C=Pl.Clone(()=>new r(e,this.getScene()),this,{cloneTexturesOnlyOnce:t});return C.id=e,C.name=e,this.stencil.copyTo(C.stencil),this._clonePlugins(C,a),C}serialize(){const e=super.serialize();return e.customType="BABYLON.OpenPBRMaterial",e}static Parse(e,t,a){const C=Pl.Parse(()=>new r(e.name,t),e,t,a);return e.stencil&&C.stencil.parse(e.stencil,t,a),ne._ParsePlugins(e,C,t,a),C}forceCompilation(e,t,a){const C={clipPlane:!1,useInstances:!1,...a};this._uniformBufferLayoutBuilt||this.buildUniformLayout(),this._callbackPluginEventGeneric(4,this._eventInfo),(()=>{if(this._breakShaderLoadedCheck)return;const F=new Bl({...this._eventInfo.defineNames||{},...this._samplerDefines||{}}),O=this._prepareEffect(e,e,F,void 0,void 0,C.useInstances,C.clipPlane);this._onEffectCreatedObservable&&(Le.effect=O,Le.subMesh=null,this._onEffectCreatedObservable.notifyObservers(Le)),O.isReady()?t&&t(this):O.onCompileObservable.add(()=>{t&&t(this)})})()}isReadyForSubMesh(e,t,a){this._uniformBufferLayoutBuilt||this.buildUniformLayout();const C=t._drawWrapper;if(C.effect&&this.isFrozen&&C._wasPreviouslyReady&&C._wasPreviouslyUsingInstances===a)return!0;t.materialDefines||(this._callbackPluginEventGeneric(4,this._eventInfo),t.materialDefines=new Bl({...this._eventInfo.defineNames||{},...this._samplerDefines||{}}));const b=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const F=this.getScene(),O=F.getEngine();if(b._areTexturesDirty&&(this._eventInfo.hasRenderTargetTextures=!1,this._callbackPluginEventHasRenderTargetTextures(this._eventInfo),this._cacheHasRenderTargetTextures=this._eventInfo.hasRenderTargetTextures,F.texturesEnabled)){for(const re in this._samplersList){const H=this._samplersList[re];if(H.value&&!H.value.isReadyOrNotBlocking())return!1}const S=this._getRadianceTexture();if(S&&ae.ReflectionTextureEnabled){if(!S.isReadyOrNotBlocking())return!1;if(S.irradianceTexture){if(!S.irradianceTexture.isReadyOrNotBlocking())return!1}else if(!S.sphericalPolynomial&&S.getInternalTexture()?._sphericalPolynomialPromise)return!1}if(this._environmentBRDFTexture&&ae.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady()||this._environmentFuzzBRDFTexture&&ae.ReflectionTextureEnabled&&!this._environmentFuzzBRDFTexture.isReady()||this._backgroundRefractionTexture&&ae.RefractionTextureEnabled&&!this._backgroundRefractionTexture.isReadyOrNotBlocking()||r._noiseTextures[F.uniqueId]&&!r._noiseTextures[F.uniqueId].isReady()||this._sssIrradianceTexture&&this._sssDepthTexture&&(!this._sssIrradianceTexture.isReady()||!this._sssDepthTexture.isReady()))return!1}if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=b,this._eventInfo.subMesh=t,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh||b._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;if(b.AREALIGHTUSED){for(let S=0;S<e.lightSources.length;S++)if(!e.lightSources[S]._isReady())return!1}if(!O.getCaps().standardDerivatives&&!e.isVerticesDataPresent($.NormalKind)&&(e.createNormals(!0),De.Warn("OpenPBRMaterial: Normals have been created for the mesh: "+e.name)),!so(F,e,this._maxSimultaneousLights,this._disableLighting))return!1;const ge=t.effect,de=b._areLightsDisposed,w=this._prepareEffect(e,t.getRenderingMesh(),b,this.onCompiled,this.onError,a,null);let B=!1;if(w)if(this._onEffectCreatedObservable&&(Le.effect=w,Le.subMesh=t,this._onEffectCreatedObservable.notifyObservers(Le)),this.allowShaderHotSwapping&&ge&&!w.isReady()){if(b.markAsUnprocessed(),B=this.isFrozen,de)return b._areLightsDisposed=!0,!1}else F.resetCachedMaterial(),t.setEffect(w,b,this._materialContext);return!t.effect||!t.effect.isReady()?!1:(b._renderId=F.getRenderId(),C._wasPreviouslyReady=!B,C._wasPreviouslyUsingInstances=!!a,this._checkScenePerformancePriority(),!0)}buildUniformLayout(){const e=this._uniformBuffer;e.addUniform("vTangentSpaceParams",2),e.addUniform("vLightingIntensity",4),e.addUniform("pointSize",1),e.addUniform("vDebugMode",2),e.addUniform("renderTargetSize",2),e.addUniform("cameraInfo",4),e.addUniform("vTextureRepetitionHexTilingParams",4),e.addUniform("backgroundRefractionMatrix",16),e.addUniform("vBackgroundRefractionInfos",3),io(e,!0,!0,!0,!0,!0),Object.values(this._uniformsList).forEach(t=>{e.addUniform(t.name,t.numComponents)}),Object.values(this._samplersList).forEach(t=>{e.addUniform(t.samplerInfoName,2),e.addUniform(t.samplerMatrixName,16)}),super.buildUniformLayout()}bindPropertiesForSubMesh(e,t,a,C){if(this.geometryThickness===0)e.updateFloat("vGeometryThickness",0);else{C.getRenderingMesh().getWorldMatrix().decompose(pe.Vector3[0]);const b=Math.max(Math.abs(pe.Vector3[0].x),Math.abs(pe.Vector3[0].y),Math.abs(pe.Vector3[0].z));e.updateFloat("vGeometryThickness",this.geometryThickness*b)}}bindForSubMesh(e,t,a){const C=this.getScene(),b=a.materialDefines;if(!b)return;const F=a.effect;if(!F)return;this._activeEffect=F,t.getMeshUniformBuffer().bindToEffect(F,"Mesh"),t.transferToEffect(e);const O=C.getEngine();this._uniformBuffer.bindToEffect(F,"Material"),this.prePassConfiguration.bindForSubMesh(this._activeEffect,C,t,e,this.isFrozen),Ut.Bind(O.currentRenderPassId,this._activeEffect,t,e,this);const ge=C.activeCamera;ge?this._uniformBuffer.updateFloat4("cameraInfo",ge.minZ,ge.maxZ,0,0):this._uniformBuffer.updateFloat4("cameraInfo",0,0,0,0);const de=this.textureRepetitionHexTilingParams;this._uniformBuffer.updateFloat4("vTextureRepetitionHexTilingParams",de[0],de[1],de[2],de[3]),this._eventInfo.subMesh=a,this._callbackPluginEventHardBindForSubMesh(this._eventInfo),b.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));const w=this._mustRebind(C,F,a,t.visibility),B=O._features.needToAlwaysBindUniformBuffers;ro(t,this._activeEffect,this.prePassConfiguration),this._vertexPullingMetadata&&ao(this._activeEffect,this._vertexPullingMetadata);const S=this._uniformBuffer;if(w){this.bindViewProjection(F);const re=this._getRadianceTexture();if(!S.useUbo||!this.isFrozen||!S.isSync||a._drawWrapper._forceRebindOnNextCall){if(C.texturesEnabled){for(const K in this._samplersList){const me=this._samplersList[K];me.value&&(S.updateFloat2(me.samplerInfoName,me.value.coordinatesIndex,me.value.level),no(me.value,S,me.samplerPrefix))}(this.geometryNormalTexture||this.geometryCoatNormalTexture)&&(C._mirroredCameraPosition?S.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):S.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),lo(C,b,S,Re.White(),re,this.realTimeFiltering,!0,!0,!0,!0,!0)}this.pointsCloud&&S.updateFloat("pointSize",this.pointSize);const H=this._uniformsArray;for(let K=0,me=H.length;K<me;K++){const ee=H[K];ee.requiredDefine!==void 0&&!b[ee.requiredDefine]||(ee.numComponents===4?(ee.populateVectorFromLinkedProperties(pe.Vector4[0]),S.updateVector4(ee.name,pe.Vector4[0])):ee.numComponents===3?(ee.populateVectorFromLinkedProperties(pe.Vector3[0]),S.updateVector3(ee.name,pe.Vector3[0])):ee.numComponents===2?(ee.populateVectorFromLinkedProperties(pe.Vector2[0]),S.updateFloat2(ee.name,pe.Vector2[0].x,pe.Vector2[0].y)):ee.numComponents===1&&S.updateFloat(ee.name,ee.linkedProperties[ee.firstLinkedKey].value))}this._lightingInfos.x=this.directIntensity,this._lightingInfos.y=this.emissionLuminance,this._lightingInfos.z=this.environmentIntensity*C.environmentIntensity,this._lightingInfos.w=1,S.updateVector4("vLightingIntensity",this._lightingInfos),S.updateFloat2("vDebugMode",this.debugLimit,this.debugFactor)}if(C.texturesEnabled){for(const H in this._samplersList){const K=this._samplersList[H];K.value&&S.setTexture(K.samplerName,K.value)}if(oo(C,b,S,re,this.realTimeFiltering),b.ENVIRONMENTBRDF&&S.setTexture("environmentBrdfSampler",this._environmentBRDFTexture),b.FUZZENVIRONMENTBRDF&&S.setTexture("environmentFuzzBrdfSampler",this._environmentFuzzBRDFTexture),b.REFRACTED_BACKGROUND&&(S.setTexture("backgroundRefractionSampler",this._backgroundRefractionTexture),S.updateMatrix("backgroundRefractionMatrix",this._backgroundRefractionTexture.getReflectionTextureMatrix()),pe.Vector3[1].set(Math.log2(this._backgroundRefractionTexture.getSize().width),0,0),S.updateVector3("vBackgroundRefractionInfos",pe.Vector3[1])),(b.ANISOTROPIC||b.FUZZ||b.REFRACTED_BACKGROUND||b.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING)&&S.setTexture("blueNoiseSampler",r._noiseTextures[this.getScene().uniqueId]),b.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING&&this.sssIrradianceTexture&&this.sssDepthTexture){const H=this.sssIrradianceTexture.getSize().width,K=this.sssIrradianceTexture.getSize().height;S.setTexture("sceneIrradianceSampler",this.sssIrradianceTexture),S.setTexture("sceneDepthSampler",this.sssDepthTexture),S.updateFloat2("renderTargetSize",H,K)}}this.getScene().useOrderIndependentTransparency&&this.needAlphaBlendingForMesh(t)&&this.getScene().depthPeelingRenderer.bind(F),this._eventInfo.subMesh=a,this._callbackPluginEventBindForSubMesh(this._eventInfo),Wl(this._activeEffect,this,C),this.bindEyePosition(F)}else B&&(this._needToBindSceneUbo=!0);this.bindPropertiesForSubMesh(this._uniformBuffer,C,C.getEngine(),a),(w||!this.isFrozen||B)&&C.lightsEnabled&&!this._disableLighting&&uo(C,t,this._activeEffect,b,this._maxSimultaneousLights),(w||!this.isFrozen)&&(this.bindView(F),ho(C,t,this._activeEffect,!0),b.NUM_MORPH_INFLUENCERS&&wl(t,this._activeEffect),b.BAKED_VERTEX_ANIMATION_TEXTURE&&t.bakedVertexAnimationManager?.bind(F,b.INSTANCES),this._imageProcessingConfiguration.bind(this._activeEffect),co(b,this._activeEffect,C)),this._afterBind(t,this._activeEffect,a),S.update()}getAnimatables(){const e=super.getAnimatables();for(const t in this._samplersList){const a=this._samplersList[t];a.value&&a.value.animations&&a.value.animations.length>0&&e.push(a.value)}return this._radianceTexture&&this._radianceTexture.animations&&this._radianceTexture.animations.length>0&&e.push(this._radianceTexture),e}getActiveTextures(){const e=super.getActiveTextures();for(const t in this._samplersList){const a=this._samplersList[t];a.value&&e.push(a.value)}return this._radianceTexture&&e.push(this._radianceTexture),e}hasTexture(e){if(super.hasTexture(e))return!0;for(const t in this._samplersList)if(this._samplersList[t].value===e)return!0;return this._radianceTexture===e}setPrePassRenderer(){return!1}dispose(e,t){if(this._breakShaderLoadedCheck=!0,t){this._environmentBRDFTexture&&this.getScene().openPBREnvironmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),this._environmentFuzzBRDFTexture&&this.getScene().environmentFuzzBRDFTexture!==this._environmentFuzzBRDFTexture&&this._environmentFuzzBRDFTexture.dispose(),this._backgroundRefractionTexture=null;for(const a in this._samplersList)this._samplersList[a].value?.dispose();this._radianceTexture?.dispose()}this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),super.dispose(e,t)}_getRadianceTexture(){return this._radianceTexture?this._radianceTexture:this.getScene().environmentTexture}_prepareEffect(e,t,a,C=null,b=null,F=null,O=null){if(this._prepareDefines(e,t,a,F,O),!a.isDirty)return null;a.markAsProcessed();const de=this.getScene().getEngine(),w=new _o;let B=0;a.USESPHERICALINVERTEX&&w.addFallback(B++,"USESPHERICALINVERTEX"),a.FOG&&w.addFallback(B,"FOG"),a.SPECULARAA&&w.addFallback(B,"SPECULARAA"),a.POINTSIZE&&w.addFallback(B,"POINTSIZE"),a.LOGARITHMICDEPTH&&w.addFallback(B,"LOGARITHMICDEPTH"),a.PARALLAX&&w.addFallback(B,"PARALLAX"),a.PARALLAX_RHS&&w.addFallback(B,"PARALLAX_RHS"),a.PARALLAXOCCLUSION&&w.addFallback(B++,"PARALLAXOCCLUSION"),a.ENVIRONMENTBRDF&&w.addFallback(B++,"ENVIRONMENTBRDF"),a.TANGENT&&w.addFallback(B++,"TANGENT"),B=fo(a,w,this._maxSimultaneousLights,B),a.SPECULARTERM&&w.addFallback(B++,"SPECULARTERM"),a.USESPHERICALFROMREFLECTIONMAP&&w.addFallback(B++,"USESPHERICALFROMREFLECTIONMAP"),a.USEIRRADIANCEMAP&&w.addFallback(B++,"USEIRRADIANCEMAP"),a.NORMAL&&w.addFallback(B++,"NORMAL"),a.VERTEXCOLOR&&w.addFallback(B++,"VERTEXCOLOR"),a.MORPHTARGETS&&w.addFallback(B++,"MORPHTARGETS"),a.MULTIVIEW&&w.addFallback(0,"MULTIVIEW");const S=[$.PositionKind];a.NORMAL&&S.push($.NormalKind),a.TANGENT&&S.push($.TangentKind);for(let xe=1;xe<=6;++xe)a["UV"+xe]&&S.push(`uv${xe===1?"":xe}`);a.VERTEXCOLOR&&S.push($.ColorKind),To(S,e,a,w),go(S,a),mo(S,e,a),po(S,e,a);let re="openpbr";const H=["world","view","viewProjection","projection","vEyePosition","inverseProjection","renderTargetSize","vLightsType","visibility","vFogInfos","vFogColor","pointSize","mBones","normalMatrix","vLightingIntensity","logarithmicDepthConstant","vTangentSpaceParams","boneTextureInfo","vDebugMode","morphTargetTextureInfo","morphTargetTextureIndices","cameraInfo","vTextureRepetitionHexTilingParams","backgroundRefractionMatrix","vBackgroundRefractionInfos"];for(const xe in this._uniformsList)H.push(xe);const K=["environmentBrdfSampler","boneSampler","morphTargets","oitDepthSampler","oitFrontColorSampler","areaLightsLTC1Sampler","areaLightsLTC2Sampler"];a.FUZZENVIRONMENTBRDF&&K.push("environmentFuzzBrdfSampler"),a.REFRACTED_BACKGROUND&&K.push("backgroundRefractionSampler"),(a.ANISOTROPIC||a.FUZZ||a.REFRACTED_BACKGROUND||a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING)&&K.push("blueNoiseSampler"),a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING&&(K.push("sceneIrradianceSampler"),K.push("sceneDepthSampler"));for(const xe in this._samplersList){const Bt=this._samplersList[xe];K.push(Bt.samplerName),H.push(Bt.samplerInfoName),H.push(Bt.samplerMatrixName)}xo(H,K,!0);const me=["Material","Scene","Mesh"],ee={maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:a.NUM_MORPH_INFLUENCERS};if(this._eventInfo.fallbacks=w,this._eventInfo.fallbackRank=B,this._eventInfo.defines=a,this._eventInfo.uniforms=H,this._eventInfo.attributes=S,this._eventInfo.samplers=K,this._eventInfo.uniformBuffersNames=me,this._eventInfo.customCode=void 0,this._eventInfo.mesh=e,this._eventInfo.indexParameters=ee,this._callbackPluginEventGeneric(128,this._eventInfo),Ut.AddUniformsAndSamplers(H,K),Dl.AddUniforms(H),Ro(H),this._useVertexPulling){const xe=t?.geometry;xe&&(this._vertexPullingMetadata=Ao(xe),this._vertexPullingMetadata&&this._vertexPullingMetadata.forEach((Bt,Yl)=>{H.push(`vp_${Yl}_info`)}))}else this._vertexPullingMetadata=null;Wt&&(Wt.PrepareUniforms(H,a),Wt.PrepareSamplers(K,a)),Eo({uniformsNames:H,uniformBuffersNames:me,samplers:K,defines:a,maxSimultaneousLights:this._maxSimultaneousLights,shaderLanguage:this._shaderLanguage});const Fl={};this.customShaderNameResolve&&(re=this.customShaderNameResolve(re,H,me,K,a,S,Fl));const Vl=a.toString(),Xl=de.createEffect(re,{attributes:S,uniformsNames:H,uniformBuffersNames:me,samplers:K,defines:Vl,fallbacks:w,onCompiled:C,onError:b,indexParameters:ee,processFinalCode:Fl.processFinalCode,processCodeAfterIncludes:this._eventInfo.customCode,multiTarget:a.PREPASS,shaderLanguage:this._shaderLanguage,extraInitializationsAsync:this._shadersLoaded?void 0:async()=>{this.shaderLanguage===1?await Promise.all([be(()=>import("./openpbr.vertex-Cis9aL4z.js"),__vite__mapDeps([19,1,2,4,20,21,22,23,12,14,3,6,5,24,25]),import.meta.url),be(()=>import("./openpbr.fragment-BJTs78x9.js"),__vite__mapDeps([26,1,2,27,4,20,21,23,28,11,13,9,25,29,12,6,14,15]),import.meta.url)]):await Promise.all([be(()=>import("./openpbr.vertex-Qr3-JJak.js"),__vite__mapDeps([30,1,2,31]),import.meta.url),be(()=>import("./openpbr.fragment-CnBW8BK7.js"),__vite__mapDeps([32,1,2,18,31]),import.meta.url)]),this._shadersLoaded=!0}},de);return this._eventInfo.customCode=void 0,Xl}_prepareDefines(e,t,a,C=null,b=null){const F=t.hasThinInstances,O=this.getScene(),ge=O.getEngine();So(O,e,a,!0,this._maxSimultaneousLights,this._disableLighting),a._needNormals=!0,Mo(O,a);const de=this.needAlphaBlendingForMesh(e)&&this.getScene().useOrderIndependentTransparency;if(Io(O,a,this.canRenderToMRT&&!de),bo(O,a,de),Ut.PrepareDefines(ge.currentRenderPassId,e,a),a._areTexturesDirty){a._needUVs=!1;for(let B=1;B<=6;++B)a["MAINUV"+B]=!1;if(O.texturesEnabled){for(const re in this._samplersList){const H=this._samplersList[re];H.value?(yo(H.value,a,H.textureDefine),a[H.textureDefine+"_GAMMA"]=H.value.gammaSpace):a[H.textureDefine]=!1}const B=this._getRadianceTexture(),S=this._forceIrradianceInFragment||this.realTimeFiltering||this._twoSidedLighting||ge.getCaps().maxVaryingVectors<=8||this._baseDiffuseRoughnessTexture!=null;if(Ul(O,B,a,this.realTimeFiltering,this.realTimeFilteringQuality,!S),this._baseMetalnessTexture&&(a.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed),a.SPECULAR_WEIGHT_IN_ALPHA=this._useSpecularWeightFromAlpha,a.SPECULAR_WEIGHT_FROM_SPECULAR_COLOR_TEXTURE=this._useSpecularWeightFromSpecularColorTexture,a.SPECULAR_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=this._useSpecularRoughnessAnisotropyFromTangentTexture,a.COAT_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE=this._useCoatRoughnessAnisotropyFromTangentTexture,a.COAT_ROUGHNESS_FROM_GREEN_CHANNEL=this._useCoatRoughnessFromGreenChannel,a.SPECULAR_ROUGHNESS_FROM_METALNESS_TEXTURE_GREEN=this._useRoughnessFromMetallicTextureGreen,a.FUZZ_ROUGHNESS_FROM_TEXTURE_ALPHA=this._useFuzzRoughnessFromTextureAlpha,a.SUBSURFACE_WEIGHT_FROM_TEXTURE_ALPHA=this._useSubsurfaceWeightFromTextureAlpha,a.BASE_METALNESS_FROM_METALNESS_TEXTURE_BLUE=this._useMetallicFromMetallicTextureBlue,a.THIN_FILM_THICKNESS_FROM_THIN_FILM_TEXTURE=this._useThinFilmThicknessFromTextureGreen,a.GEOMETRY_THICKNESS_FROM_GREEN_CHANNEL=this._useGeometryThicknessFromGreenChannel,this.geometryNormalTexture?(this._useParallax&&this.baseColorTexture&&ae.DiffuseTextureEnabled?(a.PARALLAX=!0,a.PARALLAX_RHS=O.useRightHandedSystem,a.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):a.PARALLAX=!1,a.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):(a.PARALLAX=!1,a.PARALLAX_RHS=!1,a.PARALLAXOCCLUSION=!1,a.OBJECTSPACE_NORMALMAP=!1),this._environmentBRDFTexture&&ae.ReflectionTextureEnabled?(a.ENVIRONMENTBRDF=!0,a.ENVIRONMENTBRDF_RGBD=this._environmentBRDFTexture.isRGBD):(a.ENVIRONMENTBRDF=!1,a.ENVIRONMENTBRDF_RGBD=!1),this._environmentFuzzBRDFTexture?a.FUZZENVIRONMENTBRDF=!0:a.FUZZENVIRONMENTBRDF=!1,this.hasTransparency){a.REFRACTED_BACKGROUND=!!this._backgroundRefractionTexture&&ae.RefractionTextureEnabled,a.REFRACTION_HIGH_QUALITY_BLUR=this._refractionHighQualityBlur,a.REFRACTED_LIGHTS=!0;const re=this._getRadianceTexture();re?(a.REFRACTED_ENVIRONMENT=ae.RefractionTextureEnabled,a.REFRACTED_ENVIRONMENT_OPPOSITEZ=this.getScene().useRightHandedSystem?!re.invertZ:re.invertZ,a.REFRACTED_ENVIRONMENT_LOCAL_CUBE=re.isCube&&re.boundingBoxSize):a.REFRACTED_ENVIRONMENT=!1}else a.REFRACTED_BACKGROUND=!1,a.REFRACTED_LIGHTS=!1,a.REFRACTED_ENVIRONMENT=!1;this._shouldUseAlphaFromBaseColorTexture()?a.ALPHA_FROM_BASE_COLOR_TEXTURE=!0:a.ALPHA_FROM_BASE_COLOR_TEXTURE=!1}this._lightFalloff===ne.LIGHTFALLOFF_STANDARD?(a.USEPHYSICALLIGHTFALLOFF=!1,a.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===ne.LIGHTFALLOFF_GLTF?(a.USEPHYSICALLIGHTFALLOFF=!1,a.USEGLTFLIGHTFALLOFF=!0):(a.USEPHYSICALLIGHTFALLOFF=!0,a.USEGLTFLIGHTFALLOFF=!1),!this.backFaceCulling&&this._twoSidedLighting?a.TWOSIDEDLIGHTING=!0:a.TWOSIDEDLIGHTING=!1,a.MIRRORED=!!O._mirroredCameraPosition,a.SPECULARAA=ge.getCaps().standardDerivatives&&this._enableSpecularAntiAliasing}(a._areTexturesDirty||a._areMiscDirty)&&(a.ALPHATESTVALUE=`${this._alphaCutOff}${this._alphaCutOff%1===0?".":""}`,a.PREMULTIPLYALPHA=this.alphaMode===7||this.alphaMode===8,a.ALPHABLEND=this.needAlphaBlendingForMesh(e)),a._areTexturesDirty&&(a.TEXTURE_REPETITION_MODE=ge.version>1||ge.isWebGPU?this.textureRepetitionMode:0),a._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(a),a.FORCENORMALFORWARD=this._forceNormalForward,a.RADIANCEOCCLUSION=this._useRadianceOcclusion,a.HORIZONOCCLUSION=this._useHorizonOcclusion,(this.specularRoughnessAnisotropy>0||this.coatRoughnessAnisotropy>0)&&r._noiseTextures[O.uniqueId]&&ae.ReflectionTextureEnabled?(a.ANISOTROPIC=!0,e.isVerticesDataPresent($.TangentKind)||(a._needUVs=!0,a.MAINUV1=!0),this._useGltfStyleAnisotropy&&(a.USE_GLTF_STYLE_ANISOTROPY=!0),a.ANISOTROPIC_BASE=this.specularRoughnessAnisotropy>0,a.ANISOTROPIC_COAT=this.coatRoughnessAnisotropy>0):(a.ANISOTROPIC=!1,a.USE_GLTF_STYLE_ANISOTROPY=!1,a.ANISOTROPIC_BASE=!1,a.ANISOTROPIC_COAT=!1),a.THIN_FILM=this.thinFilmWeight>0,a.IRIDESCENCE=this.thinFilmWeight>0,a.DISPERSION=this.transmissionDispersionScale>0,a.SCATTERING=this.hasScattering;const w=[8,16,32];if(a.SSS_SAMPLE_COUNT=w[this._sssQuality]??16,a.TRANSMISSION_SLAB=this.transmissionWeight>0,a.TRANSMISSION_SLAB_VOLUME=this.transmissionWeight>0&&this.transmissionDepth>0,a.SUBSURFACE_SLAB=this.subsurfaceWeight>0,!a.PREPASS&&(a.SUBSURFACE_SLAB||a.TRANSMISSION_SLAB_VOLUME)){let B=!1;if(!this.sssIrradianceTexture&&O.geometryBufferRenderer){const S=O.geometryBufferRenderer.getTextureIndex(D.IRRADIANCE_TEXTURE_TYPE);this.sssIrradianceTexture=O.geometryBufferRenderer.getGBuffer().textures[S],B=!0}if(!this.sssDepthTexture&&O.geometryBufferRenderer){const S=O.geometryBufferRenderer.getTextureIndex(D.SCREENSPACE_DEPTH_TEXTURE_TYPE);this.sssDepthTexture=O.geometryBufferRenderer.getGBuffer().textures[S],B=!0}this.sssIrradianceTexture&&this.sssDepthTexture&&(a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING=!0,B&&(a.USE_IRRADIANCE_TEXTURE_FOR_SCATTERING_GBUFFER=!0))}a.FUZZ=this.fuzzWeight>0&&ae.ReflectionTextureEnabled,a.GEOMETRY_THIN_WALLED=this.geometryThinWalled!=0,a.FUZZ?(e.isVerticesDataPresent($.TangentKind)||(a._needUVs=!0,a.MAINUV1=!0),this._environmentFuzzBRDFTexture=Nl(this.getScene()),a.FUZZ_IBL_SAMPLES=this.fuzzSampleNumber):(this._environmentFuzzBRDFTexture=null,a.FUZZENVIRONMENTBRDF=!1,a.FUZZ_IBL_SAMPLES=0),a._areMiscDirty&&(Oo(e,O,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this.needAlphaTestingForMesh(e),a,this._applyDecalMapAfterDetailMap,this._useVertexPulling,t,this._isVertexOutputInvariant),a.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!e.isVerticesDataPresent($.NormalKind),a.DEBUGMODE=this._debugMode),Co(O,ge,this,a,!!C,b,F),this._eventInfo.defines=a,this._eventInfo.mesh=e,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),Fo(e,a,!0,!0,!0,this._transparencyMode!==ne.MATERIAL_OPAQUE),this._callbackPluginEventPrepareDefines(this._eventInfo)}},s=new WeakMap,o=new WeakMap,l=new WeakMap,n=new WeakMap,m=new WeakMap,d=new WeakMap,I=new WeakMap,k=new WeakMap,U=new WeakMap,M=new WeakMap,N=new WeakMap,J=new WeakMap,se=new WeakMap,_e=new WeakMap,te=new WeakMap,v=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap,G=new WeakMap,y=new WeakMap,T=new WeakMap,le=new WeakMap,ie=new WeakMap,V=new WeakMap,g=new WeakMap,f=new WeakMap,fe=new WeakMap,oe=new WeakMap,R=new WeakMap,ue=new WeakMap,E=new WeakMap,Q=new WeakMap,P=new WeakMap,he=new WeakMap,q=new WeakMap,Te=new WeakMap,ce=new WeakMap,j=new WeakMap,ye=new WeakMap,Oe=new WeakMap,Ce=new WeakMap,Fe=new WeakMap,Z=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Me=new WeakMap,Ie=new WeakMap,ke=new WeakMap,Be=new WeakMap,ze=new WeakMap,Ue=new WeakMap,We=new WeakMap,we=new WeakMap,Ge=new WeakMap,He=new WeakMap,Ve=new WeakMap,Xe=new WeakMap,Ye=new WeakMap,Ze=new WeakMap,Ke=new WeakMap,je=new WeakMap,Qe=new WeakMap,qe=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,st=new WeakMap,it=new WeakMap,rt=new WeakMap,at=new WeakMap,nt=new WeakMap,lt=new WeakMap,ot=new WeakMap,ut=new WeakMap,ht=new WeakMap,ct=new WeakMap,_t=new WeakMap,ft=new WeakMap,Tt=new WeakMap,gt=new WeakMap,mt=new WeakMap,pt=new WeakMap,dt=new WeakMap,xt=new WeakMap,Rt=new WeakMap,At=new WeakMap,Et=new WeakMap,St=new WeakMap,Mt=new WeakMap,It=new WeakMap,bt=new WeakMap,yt=new WeakMap,Ot=new WeakMap,Ct=new WeakMap,Ft=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Nt=new WeakMap,vt=new WeakMap,(()=>{const u=typeof Symbol=="function"&&Symbol.metadata?Object.create(Ht[Symbol.metadata]??null):void 0;Vt=[p("_markAllSubMeshesAsTexturesDirty")],Zt=[p("_markAllSubMeshesAsTexturesDirty")],Qt=[p("_markAllSubMeshesAsTexturesDirty")],Jt=[p("_markAllSubMeshesAsTexturesDirty")],ss=[p("_markAllSubMeshesAsTexturesDirty")],as=[p("_markAllSubMeshesAsTexturesDirty")],os=[p("_markAllSubMeshesAsTexturesDirty")],cs=[p("_markAllSubMeshesAsTexturesDirty")],Ts=[p("_markAllSubMeshesAsTexturesDirty")],ps=[p("_markAllSubMeshesAsTexturesDirty")],Rs=[p("_markAllSubMeshesAsTexturesDirty")],Ss=[p("_markAllSubMeshesAsTexturesDirty")],bs=[p("_markAllSubMeshesAsTexturesDirty")],Cs=[p("_markAllSubMeshesAsTexturesDirty")],Ds=[p("_markAllSubMeshesAsTexturesDirty")],vs=[p("_markAllSubMeshesAsTexturesDirty")],zs=[p("_markAllSubMeshesAsTexturesDirty")],ws=[p("_markAllSubMeshesAsTexturesDirty")],Vs=[p("_markAllSubMeshesAsTexturesDirty")],Zs=[p("_markAllSubMeshesAsTexturesDirty")],Qs=[p("_markAllSubMeshesAsTexturesDirty")],Js=[p("_markAllSubMeshesAsTexturesDirty")],si=[p("_markAllSubMeshesAsTexturesDirty")],ai=[p("_markAllSubMeshesAsTexturesDirty")],oi=[p("_markAllSubMeshesAsTexturesDirty")],ci=[p("_markAllSubMeshesAsTexturesDirty")],Ti=[p("_markAllSubMeshesAsTexturesDirty")],pi=[p("_markAllSubMeshesAsTexturesDirty")],Ri=[p("_markAllSubMeshesAsTexturesDirty")],Si=[p("_markAllSubMeshesAsTexturesDirty")],bi=[p("_markAllSubMeshesAsTexturesDirty")],Ci=[p("_markAllSubMeshesAsTexturesDirty")],Di=[p("_markAllSubMeshesAsTexturesDirty")],vi=[p("_markAllSubMeshesAsTexturesDirty")],zi=[p("_markAllSubMeshesAsTexturesDirty")],wi=[p("_markAllSubMeshesAsTexturesDirty")],Vi=[p("_markAllSubMeshesAsTexturesDirty")],Zi=[p("_markAllSubMeshesAsTexturesDirty")],Qi=[p("_markAllSubMeshesAsTexturesDirty")],Ji=[p("_markAllSubMeshesAsTexturesDirty")],sr=[p("_markAllSubMeshesAsTexturesDirty")],ar=[p("_markAllSubMeshesAsTexturesDirty")],or=[p("_markAllSubMeshesAsTexturesDirty")],cr=[p("_markAllSubMeshesAsTexturesDirty")],Tr=[p("_markAllSubMeshesAsTexturesDirty")],pr=[p("_markAllSubMeshesAsTexturesDirty")],Rr=[p("_markAllSubMeshesAsTexturesDirty")],Sr=[p("_markAllSubMeshesAsTexturesDirty")],br=[p("_markAllSubMeshesAsTexturesDirty")],Cr=[p("_markAllSubMeshesAsTexturesDirty")],Dr=[p("_markAllSubMeshesAsTexturesDirty")],vr=[p("_markAllSubMeshesAsTexturesDirty")],zr=[p("_markAllSubMeshesAsTexturesDirty")],wr=[p("_markAllSubMeshesAsTexturesDirty")],Vr=[p("_markAllSubMeshesAsTexturesDirty")],Zr=[p("_markAllSubMeshesAsTexturesDirty")],Qr=[p("_markAllSubMeshesAsTexturesDirty")],Jr=[p("_markAllSubMeshesAsTexturesDirty")],sa=[p("_markAllSubMeshesAsTexturesDirty")],aa=[p("_markAllSubMeshesAsTexturesDirty")],oa=[p("_markAllSubMeshesAsTexturesDirty")],ca=[p("_markAllSubMeshesAsTexturesDirty")],Ta=[p("_markAllSubMeshesAsTexturesDirty")],pa=[p("_markAllSubMeshesAsTexturesDirty")],Ra=[p("_markAllSubMeshesAsTexturesDirty")],Sa=[p("_markAllSubMeshesAsTexturesDirty")],ba=[p("_markAllSubMeshesAsTexturesDirty")],Ca=[p("_markAllSubMeshesAsTexturesDirty")],Da=[p("_markAllSubMeshesAsTexturesDirty")],va=[p("_markAllSubMeshesAsTexturesDirty")],za=[p("_markAllSubMeshesAsTexturesDirty")],wa=[p("_markAllSubMeshesAsTexturesDirty")],Va=[p("_markAllSubMeshesAsTexturesDirty")],Za=[p("_markAllSubMeshesAsTexturesDirty")],Qa=[p("_markAllSubMeshesAsTexturesDirty")],Ja=[X(),Y("_markAllSubMeshesAsTexturesDirty")],sn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],nn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],un=[X(),Y("_markAllSubMeshesAsTexturesAndMiscDirty")],_n=[X(),Y("_markAllSubMeshesAsTexturesAndMiscDirty")],gn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],dn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],An=[X()],En=[X()],Sn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],bn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Cn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Dn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],vn=[X(),Y("_markAllSubMeshesAsLightsDirty")],zn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],wn=[X(),Y("_markAllSubMeshesAsLightsDirty")],Vn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Zn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Qn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Jn=[X(),Y("_markAllSubMeshesAsTexturesDirty")],sl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],al=[Y("_markAllSubMeshesAsTexturesDirty")],ol=[X(),Y("_markAllSubMeshesAsTexturesDirty")],cl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Tl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],pl=[X(),Y("_markAllSubMeshesAsTexturesDirty")],Rl=[X(),Y("_markAllSubMeshesAsMiscDirty")],Sl=[X(),Y("_markAllSubMeshesAsMiscDirty")],bl=[Y("_markAllSubMeshesAsMiscDirty")],Cl=[X()],h(r,null,Vt,{kind:"accessor",name:"baseWeight",static:!1,private:!1,access:{has:e=>"baseWeight"in e,get:e=>e.baseWeight,set:(e,t)=>{e.baseWeight=t}},metadata:u},Xt,Yt),h(r,null,Zt,{kind:"accessor",name:"baseWeightTexture",static:!1,private:!1,access:{has:e=>"baseWeightTexture"in e,get:e=>e.baseWeightTexture,set:(e,t)=>{e.baseWeightTexture=t}},metadata:u},Kt,jt),h(r,null,Qt,{kind:"accessor",name:"baseColor",static:!1,private:!1,access:{has:e=>"baseColor"in e,get:e=>e.baseColor,set:(e,t)=>{e.baseColor=t}},metadata:u},qt,$t),h(r,null,Jt,{kind:"accessor",name:"baseColorTexture",static:!1,private:!1,access:{has:e=>"baseColorTexture"in e,get:e=>e.baseColorTexture,set:(e,t)=>{e.baseColorTexture=t}},metadata:u},es,ts),h(r,null,ss,{kind:"accessor",name:"baseDiffuseRoughness",static:!1,private:!1,access:{has:e=>"baseDiffuseRoughness"in e,get:e=>e.baseDiffuseRoughness,set:(e,t)=>{e.baseDiffuseRoughness=t}},metadata:u},is,rs),h(r,null,as,{kind:"accessor",name:"baseDiffuseRoughnessTexture",static:!1,private:!1,access:{has:e=>"baseDiffuseRoughnessTexture"in e,get:e=>e.baseDiffuseRoughnessTexture,set:(e,t)=>{e.baseDiffuseRoughnessTexture=t}},metadata:u},ns,ls),h(r,null,os,{kind:"accessor",name:"baseMetalness",static:!1,private:!1,access:{has:e=>"baseMetalness"in e,get:e=>e.baseMetalness,set:(e,t)=>{e.baseMetalness=t}},metadata:u},us,hs),h(r,null,cs,{kind:"accessor",name:"baseMetalnessTexture",static:!1,private:!1,access:{has:e=>"baseMetalnessTexture"in e,get:e=>e.baseMetalnessTexture,set:(e,t)=>{e.baseMetalnessTexture=t}},metadata:u},_s,fs),h(r,null,Ts,{kind:"accessor",name:"specularWeight",static:!1,private:!1,access:{has:e=>"specularWeight"in e,get:e=>e.specularWeight,set:(e,t)=>{e.specularWeight=t}},metadata:u},gs,ms),h(r,null,ps,{kind:"accessor",name:"specularWeightTexture",static:!1,private:!1,access:{has:e=>"specularWeightTexture"in e,get:e=>e.specularWeightTexture,set:(e,t)=>{e.specularWeightTexture=t}},metadata:u},ds,xs),h(r,null,Rs,{kind:"accessor",name:"specularColor",static:!1,private:!1,access:{has:e=>"specularColor"in e,get:e=>e.specularColor,set:(e,t)=>{e.specularColor=t}},metadata:u},As,Es),h(r,null,Ss,{kind:"accessor",name:"specularColorTexture",static:!1,private:!1,access:{has:e=>"specularColorTexture"in e,get:e=>e.specularColorTexture,set:(e,t)=>{e.specularColorTexture=t}},metadata:u},Ms,Is),h(r,null,bs,{kind:"accessor",name:"specularRoughness",static:!1,private:!1,access:{has:e=>"specularRoughness"in e,get:e=>e.specularRoughness,set:(e,t)=>{e.specularRoughness=t}},metadata:u},ys,Os),h(r,null,Cs,{kind:"accessor",name:"specularRoughnessTexture",static:!1,private:!1,access:{has:e=>"specularRoughnessTexture"in e,get:e=>e.specularRoughnessTexture,set:(e,t)=>{e.specularRoughnessTexture=t}},metadata:u},Fs,Ls),h(r,null,Ds,{kind:"accessor",name:"specularRoughnessAnisotropy",static:!1,private:!1,access:{has:e=>"specularRoughnessAnisotropy"in e,get:e=>e.specularRoughnessAnisotropy,set:(e,t)=>{e.specularRoughnessAnisotropy=t}},metadata:u},Ps,Ns),h(r,null,vs,{kind:"accessor",name:"specularRoughnessAnisotropyTexture",static:!1,private:!1,access:{has:e=>"specularRoughnessAnisotropyTexture"in e,get:e=>e.specularRoughnessAnisotropyTexture,set:(e,t)=>{e.specularRoughnessAnisotropyTexture=t}},metadata:u},ks,Bs),h(r,null,zs,{kind:"accessor",name:"specularIor",static:!1,private:!1,access:{has:e=>"specularIor"in e,get:e=>e.specularIor,set:(e,t)=>{e.specularIor=t}},metadata:u},Us,Ws),h(r,null,ws,{kind:"accessor",name:"transmissionWeight",static:!1,private:!1,access:{has:e=>"transmissionWeight"in e,get:e=>e.transmissionWeight,set:(e,t)=>{e.transmissionWeight=t}},metadata:u},Gs,Hs),h(r,null,Vs,{kind:"accessor",name:"transmissionWeightTexture",static:!1,private:!1,access:{has:e=>"transmissionWeightTexture"in e,get:e=>e.transmissionWeightTexture,set:(e,t)=>{e.transmissionWeightTexture=t}},metadata:u},Xs,Ys),h(r,null,Zs,{kind:"accessor",name:"transmissionColor",static:!1,private:!1,access:{has:e=>"transmissionColor"in e,get:e=>e.transmissionColor,set:(e,t)=>{e.transmissionColor=t}},metadata:u},Ks,js),h(r,null,Qs,{kind:"accessor",name:"transmissionColorTexture",static:!1,private:!1,access:{has:e=>"transmissionColorTexture"in e,get:e=>e.transmissionColorTexture,set:(e,t)=>{e.transmissionColorTexture=t}},metadata:u},qs,$s),h(r,null,Js,{kind:"accessor",name:"transmissionDepth",static:!1,private:!1,access:{has:e=>"transmissionDepth"in e,get:e=>e.transmissionDepth,set:(e,t)=>{e.transmissionDepth=t}},metadata:u},ei,ti),h(r,null,si,{kind:"accessor",name:"transmissionDepthTexture",static:!1,private:!1,access:{has:e=>"transmissionDepthTexture"in e,get:e=>e.transmissionDepthTexture,set:(e,t)=>{e.transmissionDepthTexture=t}},metadata:u},ii,ri),h(r,null,ai,{kind:"accessor",name:"transmissionScatter",static:!1,private:!1,access:{has:e=>"transmissionScatter"in e,get:e=>e.transmissionScatter,set:(e,t)=>{e.transmissionScatter=t}},metadata:u},ni,li),h(r,null,oi,{kind:"accessor",name:"transmissionScatterTexture",static:!1,private:!1,access:{has:e=>"transmissionScatterTexture"in e,get:e=>e.transmissionScatterTexture,set:(e,t)=>{e.transmissionScatterTexture=t}},metadata:u},ui,hi),h(r,null,ci,{kind:"accessor",name:"transmissionScatterAnisotropy",static:!1,private:!1,access:{has:e=>"transmissionScatterAnisotropy"in e,get:e=>e.transmissionScatterAnisotropy,set:(e,t)=>{e.transmissionScatterAnisotropy=t}},metadata:u},_i,fi),h(r,null,Ti,{kind:"accessor",name:"transmissionDispersionScale",static:!1,private:!1,access:{has:e=>"transmissionDispersionScale"in e,get:e=>e.transmissionDispersionScale,set:(e,t)=>{e.transmissionDispersionScale=t}},metadata:u},gi,mi),h(r,null,pi,{kind:"accessor",name:"transmissionDispersionScaleTexture",static:!1,private:!1,access:{has:e=>"transmissionDispersionScaleTexture"in e,get:e=>e.transmissionDispersionScaleTexture,set:(e,t)=>{e.transmissionDispersionScaleTexture=t}},metadata:u},di,xi),h(r,null,Ri,{kind:"accessor",name:"transmissionDispersionAbbeNumber",static:!1,private:!1,access:{has:e=>"transmissionDispersionAbbeNumber"in e,get:e=>e.transmissionDispersionAbbeNumber,set:(e,t)=>{e.transmissionDispersionAbbeNumber=t}},metadata:u},Ai,Ei),h(r,null,Si,{kind:"accessor",name:"subsurfaceWeight",static:!1,private:!1,access:{has:e=>"subsurfaceWeight"in e,get:e=>e.subsurfaceWeight,set:(e,t)=>{e.subsurfaceWeight=t}},metadata:u},Mi,Ii),h(r,null,bi,{kind:"accessor",name:"subsurfaceWeightTexture",static:!1,private:!1,access:{has:e=>"subsurfaceWeightTexture"in e,get:e=>e.subsurfaceWeightTexture,set:(e,t)=>{e.subsurfaceWeightTexture=t}},metadata:u},yi,Oi),h(r,null,Ci,{kind:"accessor",name:"subsurfaceColor",static:!1,private:!1,access:{has:e=>"subsurfaceColor"in e,get:e=>e.subsurfaceColor,set:(e,t)=>{e.subsurfaceColor=t}},metadata:u},Fi,Li),h(r,null,Di,{kind:"accessor",name:"subsurfaceColorTexture",static:!1,private:!1,access:{has:e=>"subsurfaceColorTexture"in e,get:e=>e.subsurfaceColorTexture,set:(e,t)=>{e.subsurfaceColorTexture=t}},metadata:u},Pi,Ni),h(r,null,vi,{kind:"accessor",name:"subsurfaceRadius",static:!1,private:!1,access:{has:e=>"subsurfaceRadius"in e,get:e=>e.subsurfaceRadius,set:(e,t)=>{e.subsurfaceRadius=t}},metadata:u},ki,Bi),h(r,null,zi,{kind:"accessor",name:"subsurfaceRadiusScale",static:!1,private:!1,access:{has:e=>"subsurfaceRadiusScale"in e,get:e=>e.subsurfaceRadiusScale,set:(e,t)=>{e.subsurfaceRadiusScale=t}},metadata:u},Ui,Wi),h(r,null,wi,{kind:"accessor",name:"subsurfaceRadiusScaleTexture",static:!1,private:!1,access:{has:e=>"subsurfaceRadiusScaleTexture"in e,get:e=>e.subsurfaceRadiusScaleTexture,set:(e,t)=>{e.subsurfaceRadiusScaleTexture=t}},metadata:u},Gi,Hi),h(r,null,Vi,{kind:"accessor",name:"subsurfaceScatterAnisotropy",static:!1,private:!1,access:{has:e=>"subsurfaceScatterAnisotropy"in e,get:e=>e.subsurfaceScatterAnisotropy,set:(e,t)=>{e.subsurfaceScatterAnisotropy=t}},metadata:u},Xi,Yi),h(r,null,Zi,{kind:"accessor",name:"coatWeight",static:!1,private:!1,access:{has:e=>"coatWeight"in e,get:e=>e.coatWeight,set:(e,t)=>{e.coatWeight=t}},metadata:u},Ki,ji),h(r,null,Qi,{kind:"accessor",name:"coatWeightTexture",static:!1,private:!1,access:{has:e=>"coatWeightTexture"in e,get:e=>e.coatWeightTexture,set:(e,t)=>{e.coatWeightTexture=t}},metadata:u},qi,$i),h(r,null,Ji,{kind:"accessor",name:"coatColor",static:!1,private:!1,access:{has:e=>"coatColor"in e,get:e=>e.coatColor,set:(e,t)=>{e.coatColor=t}},metadata:u},er,tr),h(r,null,sr,{kind:"accessor",name:"coatColorTexture",static:!1,private:!1,access:{has:e=>"coatColorTexture"in e,get:e=>e.coatColorTexture,set:(e,t)=>{e.coatColorTexture=t}},metadata:u},ir,rr),h(r,null,ar,{kind:"accessor",name:"coatRoughness",static:!1,private:!1,access:{has:e=>"coatRoughness"in e,get:e=>e.coatRoughness,set:(e,t)=>{e.coatRoughness=t}},metadata:u},nr,lr),h(r,null,or,{kind:"accessor",name:"coatRoughnessTexture",static:!1,private:!1,access:{has:e=>"coatRoughnessTexture"in e,get:e=>e.coatRoughnessTexture,set:(e,t)=>{e.coatRoughnessTexture=t}},metadata:u},ur,hr),h(r,null,cr,{kind:"accessor",name:"coatRoughnessAnisotropy",static:!1,private:!1,access:{has:e=>"coatRoughnessAnisotropy"in e,get:e=>e.coatRoughnessAnisotropy,set:(e,t)=>{e.coatRoughnessAnisotropy=t}},metadata:u},_r,fr),h(r,null,Tr,{kind:"accessor",name:"coatRoughnessAnisotropyTexture",static:!1,private:!1,access:{has:e=>"coatRoughnessAnisotropyTexture"in e,get:e=>e.coatRoughnessAnisotropyTexture,set:(e,t)=>{e.coatRoughnessAnisotropyTexture=t}},metadata:u},gr,mr),h(r,null,pr,{kind:"accessor",name:"coatIor",static:!1,private:!1,access:{has:e=>"coatIor"in e,get:e=>e.coatIor,set:(e,t)=>{e.coatIor=t}},metadata:u},dr,xr),h(r,null,Rr,{kind:"accessor",name:"coatDarkening",static:!1,private:!1,access:{has:e=>"coatDarkening"in e,get:e=>e.coatDarkening,set:(e,t)=>{e.coatDarkening=t}},metadata:u},Ar,Er),h(r,null,Sr,{kind:"accessor",name:"coatDarkeningTexture",static:!1,private:!1,access:{has:e=>"coatDarkeningTexture"in e,get:e=>e.coatDarkeningTexture,set:(e,t)=>{e.coatDarkeningTexture=t}},metadata:u},Mr,Ir),h(r,null,br,{kind:"accessor",name:"fuzzWeight",static:!1,private:!1,access:{has:e=>"fuzzWeight"in e,get:e=>e.fuzzWeight,set:(e,t)=>{e.fuzzWeight=t}},metadata:u},yr,Or),h(r,null,Cr,{kind:"accessor",name:"fuzzWeightTexture",static:!1,private:!1,access:{has:e=>"fuzzWeightTexture"in e,get:e=>e.fuzzWeightTexture,set:(e,t)=>{e.fuzzWeightTexture=t}},metadata:u},Fr,Lr),h(r,null,Dr,{kind:"accessor",name:"fuzzColor",static:!1,private:!1,access:{has:e=>"fuzzColor"in e,get:e=>e.fuzzColor,set:(e,t)=>{e.fuzzColor=t}},metadata:u},Pr,Nr),h(r,null,vr,{kind:"accessor",name:"fuzzColorTexture",static:!1,private:!1,access:{has:e=>"fuzzColorTexture"in e,get:e=>e.fuzzColorTexture,set:(e,t)=>{e.fuzzColorTexture=t}},metadata:u},kr,Br),h(r,null,zr,{kind:"accessor",name:"fuzzRoughness",static:!1,private:!1,access:{has:e=>"fuzzRoughness"in e,get:e=>e.fuzzRoughness,set:(e,t)=>{e.fuzzRoughness=t}},metadata:u},Ur,Wr),h(r,null,wr,{kind:"accessor",name:"fuzzRoughnessTexture",static:!1,private:!1,access:{has:e=>"fuzzRoughnessTexture"in e,get:e=>e.fuzzRoughnessTexture,set:(e,t)=>{e.fuzzRoughnessTexture=t}},metadata:u},Gr,Hr),h(r,null,Vr,{kind:"accessor",name:"geometryThinWalled",static:!1,private:!1,access:{has:e=>"geometryThinWalled"in e,get:e=>e.geometryThinWalled,set:(e,t)=>{e.geometryThinWalled=t}},metadata:u},Xr,Yr),h(r,null,Zr,{kind:"accessor",name:"geometryNormalTexture",static:!1,private:!1,access:{has:e=>"geometryNormalTexture"in e,get:e=>e.geometryNormalTexture,set:(e,t)=>{e.geometryNormalTexture=t}},metadata:u},Kr,jr),h(r,null,Qr,{kind:"accessor",name:"geometryTangent",static:!1,private:!1,access:{has:e=>"geometryTangent"in e,get:e=>e.geometryTangent,set:(e,t)=>{e.geometryTangent=t}},metadata:u},qr,$r),h(r,null,Jr,{kind:"accessor",name:"geometryTangentTexture",static:!1,private:!1,access:{has:e=>"geometryTangentTexture"in e,get:e=>e.geometryTangentTexture,set:(e,t)=>{e.geometryTangentTexture=t}},metadata:u},ea,ta),h(r,null,sa,{kind:"accessor",name:"geometryCoatNormalTexture",static:!1,private:!1,access:{has:e=>"geometryCoatNormalTexture"in e,get:e=>e.geometryCoatNormalTexture,set:(e,t)=>{e.geometryCoatNormalTexture=t}},metadata:u},ia,ra),h(r,null,aa,{kind:"accessor",name:"geometryCoatTangent",static:!1,private:!1,access:{has:e=>"geometryCoatTangent"in e,get:e=>e.geometryCoatTangent,set:(e,t)=>{e.geometryCoatTangent=t}},metadata:u},na,la),h(r,null,oa,{kind:"accessor",name:"geometryCoatTangentTexture",static:!1,private:!1,access:{has:e=>"geometryCoatTangentTexture"in e,get:e=>e.geometryCoatTangentTexture,set:(e,t)=>{e.geometryCoatTangentTexture=t}},metadata:u},ua,ha),h(r,null,ca,{kind:"accessor",name:"geometryOpacity",static:!1,private:!1,access:{has:e=>"geometryOpacity"in e,get:e=>e.geometryOpacity,set:(e,t)=>{e.geometryOpacity=t}},metadata:u},_a,fa),h(r,null,Ta,{kind:"accessor",name:"geometryOpacityTexture",static:!1,private:!1,access:{has:e=>"geometryOpacityTexture"in e,get:e=>e.geometryOpacityTexture,set:(e,t)=>{e.geometryOpacityTexture=t}},metadata:u},ga,ma),h(r,null,pa,{kind:"accessor",name:"geometryThickness",static:!1,private:!1,access:{has:e=>"geometryThickness"in e,get:e=>e.geometryThickness,set:(e,t)=>{e.geometryThickness=t}},metadata:u},da,xa),h(r,null,Ra,{kind:"accessor",name:"geometryThicknessTexture",static:!1,private:!1,access:{has:e=>"geometryThicknessTexture"in e,get:e=>e.geometryThicknessTexture,set:(e,t)=>{e.geometryThicknessTexture=t}},metadata:u},Aa,Ea),h(r,null,Sa,{kind:"accessor",name:"emissionLuminance",static:!1,private:!1,access:{has:e=>"emissionLuminance"in e,get:e=>e.emissionLuminance,set:(e,t)=>{e.emissionLuminance=t}},metadata:u},Ma,Ia),h(r,null,ba,{kind:"accessor",name:"emissionColor",static:!1,private:!1,access:{has:e=>"emissionColor"in e,get:e=>e.emissionColor,set:(e,t)=>{e.emissionColor=t}},metadata:u},ya,Oa),h(r,null,Ca,{kind:"accessor",name:"emissionColorTexture",static:!1,private:!1,access:{has:e=>"emissionColorTexture"in e,get:e=>e.emissionColorTexture,set:(e,t)=>{e.emissionColorTexture=t}},metadata:u},Fa,La),h(r,null,Da,{kind:"accessor",name:"thinFilmWeight",static:!1,private:!1,access:{has:e=>"thinFilmWeight"in e,get:e=>e.thinFilmWeight,set:(e,t)=>{e.thinFilmWeight=t}},metadata:u},Pa,Na),h(r,null,va,{kind:"accessor",name:"thinFilmWeightTexture",static:!1,private:!1,access:{has:e=>"thinFilmWeightTexture"in e,get:e=>e.thinFilmWeightTexture,set:(e,t)=>{e.thinFilmWeightTexture=t}},metadata:u},ka,Ba),h(r,null,za,{kind:"accessor",name:"thinFilmThickness",static:!1,private:!1,access:{has:e=>"thinFilmThickness"in e,get:e=>e.thinFilmThickness,set:(e,t)=>{e.thinFilmThickness=t}},metadata:u},Ua,Wa),h(r,null,wa,{kind:"accessor",name:"thinFilmThicknessMin",static:!1,private:!1,access:{has:e=>"thinFilmThicknessMin"in e,get:e=>e.thinFilmThicknessMin,set:(e,t)=>{e.thinFilmThicknessMin=t}},metadata:u},Ga,Ha),h(r,null,Va,{kind:"accessor",name:"thinFilmThicknessTexture",static:!1,private:!1,access:{has:e=>"thinFilmThicknessTexture"in e,get:e=>e.thinFilmThicknessTexture,set:(e,t)=>{e.thinFilmThicknessTexture=t}},metadata:u},Xa,Ya),h(r,null,Za,{kind:"accessor",name:"thinFilmIor",static:!1,private:!1,access:{has:e=>"thinFilmIor"in e,get:e=>e.thinFilmIor,set:(e,t)=>{e.thinFilmIor=t}},metadata:u},Ka,ja),h(r,null,Qa,{kind:"accessor",name:"ambientOcclusionTexture",static:!1,private:!1,access:{has:e=>"ambientOcclusionTexture"in e,get:e=>e.ambientOcclusionTexture,set:(e,t)=>{e.ambientOcclusionTexture=t}},metadata:u},qa,$a),h(r,null,Ja,{kind:"accessor",name:"directIntensity",static:!1,private:!1,access:{has:e=>"directIntensity"in e,get:e=>e.directIntensity,set:(e,t)=>{e.directIntensity=t}},metadata:u},en,tn),h(r,null,sn,{kind:"accessor",name:"environmentIntensity",static:!1,private:!1,access:{has:e=>"environmentIntensity"in e,get:e=>e.environmentIntensity,set:(e,t)=>{e.environmentIntensity=t}},metadata:u},rn,an),h(r,null,nn,{kind:"accessor",name:"useSpecularWeightFromTextureAlpha",static:!1,private:!1,access:{has:e=>"useSpecularWeightFromTextureAlpha"in e,get:e=>e.useSpecularWeightFromTextureAlpha,set:(e,t)=>{e.useSpecularWeightFromTextureAlpha=t}},metadata:u},ln,on),h(r,null,un,{kind:"accessor",name:"forceAlphaTest",static:!1,private:!1,access:{has:e=>"forceAlphaTest"in e,get:e=>e.forceAlphaTest,set:(e,t)=>{e.forceAlphaTest=t}},metadata:u},hn,cn),h(r,null,_n,{kind:"accessor",name:"alphaCutOff",static:!1,private:!1,access:{has:e=>"alphaCutOff"in e,get:e=>e.alphaCutOff,set:(e,t)=>{e.alphaCutOff=t}},metadata:u},fn,Tn),h(r,null,gn,{kind:"accessor",name:"useAmbientOcclusionFromMetallicTextureRed",static:!1,private:!1,access:{has:e=>"useAmbientOcclusionFromMetallicTextureRed"in e,get:e=>e.useAmbientOcclusionFromMetallicTextureRed,set:(e,t)=>{e.useAmbientOcclusionFromMetallicTextureRed=t}},metadata:u},mn,pn),h(r,null,dn,{kind:"accessor",name:"useAmbientInGrayScale",static:!1,private:!1,access:{has:e=>"useAmbientInGrayScale"in e,get:e=>e.useAmbientInGrayScale,set:(e,t)=>{e.useAmbientInGrayScale=t}},metadata:u},xn,Rn),h(r,null,An,{kind:"getter",name:"usePhysicalLightFalloff",static:!1,private:!1,access:{has:e=>"usePhysicalLightFalloff"in e,get:e=>e.usePhysicalLightFalloff},metadata:u},null,kt),h(r,null,En,{kind:"getter",name:"useGLTFLightFalloff",static:!1,private:!1,access:{has:e=>"useGLTFLightFalloff"in e,get:e=>e.useGLTFLightFalloff},metadata:u},null,kt),h(r,null,Sn,{kind:"accessor",name:"useObjectSpaceNormalMap",static:!1,private:!1,access:{has:e=>"useObjectSpaceNormalMap"in e,get:e=>e.useObjectSpaceNormalMap,set:(e,t)=>{e.useObjectSpaceNormalMap=t}},metadata:u},Mn,In),h(r,null,bn,{kind:"accessor",name:"useParallax",static:!1,private:!1,access:{has:e=>"useParallax"in e,get:e=>e.useParallax,set:(e,t)=>{e.useParallax=t}},metadata:u},yn,On),h(r,null,Cn,{kind:"accessor",name:"useParallaxOcclusion",static:!1,private:!1,access:{has:e=>"useParallaxOcclusion"in e,get:e=>e.useParallaxOcclusion,set:(e,t)=>{e.useParallaxOcclusion=t}},metadata:u},Fn,Ln),h(r,null,Dn,{kind:"accessor",name:"parallaxScaleBias",static:!1,private:!1,access:{has:e=>"parallaxScaleBias"in e,get:e=>e.parallaxScaleBias,set:(e,t)=>{e.parallaxScaleBias=t}},metadata:u},Pn,Nn),h(r,null,vn,{kind:"accessor",name:"disableLighting",static:!1,private:!1,access:{has:e=>"disableLighting"in e,get:e=>e.disableLighting,set:(e,t)=>{e.disableLighting=t}},metadata:u},kn,Bn),h(r,null,zn,{kind:"accessor",name:"forceIrradianceInFragment",static:!1,private:!1,access:{has:e=>"forceIrradianceInFragment"in e,get:e=>e.forceIrradianceInFragment,set:(e,t)=>{e.forceIrradianceInFragment=t}},metadata:u},Un,Wn),h(r,null,wn,{kind:"accessor",name:"maxSimultaneousLights",static:!1,private:!1,access:{has:e=>"maxSimultaneousLights"in e,get:e=>e.maxSimultaneousLights,set:(e,t)=>{e.maxSimultaneousLights=t}},metadata:u},Gn,Hn),h(r,null,Vn,{kind:"accessor",name:"invertNormalMapX",static:!1,private:!1,access:{has:e=>"invertNormalMapX"in e,get:e=>e.invertNormalMapX,set:(e,t)=>{e.invertNormalMapX=t}},metadata:u},Xn,Yn),h(r,null,Zn,{kind:"accessor",name:"invertNormalMapY",static:!1,private:!1,access:{has:e=>"invertNormalMapY"in e,get:e=>e.invertNormalMapY,set:(e,t)=>{e.invertNormalMapY=t}},metadata:u},Kn,jn),h(r,null,Qn,{kind:"accessor",name:"twoSidedLighting",static:!1,private:!1,access:{has:e=>"twoSidedLighting"in e,get:e=>e.twoSidedLighting,set:(e,t)=>{e.twoSidedLighting=t}},metadata:u},qn,$n),h(r,null,Jn,{kind:"accessor",name:"useAlphaFresnel",static:!1,private:!1,access:{has:e=>"useAlphaFresnel"in e,get:e=>e.useAlphaFresnel,set:(e,t)=>{e.useAlphaFresnel=t}},metadata:u},el,tl),h(r,null,sl,{kind:"accessor",name:"useLinearAlphaFresnel",static:!1,private:!1,access:{has:e=>"useLinearAlphaFresnel"in e,get:e=>e.useLinearAlphaFresnel,set:(e,t)=>{e.useLinearAlphaFresnel=t}},metadata:u},il,rl),h(r,null,al,{kind:"accessor",name:"environmentBRDFTexture",static:!1,private:!1,access:{has:e=>"environmentBRDFTexture"in e,get:e=>e.environmentBRDFTexture,set:(e,t)=>{e.environmentBRDFTexture=t}},metadata:u},nl,ll),h(r,null,ol,{kind:"accessor",name:"forceNormalForward",static:!1,private:!1,access:{has:e=>"forceNormalForward"in e,get:e=>e.forceNormalForward,set:(e,t)=>{e.forceNormalForward=t}},metadata:u},ul,hl),h(r,null,cl,{kind:"accessor",name:"enableSpecularAntiAliasing",static:!1,private:!1,access:{has:e=>"enableSpecularAntiAliasing"in e,get:e=>e.enableSpecularAntiAliasing,set:(e,t)=>{e.enableSpecularAntiAliasing=t}},metadata:u},_l,fl),h(r,null,Tl,{kind:"accessor",name:"useHorizonOcclusion",static:!1,private:!1,access:{has:e=>"useHorizonOcclusion"in e,get:e=>e.useHorizonOcclusion,set:(e,t)=>{e.useHorizonOcclusion=t}},metadata:u},gl,ml),h(r,null,pl,{kind:"accessor",name:"useRadianceOcclusion",static:!1,private:!1,access:{has:e=>"useRadianceOcclusion"in e,get:e=>e.useRadianceOcclusion,set:(e,t)=>{e.useRadianceOcclusion=t}},metadata:u},dl,xl),h(r,null,Rl,{kind:"accessor",name:"unlit",static:!1,private:!1,access:{has:e=>"unlit"in e,get:e=>e.unlit,set:(e,t)=>{e.unlit=t}},metadata:u},Al,El),h(r,null,Sl,{kind:"accessor",name:"applyDecalMapAfterDetailMap",static:!1,private:!1,access:{has:e=>"applyDecalMapAfterDetailMap"in e,get:e=>e.applyDecalMapAfterDetailMap,set:(e,t)=>{e.applyDecalMapAfterDetailMap=t}},metadata:u},Ml,Il),h(r,null,bl,{kind:"accessor",name:"debugMode",static:!1,private:!1,access:{has:e=>"debugMode"in e,get:e=>e.debugMode,set:(e,t)=>{e.debugMode=t}},metadata:u},yl,Ol),h(r,null,Cl,{kind:"getter",name:"transparencyMode",static:!1,private:!1,access:{has:e=>"transparencyMode"in e,get:e=>e.transparencyMode},metadata:u},null,kt),u&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:u})})(),r.SSS_QUALITY_LOW=0,r.SSS_QUALITY_MEDIUM=1,r.SSS_QUALITY_HIGH=2,r._noiseTextures={},r.ForceGLSL=!1,r})(),zl=!1;function tu(){zl||(zl=!0,Do(),Po("BABYLON.OpenPBRMaterial",qo))}export{qo as OpenPBRMaterial,Bl as OpenPBRMaterialDefines,tu as RegisterOpenpbrMaterial};
|