python-cad-tools 0.1.0rc1__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/__init__.py +10 -0
- python_cad_tools/_locking.py +63 -0
- python_cad_tools/_project_loader.py +273 -0
- python_cad_tools/_project_state.py +65 -0
- python_cad_tools/_scaffold.py +66 -0
- python_cad_tools/_transaction.py +208 -0
- python_cad_tools/_viewer_static/app.webmanifest +18 -0
- python_cad_tools/_viewer_static/asset-manifest.json +1 -0
- python_cad_tools/_viewer_static/assets/animationGroup-Sd34ntWg.js +1 -0
- python_cad_tools/_viewer_static/assets/bakedVertexAnimation-Cd_pRdrn.js +316 -0
- python_cad_tools/_viewer_static/assets/basisTextureLoader-DWgvS_1G.js +1 -0
- python_cad_tools/_viewer_static/assets/brdfTextureTools-CWGiG1W2.js +2 -0
- python_cad_tools/_viewer_static/assets/bumpFragment-CWULheF1.js +127 -0
- python_cad_tools/_viewer_static/assets/bumpVertex-DqzFZayE.js +6 -0
- python_cad_tools/_viewer_static/assets/bumpVertexDeclaration-C5EFyTio.js +6 -0
- python_cad_tools/_viewer_static/assets/clipPlaneFragment-BXRtt4jj.js +46 -0
- python_cad_tools/_viewer_static/assets/clipPlaneVertex-B_VhD1oQ.js +37 -0
- python_cad_tools/_viewer_static/assets/cubemapToSphericalPolynomial-DRpaukza.js +1 -0
- python_cad_tools/_viewer_static/assets/dds-Dkb2Cx2N.js +1 -0
- python_cad_tools/_viewer_static/assets/dds.pure-DtvJsKvY.js +1 -0
- python_cad_tools/_viewer_static/assets/ddsTextureLoader-H78xux1g.js +1 -0
- python_cad_tools/_viewer_static/assets/default.fragment-oSQ-tWhe.js +469 -0
- python_cad_tools/_viewer_static/assets/default.vertex-DhFjw_Da.js +209 -0
- python_cad_tools/_viewer_static/assets/defaultUboDeclaration-BMDHNppx.js +5 -0
- python_cad_tools/_viewer_static/assets/dumpTools-BaNZPjUX.js +2 -0
- python_cad_tools/_viewer_static/assets/envTextureLoader-V0YnLcIM.js +1 -0
- python_cad_tools/_viewer_static/assets/exrTextureLoader-CjGyIK3x.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphApplyForceBlock-CW5nuobR.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphApplyImpulseBlock-LFqYIkhj.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphArrayIndexBlock-BMOHUbBm.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphBezierCurveEasingBlock-knmTiuEk.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphBinaryOperationBlock-DFLuCAKJ.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphBranchBlock-BJRHMXMo.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphCachedOperationBlock-Dng-6jE0.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphCancelDelayBlock-CgbK3CQZ.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphCodeExecutionBlock-8zMtq9tg.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphConditionalDataBlock-BiLr2rkI.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphConsoleLogBlock-J1vcCtNP.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphConstantBlock-CFb5nuaV.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphContextBlock-DAeGVzhC.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphCounterBlock-lZlAQiJd.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphDataSwitchBlock-BIzvmbVy.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphDebounceBlock-DvNuMVwy.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphDebugBlock-Dymd2VEE.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphDoNBlock-v68aoNLH.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphEasingBlock-CTnGv92q.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphFlipFlopBlock-DXsO0Chw.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphForLoopBlock-CPpe9T75.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphFunctionReferenceBlock-DjDev4Pq.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGLTFDataProvider-GIYCz4AQ.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGetAngularVelocityBlock-BStkOVeL.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGetAssetBlock-Eiqoivbz.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGetLinearVelocityBlock-B0cpV5ws.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGetPhysicsMassPropertiesBlock-B-H64yaI.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGetPropertyBlock-CUyOsPw0.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGetSoundVolumeBlock-C0FjrsUz.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphGetVariableBlock-O4597zBl.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphIndexOfBlock-E00Z3KXM.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphInterpolationBlock-DnkA9MNH.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphIsKeyPressedBlock-DDfeuAyf.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphIsSoundPlayingBlock-DMXg8jdM.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphJsonPointerParserBlock-OmCorK0y.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphKeyDownEventBlock-RuVtj6g2.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphKeyUpEventBlock-DO4pAfHi.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphKeyboardEventBlock-Bx3pAzzh.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphMathBlocks-7W1XYOC8.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphMathCombineExtractBlocks-a4f0Kv6e.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphMatrixMathBlocks-C5Z-y1Au.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphMeshPickEventBlock-D4m-I4CS.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphMultiGateBlock-BISVSMw6.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPauseAnimationBlock-BYP2Z-HG.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPauseSoundBlock-Drh1EeW6.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPhysicsCollisionEventBlock-BoziAQ75.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPlayAnimationBlock-Clry-68M.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPlaySoundBlock-LbBVxGBE.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPointerDownEventBlock-DIVXCSHh.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPointerMoveEventBlock-BNNOzY2W.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPointerOutEventBlock-B8f2dOFT.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPointerOverEventBlock-CQr8LCee.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphPointerUpEventBlock-DMg_iEHl.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphReceiveCustomEventBlock-B8GJm9Ai.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSceneReadyEventBlock-Dcdb29K2.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSceneTickEventBlock-BLE5p4mi.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSendCustomEventBlock-BMzDItQ5.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSequenceBlock-DRURovjn.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSetAngularVelocityBlock-Ba8dhkLM.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSetDelayBlock-CnQR--Gn.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSetLinearVelocityBlock-Dm1r3vkh.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSetPhysicsMotionTypeBlock-BNtMLimi.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSetPropertyBlock-C-uv2jhP.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSetSoundVolumeBlock-D9LDx3lg.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSetVariableBlock-DszzRB5X.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSoundEndedEventBlock-DeTDSudb.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphStopAnimationBlock-DWuwoFWr.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphStopSoundBlock-DEnj2cQw.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphSwitchBlock-zs8Fp9ky.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphThrottleBlock-BYAKUQXd.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphTransformCoordinatesSystemBlock-DYP54m5P.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphTypeToTypeBlocks-vFwn79bS.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphUnaryOperationBlock-CaRh4Ef0.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphVectorMathBlocks-BEIhMs-A.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphWaitAllBlock-DFbELP_j.js +1 -0
- python_cad_tools/_viewer_static/assets/flowGraphWhileLoopBlock-C1OKQ-_F.js +1 -0
- python_cad_tools/_viewer_static/assets/fogFragment-DtDlQBnz.js +25 -0
- python_cad_tools/_viewer_static/assets/gaussianSplatting-Cfigjb15.js +242 -0
- python_cad_tools/_viewer_static/assets/gaussianSplatting-DIn8R8oF.js +296 -0
- python_cad_tools/_viewer_static/assets/gaussianSplatting.fragment-BxeRJ2k-.js +38 -0
- python_cad_tools/_viewer_static/assets/gaussianSplatting.fragment-DNDmvRs-.js +37 -0
- python_cad_tools/_viewer_static/assets/gaussianSplatting.vertex-D92z5jYn.js +86 -0
- python_cad_tools/_viewer_static/assets/gaussianSplatting.vertex-DSWfFnKQ.js +86 -0
- python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.fragment-DBQE2gDk.js +12 -0
- python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.fragment-qwx5ntqJ.js +17 -0
- python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.vertex-CP2kd3jU.js +30 -0
- python_cad_tools/_viewer_static/assets/gaussianSplattingVoxel.vertex-Dr-fEg_W.js +19 -0
- python_cad_tools/_viewer_static/assets/geometry.fragment-CsJIm2H0.js +242 -0
- python_cad_tools/_viewer_static/assets/geometry.fragment-Dph3muZt.js +262 -0
- python_cad_tools/_viewer_static/assets/geometry.vertex-BXGMTA_J.js +212 -0
- python_cad_tools/_viewer_static/assets/geometry.vertex-Bm9Wg3Gi.js +214 -0
- python_cad_tools/_viewer_static/assets/glowBlurPostProcess.fragment-BJSwKIJD.js +7 -0
- python_cad_tools/_viewer_static/assets/glowMapGeneration.fragment-DcyS1cTF.js +63 -0
- python_cad_tools/_viewer_static/assets/glowMapGeneration.vertex-BGq1Fakj.js +75 -0
- python_cad_tools/_viewer_static/assets/glowMapMerge.fragment-DxcneU_F.js +25 -0
- python_cad_tools/_viewer_static/assets/glowMapMerge.vertex-DaJJKqMV.js +8 -0
- python_cad_tools/_viewer_static/assets/harmonicsFunctions-DzJcvNWG.js +16 -0
- python_cad_tools/_viewer_static/assets/hdrTextureLoader-BGQvgh0h.js +2 -0
- python_cad_tools/_viewer_static/assets/helperFunctions-Cugfp1Fz.js +87 -0
- python_cad_tools/_viewer_static/assets/iesTextureLoader-CO4G0p2M.js +2 -0
- python_cad_tools/_viewer_static/assets/index-B2zBEWsq.js +7007 -0
- python_cad_tools/_viewer_static/assets/index-DcTTrc-8.css +1 -0
- python_cad_tools/_viewer_static/assets/kernelBlur.fragment-B6CTXTxY.js +57 -0
- python_cad_tools/_viewer_static/assets/kernelBlur.fragment-BkKbudbW.js +57 -0
- python_cad_tools/_viewer_static/assets/kernelBlur.vertex-BYwFU5IS.js +11 -0
- python_cad_tools/_viewer_static/assets/kernelBlur.vertex-D371zUfT.js +11 -0
- python_cad_tools/_viewer_static/assets/kernelBlurVaryingDeclaration-CgBGaCHg.js +1 -0
- python_cad_tools/_viewer_static/assets/kernelBlurVaryingDeclaration-YS8JpqdO.js +1 -0
- python_cad_tools/_viewer_static/assets/ktxTextureLoader-ncMSJTjl.js +1 -0
- python_cad_tools/_viewer_static/assets/lightFragment-skHiFbKB.js +398 -0
- python_cad_tools/_viewer_static/assets/logDepthDeclaration-BR8XRz9F.js +4 -0
- python_cad_tools/_viewer_static/assets/logDepthVertex-UKrhEIvg.js +14 -0
- python_cad_tools/_viewer_static/assets/mainUVVaryingDeclaration-BxQWGFcG.js +4 -0
- python_cad_tools/_viewer_static/assets/mesh.vertexData.functions-ayNlGC5K.js +1 -0
- python_cad_tools/_viewer_static/assets/meshUboDeclaration-BnX046aQ.js +4 -0
- python_cad_tools/_viewer_static/assets/oitFragment-CTMCOfNP.js +605 -0
- python_cad_tools/_viewer_static/assets/openpbr.fragment-DPJPqi6p.js +1530 -0
- python_cad_tools/_viewer_static/assets/openpbr.fragment-Dv6qTVVi.js +1384 -0
- python_cad_tools/_viewer_static/assets/openpbr.vertex-Bn2wrdGL.js +364 -0
- python_cad_tools/_viewer_static/assets/openpbr.vertex-CHESW3gB.js +251 -0
- python_cad_tools/_viewer_static/assets/openpbrMaterial.pure-BdK7VgO_.js +3 -0
- python_cad_tools/_viewer_static/assets/openpbrMaterialLoadingAdapter-Bm_AHDUN.js +4 -0
- python_cad_tools/_viewer_static/assets/openpbrTransmissionLayerData-BDa9qEoN.js +339 -0
- python_cad_tools/_viewer_static/assets/openpbrTransmissionLayerData-Ba_ly4LE.js +343 -0
- python_cad_tools/_viewer_static/assets/openpbrUboDeclaration-BY2lSH2C.js +5 -0
- python_cad_tools/_viewer_static/assets/openpbrUboDeclaration-DajhikDS.js +6 -0
- python_cad_tools/_viewer_static/assets/packingFunctions-BHPwcGG2.js +4 -0
- python_cad_tools/_viewer_static/assets/packingFunctions-DTwzBRBx.js +4 -0
- python_cad_tools/_viewer_static/assets/pass.fragment-9oKU4pI3.js +4 -0
- python_cad_tools/_viewer_static/assets/passCube.fragment-CpAeiYx1.js +23 -0
- python_cad_tools/_viewer_static/assets/passCube.fragment-DHtSWVRF.js +23 -0
- python_cad_tools/_viewer_static/assets/pbr.fragment-cIhMKwLs.js +2560 -0
- python_cad_tools/_viewer_static/assets/pbr.vertex-BfdONsf2.js +255 -0
- python_cad_tools/_viewer_static/assets/pbrBRDFFunctions-B_ppOzPO.js +173 -0
- python_cad_tools/_viewer_static/assets/pbrDebug-DDdwL5_t.js +693 -0
- python_cad_tools/_viewer_static/assets/pbrIBLFunctions-b1zdpzOP.js +43 -0
- python_cad_tools/_viewer_static/assets/pbrMaterial.pure-BZA7yVhu.js +2 -0
- python_cad_tools/_viewer_static/assets/pbrMaterialLoadingAdapter-BRvKRnjl.js +1 -0
- python_cad_tools/_viewer_static/assets/pbrUboDeclaration-CMZp25k3.js +5 -0
- python_cad_tools/_viewer_static/assets/postprocess.vertex-DzdUpNbW.js +9 -0
- python_cad_tools/_viewer_static/assets/procedural.vertex-BnbuQ-1f.js +7 -0
- python_cad_tools/_viewer_static/assets/procedural.vertex-Dp-Ng7Pc.js +8 -0
- python_cad_tools/_viewer_static/assets/reflectionFunction-DBlr3oDs.js +83 -0
- python_cad_tools/_viewer_static/assets/rgbdDecode.fragment-CyvnZFOJ.js +5 -0
- python_cad_tools/_viewer_static/assets/rgbdEncode.fragment-Dz4zLnoD.js +5 -0
- python_cad_tools/_viewer_static/assets/rgbdEncode.fragment-iscgpA1_.js +5 -0
- python_cad_tools/_viewer_static/assets/sceneUboDeclaration-BzFIc4mb.js +11 -0
- python_cad_tools/_viewer_static/assets/textureProcessor.fragment-C9D0rd-M.js +151 -0
- python_cad_tools/_viewer_static/assets/textureProcessor.fragment-JMKyWZng.js +146 -0
- python_cad_tools/_viewer_static/assets/tgaTextureLoader-oxTElIQJ.js +1 -0
- python_cad_tools/_viewer_static/assets/vertexColorMixing-mdC9xZe1.js +418 -0
- python_cad_tools/_viewer_static/favicon.svg +10 -0
- python_cad_tools/_viewer_static/index.html +18 -0
- python_cad_tools/_viewer_static/sw.js +61 -0
- python_cad_tools/artifacts.py +546 -0
- python_cad_tools/build-info.json +1 -0
- python_cad_tools/build.py +270 -0
- python_cad_tools/cli.py +212 -0
- python_cad_tools/context.py +67 -0
- python_cad_tools/determinism.py +66 -0
- python_cad_tools/drawings/__init__.py +124 -0
- python_cad_tools/drawings/_catalog.py +79 -0
- python_cad_tools/drawings/_validation.py +238 -0
- python_cad_tools/elements.py +121 -0
- python_cad_tools/exceptions.py +45 -0
- python_cad_tools/exporters/__init__.py +8 -0
- python_cad_tools/exporters/base.py +24 -0
- python_cad_tools/exporters/drawings/__init__.py +5 -0
- python_cad_tools/exporters/drawings/annotations.py +444 -0
- python_cad_tools/exporters/drawings/dxf.py +110 -0
- python_cad_tools/exporters/drawings/model.py +70 -0
- python_cad_tools/exporters/drawings/pdf.py +119 -0
- python_cad_tools/exporters/drawings/primitives.py +93 -0
- python_cad_tools/exporters/drawings/projection.py +64 -0
- python_cad_tools/exporters/drawings/svg.py +135 -0
- python_cad_tools/exporters/glb.py +100 -0
- python_cad_tools/exporters/ifc.py +229 -0
- python_cad_tools/exporters/quantities.py +136 -0
- python_cad_tools/exporters/step.py +117 -0
- python_cad_tools/geometry.py +187 -0
- python_cad_tools/manifests.py +338 -0
- python_cad_tools/project_config.py +174 -0
- python_cad_tools/py.typed +1 -0
- python_cad_tools/runtime_sync.py +126 -0
- python_cad_tools/schemas/build-manifest-1.json +1 -0
- python_cad_tools/schemas/design-manifest-1.json +1 -0
- python_cad_tools/schemas/download-manifest-2.json +46 -0
- python_cad_tools/schemas/drawing-annotations-1.json +66 -0
- python_cad_tools/schemas/glb-manifest-1.json +1 -0
- python_cad_tools/schemas/ifc-validation-1.json +1 -0
- python_cad_tools/schemas/quantities-1.json +1 -0
- python_cad_tools/schemas/run-metadata-1.json +1 -0
- python_cad_tools/schemas/site-metadata-1.json +34 -0
- python_cad_tools/schemas/step-validation-1.json +1 -0
- python_cad_tools/site.py +676 -0
- python_cad_tools/templates/project/.gitignore +9 -0
- python_cad_tools/templates/project/README.md +38 -0
- python_cad_tools/templates/project/config.py +36 -0
- python_cad_tools/templates/project/drawing_annotations.py +117 -0
- python_cad_tools/templates/project/model.py +87 -0
- python_cad_tools/templates/project/pyproject.toml +27 -0
- python_cad_tools/units.py +207 -0
- python_cad_tools/validation.py +153 -0
- python_cad_tools-0.1.0rc1.dist-info/METADATA +149 -0
- python_cad_tools-0.1.0rc1.dist-info/RECORD +236 -0
- python_cad_tools-0.1.0rc1.dist-info/WHEEL +5 -0
- python_cad_tools-0.1.0rc1.dist-info/entry_points.txt +2 -0
- python_cad_tools-0.1.0rc1.dist-info/licenses/LICENSE +679 -0
- python_cad_tools-0.1.0rc1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import{S as e}from"./index-B2zBEWsq.js";const r="pbrFragmentReflectionDeclaration",i=`#ifdef REFLECTION
|
|
2
|
+
#ifdef REFLECTIONMAP_3D
|
|
3
|
+
var reflectionSamplerSampler: sampler;var reflectionSampler: texture_cube<f32>;
|
|
4
|
+
#ifdef LODBASEDMICROSFURACE
|
|
5
|
+
#else
|
|
6
|
+
var reflectionLowSamplerSampler: sampler;var reflectionLowSampler: texture_cube<f32>;var reflectionHighSamplerSampler: sampler;var reflectionHighSampler: texture_cube<f32>;
|
|
7
|
+
#endif
|
|
8
|
+
#ifdef USEIRRADIANCEMAP
|
|
9
|
+
var irradianceSamplerSampler: sampler;var irradianceSampler: texture_cube<f32>;
|
|
10
|
+
#endif
|
|
11
|
+
#else
|
|
12
|
+
var reflectionSamplerSampler: sampler;var reflectionSampler: texture_2d<f32>;
|
|
13
|
+
#ifdef LODBASEDMICROSFURACE
|
|
14
|
+
#else
|
|
15
|
+
var reflectionLowSamplerSampler: sampler;var reflectionLowSampler: texture_2d<f32>;var reflectionHighSamplerSampler: sampler;var reflectionHighSampler: texture_2d<f32>;
|
|
16
|
+
#endif
|
|
17
|
+
#ifdef USEIRRADIANCEMAP
|
|
18
|
+
var irradianceSamplerSampler: sampler;var irradianceSampler: texture_2d<f32>;
|
|
19
|
+
#endif
|
|
20
|
+
#endif
|
|
21
|
+
#ifdef REFLECTIONMAP_SKYBOX
|
|
22
|
+
varying vPositionUVW: vec3f;
|
|
23
|
+
#else
|
|
24
|
+
#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
|
|
25
|
+
varying vDirectionW: vec3f;
|
|
26
|
+
#endif
|
|
27
|
+
#endif
|
|
28
|
+
#endif
|
|
29
|
+
`;e.IncludesShadersStoreWGSL[r]||(e.IncludesShadersStoreWGSL[r]=i);const o={name:r,shader:i},a="pbrIBLFunctions",n=`#if defined(REFLECTION) || defined(SS_REFRACTION)
|
|
30
|
+
fn getLodFromAlphaG(cubeMapDimensionPixels: f32,microsurfaceAverageSlope: f32)->f32 {var microsurfaceAverageSlopeTexels: f32=cubeMapDimensionPixels*microsurfaceAverageSlope;var lod: f32=log2(microsurfaceAverageSlopeTexels);return lod;}
|
|
31
|
+
fn getLinearLodFromRoughness(cubeMapDimensionPixels: f32,roughness: f32)->f32 {var lod: f32=log2(cubeMapDimensionPixels)*roughness;return lod;}
|
|
32
|
+
#endif
|
|
33
|
+
#if defined(ENVIRONMENTBRDF) && defined(RADIANCEOCCLUSION)
|
|
34
|
+
fn environmentRadianceOcclusion(ambientOcclusion: f32,NdotVUnclamped: f32)->f32 {var temp: f32=NdotVUnclamped+ambientOcclusion;return saturate(temp*temp-1.0+ambientOcclusion);}
|
|
35
|
+
#endif
|
|
36
|
+
#if defined(ENVIRONMENTBRDF) && defined(HORIZONOCCLUSION)
|
|
37
|
+
fn environmentHorizonOcclusion(view: vec3f,normal: vec3f,geometricNormal: vec3f)->f32 {var reflection: vec3f=reflect(view,normal);var temp: f32=saturate(1.0+1.1*dot(reflection,geometricNormal));return temp*temp;}
|
|
38
|
+
#endif
|
|
39
|
+
#if defined(LODINREFLECTIONALPHA) || defined(SS_LODINREFRACTIONALPHA)
|
|
40
|
+
fn UNPACK_LOD(x: f32)->f32 {return (1.0-x)*255.0;}
|
|
41
|
+
fn getLodFromAlphaGNdotV(cubeMapDimensionPixels: f32,alphaG: f32,NdotV: f32)->f32 {var microsurfaceAverageSlope: f32=alphaG;microsurfaceAverageSlope*=sqrt(abs(NdotV));return getLodFromAlphaG(cubeMapDimensionPixels,microsurfaceAverageSlope);}
|
|
42
|
+
#endif
|
|
43
|
+
`;e.IncludesShadersStoreWGSL[a]||(e.IncludesShadersStoreWGSL[a]=n);const l={name:a,shader:n};export{l as a,o as p};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./pbr.vertex-BfdONsf2.js","./index-B2zBEWsq.js","./index-DcTTrc-8.css","./sceneUboDeclaration-BzFIc4mb.js","./meshUboDeclaration-BnX046aQ.js","./pbrUboDeclaration-CMZp25k3.js","./vertexColorMixing-mdC9xZe1.js","./mainUVVaryingDeclaration-BxQWGFcG.js","./helperFunctions-Cugfp1Fz.js","./pbrBRDFFunctions-B_ppOzPO.js","./bakedVertexAnimation-Cd_pRdrn.js","./harmonicsFunctions-DzJcvNWG.js","./bumpVertexDeclaration-C5EFyTio.js","./clipPlaneVertex-B_VhD1oQ.js","./logDepthVertex-UKrhEIvg.js","./logDepthDeclaration-BR8XRz9F.js","./bumpVertex-DqzFZayE.js","./pbr.fragment-cIhMKwLs.js","./oitFragment-CTMCOfNP.js","./pbrDebug-DDdwL5_t.js","./reflectionFunction-DBlr3oDs.js","./pbrIBLFunctions-b1zdpzOP.js","./clipPlaneFragment-BXRtt4jj.js","./fogFragment-DtDlQBnz.js","./bumpFragment-CWULheF1.js","./lightFragment-skHiFbKB.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bz as h,bA as _,aO as s,cf as we,aU as u,cc as Be,aV as m,ce as T,c as se,bq as x,c2 as j,bJ as Q,cg as X,ch as xe,a9 as Na,aR as Ue,ci as va,a0 as Bt,a7 as Da,bB as Pa,cj as ka,bC as Ma,L as Ua,bE as Ba,bP as za,bQ as Ha,bR as Ga,bS as Wa,bT as wa,bU as Va,bV as Ya,bG as Ht,bW as Xa,bX as Ka,bY as Gt,bZ as ja,ay as zt,b_ as Qa,b$ as Za,c0 as Ja,c1 as $a,br as qa,c3 as er,c4 as tr,c5 as sr,bF as ir,bH as ar,bI as rr,bK as lr,ck as Nt,bL as nr,bw as ur,bM as cr,b8 as or,bN as hr,bx as _r,bO as Tr,aT as vt,c6 as fr,c8 as mr,c9 as Er,ca as xr,cb as Rr,cl as Ar,bD as ya,c7 as dr,i as Sr}from"./index-B2zBEWsq.js";import{b as Fa}from"./brdfTextureTools-CWGiG1W2.js";class pr extends Be{constructor(){super(...arguments),this.BRDF_V_HEIGHT_CORRELATED=!1,this.MS_BRDF_ENERGY_CONSERVATION=!1,this.SPHERICAL_HARMONICS=!1,this.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=!1,this.MIX_IBL_RADIANCE_WITH_IRRADIANCE=!0,this.LEGACY_SPECULAR_ENERGY_CONSERVATION=!1,this.BASE_DIFFUSE_MODEL=0,this.DIELECTRIC_SPECULAR_MODEL=0,this.CONDUCTOR_SPECULAR_MODEL=0}}let gr=(()=>{var i,v,k,U,G,W,H,l,d,a;let I=we,g,F=[],M=[],P,B=[],p=[],b,y=[],R=[],N,f=[],L=[],V,q=[],te=[],Y,o=[],D=[],J,ae=[],re=[],le,ne=[],ue=[],ce,K=[],c=[];return i=class extends I{get useEnergyConservation(){return h(this,v,"f")}set useEnergyConservation(E){_(this,v,E,"f")}get useSmithVisibilityHeightCorrelated(){return h(this,k,"f")}set useSmithVisibilityHeightCorrelated(E){_(this,k,E,"f")}get useSphericalHarmonics(){return h(this,U,"f")}set useSphericalHarmonics(E){_(this,U,E,"f")}get useSpecularGlossinessInputEnergyConservation(){return h(this,G,"f")}set useSpecularGlossinessInputEnergyConservation(E){_(this,G,E,"f")}get mixIblRadianceWithIrradiance(){return h(this,W,"f")}set mixIblRadianceWithIrradiance(E){_(this,W,E,"f")}get useLegacySpecularEnergyConservation(){return h(this,H,"f")}set useLegacySpecularEnergyConservation(E){_(this,H,E,"f")}get baseDiffuseModel(){return h(this,l,"f")}set baseDiffuseModel(E){_(this,l,E,"f")}get dielectricSpecularModel(){return h(this,d,"f")}set dielectricSpecularModel(E){_(this,d,E,"f")}get conductorSpecularModel(){return h(this,a,"f")}set conductorSpecularModel(E){_(this,a,E,"f")}_markAllSubMeshesAsMiscDirty(){this._internalMarkAllSubMeshesAsMiscDirty()}isCompatible(){return!0}constructor(E,w=!0){super(E,"PBRBRDF",90,new pr,w),this._useEnergyConservation=i.DEFAULT_USE_ENERGY_CONSERVATION,v.set(this,s(this,F,i.DEFAULT_USE_ENERGY_CONSERVATION)),this._useSmithVisibilityHeightCorrelated=(s(this,M),i.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED),k.set(this,s(this,B,i.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED)),this._useSphericalHarmonics=(s(this,p),i.DEFAULT_USE_SPHERICAL_HARMONICS),U.set(this,s(this,y,i.DEFAULT_USE_SPHERICAL_HARMONICS)),this._useSpecularGlossinessInputEnergyConservation=(s(this,R),i.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION),G.set(this,s(this,f,i.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION)),this._mixIblRadianceWithIrradiance=(s(this,L),i.DEFAULT_MIX_IBL_RADIANCE_WITH_IRRADIANCE),W.set(this,s(this,q,i.DEFAULT_MIX_IBL_RADIANCE_WITH_IRRADIANCE)),this._useLegacySpecularEnergyConservation=(s(this,te),i.DEFAULT_USE_LEGACY_SPECULAR_ENERGY_CONSERVATION),H.set(this,s(this,o,i.DEFAULT_USE_LEGACY_SPECULAR_ENERGY_CONSERVATION)),this._baseDiffuseModel=(s(this,D),i.DEFAULT_DIFFUSE_MODEL),l.set(this,s(this,ae,i.DEFAULT_DIFFUSE_MODEL)),this._dielectricSpecularModel=(s(this,re),i.DEFAULT_DIELECTRIC_SPECULAR_MODEL),d.set(this,s(this,ne,i.DEFAULT_DIELECTRIC_SPECULAR_MODEL)),this._conductorSpecularModel=(s(this,ue),i.DEFAULT_CONDUCTOR_SPECULAR_MODEL),a.set(this,s(this,K,i.DEFAULT_CONDUCTOR_SPECULAR_MODEL)),this._internalMarkAllSubMeshesAsMiscDirty=s(this,c),this._internalMarkAllSubMeshesAsMiscDirty=E._dirtyCallbacks[16],this._enable(!0)}prepareDefines(E){E.BRDF_V_HEIGHT_CORRELATED=this._useSmithVisibilityHeightCorrelated,E.MS_BRDF_ENERGY_CONSERVATION=this._useEnergyConservation&&this._useSmithVisibilityHeightCorrelated,E.SPHERICAL_HARMONICS=this._useSphericalHarmonics,E.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=this._useSpecularGlossinessInputEnergyConservation,E.MIX_IBL_RADIANCE_WITH_IRRADIANCE=this._mixIblRadianceWithIrradiance&&!this._material._disableLighting,E.LEGACY_SPECULAR_ENERGY_CONSERVATION=this._useLegacySpecularEnergyConservation,E.BASE_DIFFUSE_MODEL=this._baseDiffuseModel,E.DIELECTRIC_SPECULAR_MODEL=this._dielectricSpecularModel,E.CONDUCTOR_SPECULAR_MODEL=this._conductorSpecularModel}getClassName(){return"PBRBRDFConfiguration"}},v=new WeakMap,k=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,l=new WeakMap,d=new WeakMap,a=new WeakMap,(()=>{const C=typeof Symbol=="function"&&Symbol.metadata?Object.create(I[Symbol.metadata]??null):void 0;g=[m(),T("_markAllSubMeshesAsMiscDirty")],P=[m(),T("_markAllSubMeshesAsMiscDirty")],b=[m(),T("_markAllSubMeshesAsMiscDirty")],N=[m(),T("_markAllSubMeshesAsMiscDirty")],V=[m(),T("_markAllSubMeshesAsMiscDirty")],Y=[m(),T("_markAllSubMeshesAsMiscDirty")],J=[m("baseDiffuseModel"),T("_markAllSubMeshesAsMiscDirty")],le=[m("dielectricSpecularModel"),T("_markAllSubMeshesAsMiscDirty")],ce=[m("conductorSpecularModel"),T("_markAllSubMeshesAsMiscDirty")],u(i,null,g,{kind:"accessor",name:"useEnergyConservation",static:!1,private:!1,access:{has:E=>"useEnergyConservation"in E,get:E=>E.useEnergyConservation,set:(E,w)=>{E.useEnergyConservation=w}},metadata:C},F,M),u(i,null,P,{kind:"accessor",name:"useSmithVisibilityHeightCorrelated",static:!1,private:!1,access:{has:E=>"useSmithVisibilityHeightCorrelated"in E,get:E=>E.useSmithVisibilityHeightCorrelated,set:(E,w)=>{E.useSmithVisibilityHeightCorrelated=w}},metadata:C},B,p),u(i,null,b,{kind:"accessor",name:"useSphericalHarmonics",static:!1,private:!1,access:{has:E=>"useSphericalHarmonics"in E,get:E=>E.useSphericalHarmonics,set:(E,w)=>{E.useSphericalHarmonics=w}},metadata:C},y,R),u(i,null,N,{kind:"accessor",name:"useSpecularGlossinessInputEnergyConservation",static:!1,private:!1,access:{has:E=>"useSpecularGlossinessInputEnergyConservation"in E,get:E=>E.useSpecularGlossinessInputEnergyConservation,set:(E,w)=>{E.useSpecularGlossinessInputEnergyConservation=w}},metadata:C},f,L),u(i,null,V,{kind:"accessor",name:"mixIblRadianceWithIrradiance",static:!1,private:!1,access:{has:E=>"mixIblRadianceWithIrradiance"in E,get:E=>E.mixIblRadianceWithIrradiance,set:(E,w)=>{E.mixIblRadianceWithIrradiance=w}},metadata:C},q,te),u(i,null,Y,{kind:"accessor",name:"useLegacySpecularEnergyConservation",static:!1,private:!1,access:{has:E=>"useLegacySpecularEnergyConservation"in E,get:E=>E.useLegacySpecularEnergyConservation,set:(E,w)=>{E.useLegacySpecularEnergyConservation=w}},metadata:C},o,D),u(i,null,J,{kind:"accessor",name:"baseDiffuseModel",static:!1,private:!1,access:{has:E=>"baseDiffuseModel"in E,get:E=>E.baseDiffuseModel,set:(E,w)=>{E.baseDiffuseModel=w}},metadata:C},ae,re),u(i,null,le,{kind:"accessor",name:"dielectricSpecularModel",static:!1,private:!1,access:{has:E=>"dielectricSpecularModel"in E,get:E=>E.dielectricSpecularModel,set:(E,w)=>{E.dielectricSpecularModel=w}},metadata:C},ne,ue),u(i,null,ce,{kind:"accessor",name:"conductorSpecularModel",static:!1,private:!1,access:{has:E=>"conductorSpecularModel"in E,get:E=>E.conductorSpecularModel,set:(E,w)=>{E.conductorSpecularModel=w}},metadata:C},K,c),C&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:C})})(),i.DEFAULT_USE_ENERGY_CONSERVATION=!0,i.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED=!0,i.DEFAULT_USE_SPHERICAL_HARMONICS=!0,i.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION=!0,i.DEFAULT_MIX_IBL_RADIANCE_WITH_IRRADIANCE=!0,i.DEFAULT_USE_LEGACY_SPECULAR_ENERGY_CONSERVATION=!0,i.DEFAULT_DIFFUSE_MODEL=0,i.DEFAULT_DIELECTRIC_SPECULAR_MODEL=0,i.DEFAULT_CONDUCTOR_SPECULAR_MODEL=0,i})();class Ir extends Be{constructor(){super(...arguments),this.CLEARCOAT=!1,this.CLEARCOAT_DEFAULTIOR=!1,this.CLEARCOAT_TEXTURE=!1,this.CLEARCOAT_TEXTURE_ROUGHNESS=!1,this.CLEARCOAT_TEXTUREDIRECTUV=0,this.CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV=0,this.CLEARCOAT_BUMP=!1,this.CLEARCOAT_BUMPDIRECTUV=0,this.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,this.CLEARCOAT_REMAP_F0=!1,this.CLEARCOAT_TINT=!1,this.CLEARCOAT_TINT_TEXTURE=!1,this.CLEARCOAT_TINT_TEXTUREDIRECTUV=0,this.CLEARCOAT_TINT_GAMMATEXTURE=!1}}let br=(()=>{var i,v,k,U,G,W,H,l,d,a;let I=we,g,F=[],M=[],P,B=[],p=[],b,y=[],R=[],N,f=[],L=[],V,q=[],te=[],Y,o=[],D=[],J,ae=[],re=[],le,ne=[],ue=[],ce,K=[],c=[],C,E=[],w=[],_e,me=[],Re=[],Ae,de=[],Se=[],pe,ge=[],Ie=[],be,Ce=[],Me=[];return i=class extends I{get isEnabled(){return h(this,v,"f")}set isEnabled(r){_(this,v,r,"f")}get indexOfRefraction(){return h(this,k,"f")}set indexOfRefraction(r){_(this,k,r,"f")}get texture(){return h(this,U,"f")}set texture(r){_(this,U,r,"f")}get useRoughnessFromMainTexture(){return h(this,G,"f")}set useRoughnessFromMainTexture(r){_(this,G,r,"f")}get textureRoughness(){return h(this,W,"f")}set textureRoughness(r){_(this,W,r,"f")}get remapF0OnInterfaceChange(){return h(this,H,"f")}set remapF0OnInterfaceChange(r){_(this,H,r,"f")}get bumpTexture(){return h(this,l,"f")}set bumpTexture(r){_(this,l,r,"f")}get isTintEnabled(){return h(this,d,"f")}set isTintEnabled(r){_(this,d,r,"f")}get tintTexture(){return h(this,a,"f")}set tintTexture(r){_(this,a,r,"f")}_markAllSubMeshesAsTexturesDirty(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()}isCompatible(){return!0}constructor(r,O=!0){super(r,"PBRClearCoat",100,new Ir,O),this._isEnabled=!1,v.set(this,s(this,F,!1)),this.intensity=(s(this,M),s(this,B,1)),this.roughness=(s(this,p),s(this,y,0)),this._indexOfRefraction=(s(this,R),i._DefaultIndexOfRefraction),k.set(this,s(this,f,i._DefaultIndexOfRefraction)),this._texture=(s(this,L),null),U.set(this,s(this,q,null)),this._useRoughnessFromMainTexture=(s(this,te),!0),G.set(this,s(this,o,!0)),this._textureRoughness=(s(this,D),null),W.set(this,s(this,ae,null)),this._remapF0OnInterfaceChange=(s(this,re),!0),H.set(this,s(this,ne,!0)),this._bumpTexture=(s(this,ue),null),l.set(this,s(this,K,null)),this._isTintEnabled=(s(this,c),!1),d.set(this,s(this,E,!1)),this.tintColor=(s(this,w),s(this,me,se.White())),this.tintColorAtDistance=(s(this,Re),s(this,de,1)),this.tintThickness=(s(this,Se),s(this,ge,1)),this._tintTexture=(s(this,Ie),null),a.set(this,s(this,Ce,null)),this._internalMarkAllSubMeshesAsTexturesDirty=s(this,Me),this._internalMarkAllSubMeshesAsTexturesDirty=r._dirtyCallbacks[1]}isReadyForSubMesh(r,O,ie){if(!this._isEnabled)return!0;const Ee=this._material._disableBumpMap;return!(r._areTexturesDirty&&O.texturesEnabled&&(this._texture&&x.ClearCoatTextureEnabled&&!this._texture.isReadyOrNotBlocking()||this._textureRoughness&&x.ClearCoatTextureEnabled&&!this._textureRoughness.isReadyOrNotBlocking()||ie.getCaps().standardDerivatives&&this._bumpTexture&&x.ClearCoatBumpTextureEnabled&&!Ee&&!this._bumpTexture.isReady()||this._isTintEnabled&&this._tintTexture&&x.ClearCoatTintTextureEnabled&&!this._tintTexture.isReadyOrNotBlocking()))}prepareDefinesBeforeAttributes(r,O){this._isEnabled?(r.CLEARCOAT=!0,r.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE=this._useRoughnessFromMainTexture,r.CLEARCOAT_REMAP_F0=this._remapF0OnInterfaceChange,r._areTexturesDirty&&O.texturesEnabled&&(this._texture&&x.ClearCoatTextureEnabled?j(this._texture,r,"CLEARCOAT_TEXTURE"):r.CLEARCOAT_TEXTURE=!1,this._textureRoughness&&x.ClearCoatTextureEnabled?j(this._textureRoughness,r,"CLEARCOAT_TEXTURE_ROUGHNESS"):r.CLEARCOAT_TEXTURE_ROUGHNESS=!1,this._bumpTexture&&x.ClearCoatBumpTextureEnabled?j(this._bumpTexture,r,"CLEARCOAT_BUMP"):r.CLEARCOAT_BUMP=!1,r.CLEARCOAT_DEFAULTIOR=this._indexOfRefraction===i._DefaultIndexOfRefraction,this._isTintEnabled?(r.CLEARCOAT_TINT=!0,this._tintTexture&&x.ClearCoatTintTextureEnabled?(j(this._tintTexture,r,"CLEARCOAT_TINT_TEXTURE"),r.CLEARCOAT_TINT_GAMMATEXTURE=this._tintTexture.gammaSpace):r.CLEARCOAT_TINT_TEXTURE=!1):(r.CLEARCOAT_TINT=!1,r.CLEARCOAT_TINT_TEXTURE=!1))):(r.CLEARCOAT=!1,r.CLEARCOAT_TEXTURE=!1,r.CLEARCOAT_TEXTURE_ROUGHNESS=!1,r.CLEARCOAT_BUMP=!1,r.CLEARCOAT_TINT=!1,r.CLEARCOAT_TINT_TEXTURE=!1,r.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,r.CLEARCOAT_DEFAULTIOR=!1,r.CLEARCOAT_TEXTUREDIRECTUV=0,r.CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV=0,r.CLEARCOAT_BUMPDIRECTUV=0,r.CLEARCOAT_REMAP_F0=!1,r.CLEARCOAT_TINT_TEXTUREDIRECTUV=0,r.CLEARCOAT_TINT_GAMMATEXTURE=!1)}bindForSubMesh(r,O,ie,Ee){if(!this._isEnabled)return;const ye=Ee.materialDefines,De=this._material.isFrozen,Le=this._material._disableBumpMap,Oe=this._material._invertNormalMapX,Fe=this._material._invertNormalMapY;if(!r.useUbo||!De||!r.isSync){(this._texture||this._textureRoughness)&&x.ClearCoatTextureEnabled&&(r.updateFloat4("vClearCoatInfos",this._texture?.coordinatesIndex??0,this._texture?.level??0,this._textureRoughness?.coordinatesIndex??0,this._textureRoughness?.level??0),this._texture&&Q(this._texture,r,"clearCoat"),this._textureRoughness&&!ye.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE&&Q(this._textureRoughness,r,"clearCoatRoughness")),this._bumpTexture&&ie.getCaps().standardDerivatives&&x.ClearCoatTextureEnabled&&!Le&&(r.updateFloat2("vClearCoatBumpInfos",this._bumpTexture.coordinatesIndex,this._bumpTexture.level),Q(this._bumpTexture,r,"clearCoatBump"),O._mirroredCameraPosition?r.updateFloat2("vClearCoatTangentSpaceParams",Oe?1:-1,Fe?1:-1):r.updateFloat2("vClearCoatTangentSpaceParams",Oe?-1:1,Fe?-1:1)),this._tintTexture&&x.ClearCoatTintTextureEnabled&&(r.updateFloat2("vClearCoatTintInfos",this._tintTexture.coordinatesIndex,this._tintTexture.level),Q(this._tintTexture,r,"clearCoatTint")),r.updateFloat2("vClearCoatParams",this.intensity,this.roughness);const Ne=1-this._indexOfRefraction,ve=1+this._indexOfRefraction,Pe=Math.pow(-Ne/ve,2),ke=1/this._indexOfRefraction;r.updateFloat4("vClearCoatRefractionParams",Pe,ke,Ne,ve),this._isTintEnabled&&(r.updateFloat4("vClearCoatTintParams",this.tintColor.r,this.tintColor.g,this.tintColor.b,Math.max(1e-5,this.tintThickness)),r.updateFloat("clearCoatColorAtDistance",Math.max(1e-5,this.tintColorAtDistance)))}O.texturesEnabled&&(this._texture&&x.ClearCoatTextureEnabled&&r.setTexture("clearCoatSampler",this._texture),this._textureRoughness&&!ye.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE&&x.ClearCoatTextureEnabled&&r.setTexture("clearCoatRoughnessSampler",this._textureRoughness),this._bumpTexture&&ie.getCaps().standardDerivatives&&x.ClearCoatBumpTextureEnabled&&!Le&&r.setTexture("clearCoatBumpSampler",this._bumpTexture),this._isTintEnabled&&this._tintTexture&&x.ClearCoatTintTextureEnabled&&r.setTexture("clearCoatTintSampler",this._tintTexture))}hasTexture(r){return this._texture===r||this._textureRoughness===r||this._bumpTexture===r||this._tintTexture===r}getActiveTextures(r){this._texture&&r.push(this._texture),this._textureRoughness&&r.push(this._textureRoughness),this._bumpTexture&&r.push(this._bumpTexture),this._tintTexture&&r.push(this._tintTexture)}getAnimatables(r){this._texture&&this._texture.animations&&this._texture.animations.length>0&&r.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&r.push(this._textureRoughness),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&r.push(this._bumpTexture),this._tintTexture&&this._tintTexture.animations&&this._tintTexture.animations.length>0&&r.push(this._tintTexture)}dispose(r){r&&(this._texture?.dispose(),this._textureRoughness?.dispose(),this._bumpTexture?.dispose(),this._tintTexture?.dispose())}getClassName(){return"PBRClearCoatConfiguration"}addFallbacks(r,O,ie){return r.CLEARCOAT_BUMP&&O.addFallback(ie++,"CLEARCOAT_BUMP"),r.CLEARCOAT_TINT&&O.addFallback(ie++,"CLEARCOAT_TINT"),r.CLEARCOAT&&O.addFallback(ie++,"CLEARCOAT"),ie}getSamplers(r){r.push("clearCoatSampler","clearCoatRoughnessSampler","clearCoatBumpSampler","clearCoatTintSampler")}getUniforms(){return{ubo:[{name:"vClearCoatParams",size:2,type:"vec2"},{name:"vClearCoatRefractionParams",size:4,type:"vec4"},{name:"vClearCoatInfos",size:4,type:"vec4"},{name:"clearCoatMatrix",size:16,type:"mat4"},{name:"clearCoatRoughnessMatrix",size:16,type:"mat4"},{name:"vClearCoatBumpInfos",size:2,type:"vec2"},{name:"vClearCoatTangentSpaceParams",size:2,type:"vec2"},{name:"clearCoatBumpMatrix",size:16,type:"mat4"},{name:"vClearCoatTintParams",size:4,type:"vec4"},{name:"clearCoatColorAtDistance",size:1,type:"float"},{name:"vClearCoatTintInfos",size:2,type:"vec2"},{name:"clearCoatTintMatrix",size:16,type:"mat4"}]}}},v=new WeakMap,k=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,l=new WeakMap,d=new WeakMap,a=new WeakMap,(()=>{const Z=typeof Symbol=="function"&&Symbol.metadata?Object.create(I[Symbol.metadata]??null):void 0;g=[m(),T("_markAllSubMeshesAsTexturesDirty")],P=[m()],b=[m()],N=[m(),T("_markAllSubMeshesAsTexturesDirty")],V=[X(),T("_markAllSubMeshesAsTexturesDirty")],Y=[m(),T("_markAllSubMeshesAsTexturesDirty")],J=[X(),T("_markAllSubMeshesAsTexturesDirty")],le=[m(),T("_markAllSubMeshesAsTexturesDirty")],ce=[X(),T("_markAllSubMeshesAsTexturesDirty")],C=[m(),T("_markAllSubMeshesAsTexturesDirty")],_e=[xe()],Ae=[m()],pe=[m()],be=[X(),T("_markAllSubMeshesAsTexturesDirty")],u(i,null,g,{kind:"accessor",name:"isEnabled",static:!1,private:!1,access:{has:r=>"isEnabled"in r,get:r=>r.isEnabled,set:(r,O)=>{r.isEnabled=O}},metadata:Z},F,M),u(i,null,N,{kind:"accessor",name:"indexOfRefraction",static:!1,private:!1,access:{has:r=>"indexOfRefraction"in r,get:r=>r.indexOfRefraction,set:(r,O)=>{r.indexOfRefraction=O}},metadata:Z},f,L),u(i,null,V,{kind:"accessor",name:"texture",static:!1,private:!1,access:{has:r=>"texture"in r,get:r=>r.texture,set:(r,O)=>{r.texture=O}},metadata:Z},q,te),u(i,null,Y,{kind:"accessor",name:"useRoughnessFromMainTexture",static:!1,private:!1,access:{has:r=>"useRoughnessFromMainTexture"in r,get:r=>r.useRoughnessFromMainTexture,set:(r,O)=>{r.useRoughnessFromMainTexture=O}},metadata:Z},o,D),u(i,null,J,{kind:"accessor",name:"textureRoughness",static:!1,private:!1,access:{has:r=>"textureRoughness"in r,get:r=>r.textureRoughness,set:(r,O)=>{r.textureRoughness=O}},metadata:Z},ae,re),u(i,null,le,{kind:"accessor",name:"remapF0OnInterfaceChange",static:!1,private:!1,access:{has:r=>"remapF0OnInterfaceChange"in r,get:r=>r.remapF0OnInterfaceChange,set:(r,O)=>{r.remapF0OnInterfaceChange=O}},metadata:Z},ne,ue),u(i,null,ce,{kind:"accessor",name:"bumpTexture",static:!1,private:!1,access:{has:r=>"bumpTexture"in r,get:r=>r.bumpTexture,set:(r,O)=>{r.bumpTexture=O}},metadata:Z},K,c),u(i,null,C,{kind:"accessor",name:"isTintEnabled",static:!1,private:!1,access:{has:r=>"isTintEnabled"in r,get:r=>r.isTintEnabled,set:(r,O)=>{r.isTintEnabled=O}},metadata:Z},E,w),u(i,null,be,{kind:"accessor",name:"tintTexture",static:!1,private:!1,access:{has:r=>"tintTexture"in r,get:r=>r.tintTexture,set:(r,O)=>{r.tintTexture=O}},metadata:Z},Ce,Me),u(null,null,P,{kind:"field",name:"intensity",static:!1,private:!1,access:{has:r=>"intensity"in r,get:r=>r.intensity,set:(r,O)=>{r.intensity=O}},metadata:Z},B,p),u(null,null,b,{kind:"field",name:"roughness",static:!1,private:!1,access:{has:r=>"roughness"in r,get:r=>r.roughness,set:(r,O)=>{r.roughness=O}},metadata:Z},y,R),u(null,null,_e,{kind:"field",name:"tintColor",static:!1,private:!1,access:{has:r=>"tintColor"in r,get:r=>r.tintColor,set:(r,O)=>{r.tintColor=O}},metadata:Z},me,Re),u(null,null,Ae,{kind:"field",name:"tintColorAtDistance",static:!1,private:!1,access:{has:r=>"tintColorAtDistance"in r,get:r=>r.tintColorAtDistance,set:(r,O)=>{r.tintColorAtDistance=O}},metadata:Z},de,Se),u(null,null,pe,{kind:"field",name:"tintThickness",static:!1,private:!1,access:{has:r=>"tintThickness"in r,get:r=>r.tintThickness,set:(r,O)=>{r.tintThickness=O}},metadata:Z},ge,Ie),Z&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:Z})})(),i._DefaultIndexOfRefraction=1.5,i})();class Cr extends Be{constructor(){super(...arguments),this.IRIDESCENCE=!1,this.IRIDESCENCE_TEXTURE=!1,this.IRIDESCENCE_TEXTUREDIRECTUV=0,this.IRIDESCENCE_THICKNESS_TEXTURE=!1,this.IRIDESCENCE_THICKNESS_TEXTUREDIRECTUV=0}}let Mr=(()=>{var i,v,k,U;let G=we,W,H=[],l=[],d,a=[],I=[],g,F=[],M=[],P,B=[],p=[],b,y=[],R=[],N,f=[],L=[],V,q=[],te=[];return i=class extends G{get isEnabled(){return h(this,v,"f")}set isEnabled(o){_(this,v,o,"f")}get texture(){return h(this,k,"f")}set texture(o){_(this,k,o,"f")}get thicknessTexture(){return h(this,U,"f")}set thicknessTexture(o){_(this,U,o,"f")}_markAllSubMeshesAsTexturesDirty(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()}isCompatible(){return!0}constructor(o,D=!0){super(o,"PBRIridescence",110,new Cr,D),this._isEnabled=!1,v.set(this,s(this,H,!1)),this.intensity=(s(this,l),s(this,a,1)),this.minimumThickness=(s(this,I),s(this,F,i._DefaultMinimumThickness)),this.maximumThickness=(s(this,M),s(this,B,i._DefaultMaximumThickness)),this.indexOfRefraction=(s(this,p),s(this,y,i._DefaultIndexOfRefraction)),this._texture=(s(this,R),null),k.set(this,s(this,f,null)),this._thicknessTexture=(s(this,L),null),U.set(this,s(this,q,null)),this._internalMarkAllSubMeshesAsTexturesDirty=s(this,te),this._internalMarkAllSubMeshesAsTexturesDirty=o._dirtyCallbacks[1]}isReadyForSubMesh(o,D){return this._isEnabled?!(o._areTexturesDirty&&D.texturesEnabled&&(this._texture&&x.IridescenceTextureEnabled&&!this._texture.isReadyOrNotBlocking()||this._thicknessTexture&&x.IridescenceTextureEnabled&&!this._thicknessTexture.isReadyOrNotBlocking())):!0}prepareDefinesBeforeAttributes(o,D){this._isEnabled?(o.IRIDESCENCE=!0,o._areTexturesDirty&&D.texturesEnabled&&(this._texture&&x.IridescenceTextureEnabled?j(this._texture,o,"IRIDESCENCE_TEXTURE"):o.IRIDESCENCE_TEXTURE=!1,this._thicknessTexture&&x.IridescenceTextureEnabled?j(this._thicknessTexture,o,"IRIDESCENCE_THICKNESS_TEXTURE"):o.IRIDESCENCE_THICKNESS_TEXTURE=!1)):(o.IRIDESCENCE=!1,o.IRIDESCENCE_TEXTURE=!1,o.IRIDESCENCE_THICKNESS_TEXTURE=!1,o.IRIDESCENCE_TEXTUREDIRECTUV=0,o.IRIDESCENCE_THICKNESS_TEXTUREDIRECTUV=0)}bindForSubMesh(o,D){if(!this._isEnabled)return;const J=this._material.isFrozen;(!o.useUbo||!J||!o.isSync)&&((this._texture||this._thicknessTexture)&&x.IridescenceTextureEnabled&&(o.updateFloat4("vIridescenceInfos",this._texture?.coordinatesIndex??0,this._texture?.level??0,this._thicknessTexture?.coordinatesIndex??0,this._thicknessTexture?.level??0),this._texture&&Q(this._texture,o,"iridescence"),this._thicknessTexture&&Q(this._thicknessTexture,o,"iridescenceThickness")),o.updateFloat4("vIridescenceParams",this.intensity,this.indexOfRefraction,this.minimumThickness,this.maximumThickness)),D.texturesEnabled&&(this._texture&&x.IridescenceTextureEnabled&&o.setTexture("iridescenceSampler",this._texture),this._thicknessTexture&&x.IridescenceTextureEnabled&&o.setTexture("iridescenceThicknessSampler",this._thicknessTexture))}hasTexture(o){return this._texture===o||this._thicknessTexture===o}getActiveTextures(o){this._texture&&o.push(this._texture),this._thicknessTexture&&o.push(this._thicknessTexture)}getAnimatables(o){this._texture&&this._texture.animations&&this._texture.animations.length>0&&o.push(this._texture),this._thicknessTexture&&this._thicknessTexture.animations&&this._thicknessTexture.animations.length>0&&o.push(this._thicknessTexture)}dispose(o){o&&(this._texture?.dispose(),this._thicknessTexture?.dispose())}getClassName(){return"PBRIridescenceConfiguration"}addFallbacks(o,D,J){return o.IRIDESCENCE&&D.addFallback(J++,"IRIDESCENCE"),J}getSamplers(o){o.push("iridescenceSampler","iridescenceThicknessSampler")}getUniforms(){return{ubo:[{name:"vIridescenceParams",size:4,type:"vec4"},{name:"vIridescenceInfos",size:4,type:"vec4"},{name:"iridescenceMatrix",size:16,type:"mat4"},{name:"iridescenceThicknessMatrix",size:16,type:"mat4"}]}}},v=new WeakMap,k=new WeakMap,U=new WeakMap,(()=>{const Y=typeof Symbol=="function"&&Symbol.metadata?Object.create(G[Symbol.metadata]??null):void 0;W=[m(),T("_markAllSubMeshesAsTexturesDirty")],d=[m()],g=[m()],P=[m()],b=[m()],N=[X(),T("_markAllSubMeshesAsTexturesDirty")],V=[X(),T("_markAllSubMeshesAsTexturesDirty")],u(i,null,W,{kind:"accessor",name:"isEnabled",static:!1,private:!1,access:{has:o=>"isEnabled"in o,get:o=>o.isEnabled,set:(o,D)=>{o.isEnabled=D}},metadata:Y},H,l),u(i,null,N,{kind:"accessor",name:"texture",static:!1,private:!1,access:{has:o=>"texture"in o,get:o=>o.texture,set:(o,D)=>{o.texture=D}},metadata:Y},f,L),u(i,null,V,{kind:"accessor",name:"thicknessTexture",static:!1,private:!1,access:{has:o=>"thicknessTexture"in o,get:o=>o.thicknessTexture,set:(o,D)=>{o.thicknessTexture=D}},metadata:Y},q,te),u(null,null,d,{kind:"field",name:"intensity",static:!1,private:!1,access:{has:o=>"intensity"in o,get:o=>o.intensity,set:(o,D)=>{o.intensity=D}},metadata:Y},a,I),u(null,null,g,{kind:"field",name:"minimumThickness",static:!1,private:!1,access:{has:o=>"minimumThickness"in o,get:o=>o.minimumThickness,set:(o,D)=>{o.minimumThickness=D}},metadata:Y},F,M),u(null,null,P,{kind:"field",name:"maximumThickness",static:!1,private:!1,access:{has:o=>"maximumThickness"in o,get:o=>o.maximumThickness,set:(o,D)=>{o.maximumThickness=D}},metadata:Y},B,p),u(null,null,b,{kind:"field",name:"indexOfRefraction",static:!1,private:!1,access:{has:o=>"indexOfRefraction"in o,get:o=>o.indexOfRefraction,set:(o,D)=>{o.indexOfRefraction=D}},metadata:Y},y,R),Y&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:Y})})(),i._DefaultMinimumThickness=100,i._DefaultMaximumThickness=400,i._DefaultIndexOfRefraction=1.3,i})();class yr extends Be{constructor(){super(...arguments),this.ANISOTROPIC=!1,this.ANISOTROPIC_TEXTURE=!1,this.ANISOTROPIC_TEXTUREDIRECTUV=0,this.ANISOTROPIC_LEGACY=!1,this.MAINUV1=!1}}let Lr=(()=>{var i,v,k,U;let G=we,W,H=[],l=[],d,a=[],I=[],g,F=[],M=[],P,B=[],p=[],b,y=[],R=[];return i=class extends G{get isEnabled(){return h(this,v,"f")}set isEnabled(f){_(this,v,f,"f")}set angle(f){this.direction.x=Math.cos(f),this.direction.y=Math.sin(f)}get angle(){return Math.atan2(this.direction.y,this.direction.x)}get texture(){return h(this,k,"f")}set texture(f){_(this,k,f,"f")}get legacy(){return h(this,U,"f")}set legacy(f){_(this,U,f,"f")}_markAllSubMeshesAsTexturesDirty(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()}_markAllSubMeshesAsMiscDirty(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsMiscDirty()}isCompatible(){return!0}constructor(f,L=!0){super(f,"PBRAnisotropic",110,new yr,L),this._isEnabled=!1,v.set(this,s(this,H,!1)),this.intensity=(s(this,l),s(this,a,1)),this.direction=(s(this,I),s(this,F,new Na(1,0))),this._texture=(s(this,M),null),k.set(this,s(this,B,null)),this._legacy=(s(this,p),!1),U.set(this,s(this,y,!1)),this._internalMarkAllSubMeshesAsTexturesDirty=s(this,R),this._internalMarkAllSubMeshesAsTexturesDirty=f._dirtyCallbacks[1],this._internalMarkAllSubMeshesAsMiscDirty=f._dirtyCallbacks[16]}isReadyForSubMesh(f,L){return this._isEnabled?!(f._areTexturesDirty&&L.texturesEnabled&&this._texture&&x.AnisotropicTextureEnabled&&!this._texture.isReadyOrNotBlocking()):!0}prepareDefinesBeforeAttributes(f,L,V){this._isEnabled?(f.ANISOTROPIC=this._isEnabled,this._isEnabled&&!V.isVerticesDataPresent(Ue.TangentKind)&&(f._needUVs=!0,f.MAINUV1=!0),f._areTexturesDirty&&L.texturesEnabled&&(this._texture&&x.AnisotropicTextureEnabled?j(this._texture,f,"ANISOTROPIC_TEXTURE"):f.ANISOTROPIC_TEXTURE=!1),f._areMiscDirty&&(f.ANISOTROPIC_LEGACY=this._legacy)):(f.ANISOTROPIC=!1,f.ANISOTROPIC_TEXTURE=!1,f.ANISOTROPIC_TEXTUREDIRECTUV=0,f.ANISOTROPIC_LEGACY=!1)}bindForSubMesh(f,L){if(!this._isEnabled)return;const V=this._material.isFrozen;(!f.useUbo||!V||!f.isSync)&&(this._texture&&x.AnisotropicTextureEnabled&&(f.updateFloat2("vAnisotropyInfos",this._texture.coordinatesIndex,this._texture.level),Q(this._texture,f,"anisotropy")),f.updateFloat3("vAnisotropy",this.direction.x,this.direction.y,this.intensity)),L.texturesEnabled&&this._texture&&x.AnisotropicTextureEnabled&&f.setTexture("anisotropySampler",this._texture)}hasTexture(f){return this._texture===f}getActiveTextures(f){this._texture&&f.push(this._texture)}getAnimatables(f){this._texture&&this._texture.animations&&this._texture.animations.length>0&&f.push(this._texture)}dispose(f){f&&this._texture&&this._texture.dispose()}getClassName(){return"PBRAnisotropicConfiguration"}addFallbacks(f,L,V){return f.ANISOTROPIC&&L.addFallback(V++,"ANISOTROPIC"),V}getSamplers(f){f.push("anisotropySampler")}getUniforms(){return{ubo:[{name:"vAnisotropy",size:3,type:"vec3"},{name:"vAnisotropyInfos",size:2,type:"vec2"},{name:"anisotropyMatrix",size:16,type:"mat4"}]}}parse(f,L,V){super.parse(f,L,V),f.legacy===void 0&&(this.legacy=!0)}},v=new WeakMap,k=new WeakMap,U=new WeakMap,(()=>{const N=typeof Symbol=="function"&&Symbol.metadata?Object.create(G[Symbol.metadata]??null):void 0;W=[m(),T("_markAllSubMeshesAsTexturesDirty")],d=[m()],g=[va()],P=[X(),T("_markAllSubMeshesAsTexturesDirty")],b=[m(),T("_markAllSubMeshesAsMiscDirty")],u(i,null,W,{kind:"accessor",name:"isEnabled",static:!1,private:!1,access:{has:f=>"isEnabled"in f,get:f=>f.isEnabled,set:(f,L)=>{f.isEnabled=L}},metadata:N},H,l),u(i,null,P,{kind:"accessor",name:"texture",static:!1,private:!1,access:{has:f=>"texture"in f,get:f=>f.texture,set:(f,L)=>{f.texture=L}},metadata:N},B,p),u(i,null,b,{kind:"accessor",name:"legacy",static:!1,private:!1,access:{has:f=>"legacy"in f,get:f=>f.legacy,set:(f,L)=>{f.legacy=L}},metadata:N},y,R),u(null,null,d,{kind:"field",name:"intensity",static:!1,private:!1,access:{has:f=>"intensity"in f,get:f=>f.intensity,set:(f,L)=>{f.intensity=L}},metadata:N},a,I),u(null,null,g,{kind:"field",name:"direction",static:!1,private:!1,access:{has:f=>"direction"in f,get:f=>f.direction,set:(f,L)=>{f.direction=L}},metadata:N},F,M),N&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:N})})(),i})();class Or extends Be{constructor(){super(...arguments),this.SHEEN=!1,this.SHEEN_TEXTURE=!1,this.SHEEN_GAMMATEXTURE=!1,this.SHEEN_TEXTURE_ROUGHNESS=!1,this.SHEEN_TEXTUREDIRECTUV=0,this.SHEEN_TEXTURE_ROUGHNESSDIRECTUV=0,this.SHEEN_LINKWITHALBEDO=!1,this.SHEEN_ROUGHNESS=!1,this.SHEEN_ALBEDOSCALING=!1,this.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1}}let Fr=(()=>{var i,v,k,U,G,W,H,l;let d=we,a,I=[],g=[],F,M=[],P=[],B,p=[],b=[],y,R=[],N=[],f,L=[],V=[],q,te=[],Y=[],o,D=[],J=[],ae,re=[],le=[],ne,ue=[],ce=[];return i=class extends d{get isEnabled(){return h(this,v,"f")}set isEnabled(c){_(this,v,c,"f")}get linkSheenWithAlbedo(){return h(this,k,"f")}set linkSheenWithAlbedo(c){_(this,k,c,"f")}get texture(){return h(this,U,"f")}set texture(c){_(this,U,c,"f")}get useRoughnessFromMainTexture(){return h(this,G,"f")}set useRoughnessFromMainTexture(c){_(this,G,c,"f")}get roughness(){return h(this,W,"f")}set roughness(c){_(this,W,c,"f")}get textureRoughness(){return h(this,H,"f")}set textureRoughness(c){_(this,H,c,"f")}get albedoScaling(){return h(this,l,"f")}set albedoScaling(c){_(this,l,c,"f")}_markAllSubMeshesAsTexturesDirty(){this._enable(this._isEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()}isCompatible(){return!0}constructor(c,C=!0){super(c,"Sheen",120,new Or,C),this._isEnabled=!1,v.set(this,s(this,I,!1)),this._linkSheenWithAlbedo=(s(this,g),!1),k.set(this,s(this,M,!1)),this.intensity=(s(this,P),s(this,p,1)),this.color=(s(this,b),s(this,R,se.White())),this._texture=(s(this,N),null),U.set(this,s(this,L,null)),this._useRoughnessFromMainTexture=(s(this,V),!0),G.set(this,s(this,te,!0)),this._roughness=(s(this,Y),null),W.set(this,s(this,D,null)),this._textureRoughness=(s(this,J),null),H.set(this,s(this,re,null)),this._albedoScaling=(s(this,le),!1),l.set(this,s(this,ue,!1)),this._internalMarkAllSubMeshesAsTexturesDirty=s(this,ce),this._internalMarkAllSubMeshesAsTexturesDirty=c._dirtyCallbacks[1]}isReadyForSubMesh(c,C){return this._isEnabled?!(c._areTexturesDirty&&C.texturesEnabled&&(this._texture&&x.SheenTextureEnabled&&!this._texture.isReadyOrNotBlocking()||this._textureRoughness&&x.SheenTextureEnabled&&!this._textureRoughness.isReadyOrNotBlocking())):!0}prepareDefinesBeforeAttributes(c,C){this._isEnabled?(c.SHEEN=!0,c.SHEEN_LINKWITHALBEDO=this._linkSheenWithAlbedo,c.SHEEN_ROUGHNESS=this._roughness!==null,c.SHEEN_ALBEDOSCALING=this._albedoScaling,c.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=this._useRoughnessFromMainTexture,c._areTexturesDirty&&C.texturesEnabled&&(this._texture&&x.SheenTextureEnabled?(j(this._texture,c,"SHEEN_TEXTURE"),c.SHEEN_GAMMATEXTURE=this._texture.gammaSpace):c.SHEEN_TEXTURE=!1,this._textureRoughness&&x.SheenTextureEnabled?j(this._textureRoughness,c,"SHEEN_TEXTURE_ROUGHNESS"):c.SHEEN_TEXTURE_ROUGHNESS=!1)):(c.SHEEN=!1,c.SHEEN_TEXTURE=!1,c.SHEEN_TEXTURE_ROUGHNESS=!1,c.SHEEN_LINKWITHALBEDO=!1,c.SHEEN_ROUGHNESS=!1,c.SHEEN_ALBEDOSCALING=!1,c.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,c.SHEEN_GAMMATEXTURE=!1,c.SHEEN_TEXTUREDIRECTUV=0,c.SHEEN_TEXTURE_ROUGHNESSDIRECTUV=0)}bindForSubMesh(c,C,E,w){if(!this._isEnabled)return;const _e=w.materialDefines,me=this._material.isFrozen;(!c.useUbo||!me||!c.isSync)&&((this._texture||this._textureRoughness)&&x.SheenTextureEnabled&&(c.updateFloat4("vSheenInfos",this._texture?.coordinatesIndex??0,this._texture?.level??0,this._textureRoughness?.coordinatesIndex??0,this._textureRoughness?.level??0),this._texture&&Q(this._texture,c,"sheen"),this._textureRoughness&&!_e.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE&&Q(this._textureRoughness,c,"sheenRoughness")),c.updateFloat4("vSheenColor",this.color.r,this.color.g,this.color.b,this.intensity),this._roughness!==null&&c.updateFloat("vSheenRoughness",this._roughness)),C.texturesEnabled&&(this._texture&&x.SheenTextureEnabled&&c.setTexture("sheenSampler",this._texture),this._textureRoughness&&!_e.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE&&x.SheenTextureEnabled&&c.setTexture("sheenRoughnessSampler",this._textureRoughness))}hasTexture(c){return this._texture===c||this._textureRoughness===c}getActiveTextures(c){this._texture&&c.push(this._texture),this._textureRoughness&&c.push(this._textureRoughness)}getAnimatables(c){this._texture&&this._texture.animations&&this._texture.animations.length>0&&c.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&c.push(this._textureRoughness)}dispose(c){c&&(this._texture?.dispose(),this._textureRoughness?.dispose())}getClassName(){return"PBRSheenConfiguration"}addFallbacks(c,C,E){return c.SHEEN&&C.addFallback(E++,"SHEEN"),E}getSamplers(c){c.push("sheenSampler","sheenRoughnessSampler")}getUniforms(){return{ubo:[{name:"vSheenColor",size:4,type:"vec4"},{name:"vSheenRoughness",size:1,type:"float"},{name:"vSheenInfos",size:4,type:"vec4"},{name:"sheenMatrix",size:16,type:"mat4"},{name:"sheenRoughnessMatrix",size:16,type:"mat4"}]}}},v=new WeakMap,k=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,l=new WeakMap,(()=>{const K=typeof Symbol=="function"&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;a=[m(),T("_markAllSubMeshesAsTexturesDirty")],F=[m(),T("_markAllSubMeshesAsTexturesDirty")],B=[m()],y=[xe()],f=[X(),T("_markAllSubMeshesAsTexturesDirty")],q=[m(),T("_markAllSubMeshesAsTexturesDirty")],o=[m(),T("_markAllSubMeshesAsTexturesDirty")],ae=[X(),T("_markAllSubMeshesAsTexturesDirty")],ne=[m(),T("_markAllSubMeshesAsTexturesDirty")],u(i,null,a,{kind:"accessor",name:"isEnabled",static:!1,private:!1,access:{has:c=>"isEnabled"in c,get:c=>c.isEnabled,set:(c,C)=>{c.isEnabled=C}},metadata:K},I,g),u(i,null,F,{kind:"accessor",name:"linkSheenWithAlbedo",static:!1,private:!1,access:{has:c=>"linkSheenWithAlbedo"in c,get:c=>c.linkSheenWithAlbedo,set:(c,C)=>{c.linkSheenWithAlbedo=C}},metadata:K},M,P),u(i,null,f,{kind:"accessor",name:"texture",static:!1,private:!1,access:{has:c=>"texture"in c,get:c=>c.texture,set:(c,C)=>{c.texture=C}},metadata:K},L,V),u(i,null,q,{kind:"accessor",name:"useRoughnessFromMainTexture",static:!1,private:!1,access:{has:c=>"useRoughnessFromMainTexture"in c,get:c=>c.useRoughnessFromMainTexture,set:(c,C)=>{c.useRoughnessFromMainTexture=C}},metadata:K},te,Y),u(i,null,o,{kind:"accessor",name:"roughness",static:!1,private:!1,access:{has:c=>"roughness"in c,get:c=>c.roughness,set:(c,C)=>{c.roughness=C}},metadata:K},D,J),u(i,null,ae,{kind:"accessor",name:"textureRoughness",static:!1,private:!1,access:{has:c=>"textureRoughness"in c,get:c=>c.textureRoughness,set:(c,C)=>{c.textureRoughness=C}},metadata:K},re,le),u(i,null,ne,{kind:"accessor",name:"albedoScaling",static:!1,private:!1,access:{has:c=>"albedoScaling"in c,get:c=>c.albedoScaling,set:(c,C)=>{c.albedoScaling=C}},metadata:K},ue,ce),u(null,null,B,{kind:"field",name:"intensity",static:!1,private:!1,access:{has:c=>"intensity"in c,get:c=>c.intensity,set:(c,C)=>{c.intensity=C}},metadata:K},p,b),u(null,null,y,{kind:"field",name:"color",static:!1,private:!1,access:{has:c=>"color"in c,get:c=>c.color,set:(c,C)=>{c.color=C}},metadata:K},R,N),K&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:K})})(),i})();class Nr extends Be{constructor(){super(...arguments),this.SUBSURFACE=!1,this.SS_REFRACTION=!1,this.SS_REFRACTION_USE_INTENSITY_FROM_THICKNESS=!1,this.SS_TRANSLUCENCY=!1,this.SS_TRANSLUCENCY_USE_INTENSITY_FROM_THICKNESS=!1,this.SS_SCATTERING=!1,this.SS_DISPERSION=!1,this.SS_THICKNESSANDMASK_TEXTURE=!1,this.SS_THICKNESSANDMASK_TEXTUREDIRECTUV=0,this.SS_HAS_THICKNESS=!1,this.SS_REFRACTIONINTENSITY_TEXTURE=!1,this.SS_REFRACTIONINTENSITY_TEXTUREDIRECTUV=0,this.SS_TRANSLUCENCYINTENSITY_TEXTURE=!1,this.SS_TRANSLUCENCYINTENSITY_TEXTUREDIRECTUV=0,this.SS_TRANSLUCENCYCOLOR_TEXTURE=!1,this.SS_TRANSLUCENCYCOLOR_TEXTUREDIRECTUV=0,this.SS_TRANSLUCENCYCOLOR_TEXTURE_GAMMA=!1,this.SS_REFRACTIONMAP_3D=!1,this.SS_REFRACTIONMAP_OPPOSITEZ=!1,this.SS_LODINREFRACTIONALPHA=!1,this.SS_GAMMAREFRACTION=!1,this.SS_RGBDREFRACTION=!1,this.SS_LINEARSPECULARREFRACTION=!1,this.SS_LINKREFRACTIONTOTRANSPARENCY=!1,this.SS_ALBEDOFORREFRACTIONTINT=!1,this.SS_ALBEDOFORTRANSLUCENCYTINT=!1,this.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=!1,this.SS_USE_THICKNESS_AS_DEPTH=!1,this.SS_USE_GLTF_TEXTURES=!1,this.SS_APPLY_ALBEDO_AFTER_SUBSURFACE=!1,this.SS_TRANSLUCENCY_LEGACY=!1}}let vr=(()=>{var i,v,k,U,G,W,H,l,d,a,I,g,F,M,P,B,p;let b=we,y,R=[],N=[],f,L=[],V=[],q,te=[],Y=[],o,D=[],J=[],ae,re=[],le=[],ne,ue=[],ce=[],K,c=[],C=[],E,w=[],_e=[],me,Re=[],Ae=[],de,Se=[],pe=[],ge,Ie=[],be=[],Ce,Me=[],Z=[],r,O=[],ie=[],Ee,ye=[],De=[],Le,Oe=[],Fe=[],Ne,ve=[],Pe=[],ke,Ve=[],ze=[],Ye,Xe=[],Ke=[],je,Qe=[],Ze=[],Je,$e=[],qe=[],et,tt=[],st=[],it,at=[],rt=[],lt,nt=[],ut=[],ct,ot=[],ht=[],_t,Tt=[],ft=[],mt,Et=[],xt=[],Rt,At=[],dt=[],St,pt=[],gt=[],It,bt=[],Ct=[],Mt,yt=[],Lt=[];return i=class extends b{get isRefractionEnabled(){return h(this,v,"f")}set isRefractionEnabled(t){_(this,v,t,"f")}get isTranslucencyEnabled(){return h(this,k,"f")}set isTranslucencyEnabled(t){_(this,k,t,"f")}get isDispersionEnabled(){return h(this,U,"f")}set isDispersionEnabled(t){_(this,U,t,"f")}get isScatteringEnabled(){return h(this,G,"f")}set isScatteringEnabled(t){_(this,G,t,"f")}get scatteringDiffusionProfile(){return this._scene.subSurfaceConfiguration?this._scene.subSurfaceConfiguration.ssDiffusionProfileColors[this._scatteringDiffusionProfileIndex]:null}set scatteringDiffusionProfile(t){this._scene.enableSubSurfaceForPrePass()&&t&&(this._scatteringDiffusionProfileIndex=this._scene.subSurfaceConfiguration.addDiffusionProfile(t))}get useAlbedoToTintRefraction(){return h(this,W,"f")}set useAlbedoToTintRefraction(t){_(this,W,t,"f")}get useAlbedoToTintTranslucency(){return h(this,H,"f")}set useAlbedoToTintTranslucency(t){_(this,H,t,"f")}get thicknessTexture(){return h(this,l,"f")}set thicknessTexture(t){_(this,l,t,"f")}get refractionTexture(){return h(this,d,"f")}set refractionTexture(t){_(this,d,t,"f")}get indexOfRefraction(){return h(this,a,"f")}set indexOfRefraction(t){_(this,a,t,"f")}get volumeIndexOfRefraction(){return this._volumeIndexOfRefraction>=1?this._volumeIndexOfRefraction:this._indexOfRefraction}set volumeIndexOfRefraction(t){const A=t>=1?t:-1;this._volumeIndexOfRefraction!==A&&(this._volumeIndexOfRefraction=A,this._markAllSubMeshesAsTexturesDirty())}get invertRefractionY(){return h(this,I,"f")}set invertRefractionY(t){_(this,I,t,"f")}get linkRefractionWithTransparency(){return h(this,g,"f")}set linkRefractionWithTransparency(t){_(this,g,t,"f")}get useMaskFromThicknessTexture(){return h(this,F,"f")}set useMaskFromThicknessTexture(t){_(this,F,t,"f")}get refractionIntensityTexture(){return h(this,M,"f")}set refractionIntensityTexture(t){_(this,M,t,"f")}get translucencyIntensityTexture(){return h(this,P,"f")}set translucencyIntensityTexture(t){_(this,P,t,"f")}get translucencyColorTexture(){return h(this,B,"f")}set translucencyColorTexture(t){_(this,B,t,"f")}get useGltfStyleTextures(){return h(this,p,"f")}set useGltfStyleTextures(t){_(this,p,t,"f")}get legacyTransluceny(){return this.legacyTranslucency}set legacyTransluceny(t){this.legacyTranslucency=t}_markAllSubMeshesAsTexturesDirty(){this._enable(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled),this._internalMarkAllSubMeshesAsTexturesDirty()}_markScenePrePassDirty(){this._enable(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled),this._internalMarkAllSubMeshesAsTexturesDirty(),this._internalMarkScenePrePassDirty()}isCompatible(){return!0}constructor(t,A=!0){super(t,"PBRSubSurface",130,new Nr,A),this._isRefractionEnabled=!1,v.set(this,s(this,R,!1)),this._isTranslucencyEnabled=(s(this,N),!1),k.set(this,s(this,L,!1)),this._isDispersionEnabled=(s(this,V),!1),U.set(this,s(this,te,!1)),this._isScatteringEnabled=(s(this,Y),!1),G.set(this,s(this,D,!1)),this._scatteringDiffusionProfileIndex=(s(this,J),s(this,re,0)),this.refractionIntensity=(s(this,le),s(this,ue,1)),this.translucencyIntensity=(s(this,ce),s(this,c,1)),this._useAlbedoToTintRefraction=(s(this,C),!1),W.set(this,s(this,w,!1)),this._useAlbedoToTintTranslucency=(s(this,_e),!1),H.set(this,s(this,Re,!1)),this._thicknessTexture=(s(this,Ae),null),l.set(this,s(this,Se,null)),this._refractionTexture=(s(this,pe),null),d.set(this,s(this,Ie,null)),this._indexOfRefraction=(s(this,be),1.5),a.set(this,s(this,Me,1.5)),this._volumeIndexOfRefraction=(s(this,Z),s(this,O,-1)),this._invertRefractionY=(s(this,ie),!1),I.set(this,s(this,ye,!1)),this._linkRefractionWithTransparency=(s(this,De),!1),g.set(this,s(this,Oe,!1)),this.minimumThickness=(s(this,Fe),s(this,ve,0)),this.maximumThickness=(s(this,Pe),s(this,Ve,1)),this.useThicknessAsDepth=(s(this,ze),s(this,Xe,!1)),this.tintColor=(s(this,Ke),s(this,Qe,se.White())),this.tintColorAtDistance=(s(this,Ze),s(this,$e,1)),this.dispersion=(s(this,qe),s(this,tt,0)),this.diffusionDistance=(s(this,st),s(this,at,se.White())),this._useMaskFromThicknessTexture=(s(this,rt),!1),F.set(this,s(this,nt,!1)),this._refractionIntensityTexture=(s(this,ut),null),M.set(this,s(this,ot,null)),this._translucencyIntensityTexture=(s(this,ht),null),P.set(this,s(this,Tt,null)),this.translucencyColor=(s(this,ft),s(this,Et,null)),this._translucencyColorTexture=(s(this,xt),null),B.set(this,s(this,At,null)),this._useGltfStyleTextures=(s(this,dt),!0),p.set(this,s(this,pt,!0)),this.applyAlbedoAfterSubSurface=(s(this,gt),s(this,bt,i.DEFAULT_APPLY_ALBEDO_AFTERSUBSURFACE)),this.legacyTranslucency=(s(this,Ct),s(this,yt,i.DEFAULT_LEGACY_TRANSLUCENCY)),this._scene=s(this,Lt),this._scene=t.getScene(),this.registerForExtraEvents=!0,this._internalMarkAllSubMeshesAsTexturesDirty=t._dirtyCallbacks[1],this._internalMarkScenePrePassDirty=t._dirtyCallbacks[32]}isReadyForSubMesh(t,A){if(!this._isRefractionEnabled&&!this._isTranslucencyEnabled&&!this._isScatteringEnabled)return!0;if(t._areTexturesDirty&&A.texturesEnabled){if(this._thicknessTexture&&x.ThicknessTextureEnabled&&!this._thicknessTexture.isReadyOrNotBlocking()||this._refractionIntensityTexture&&x.RefractionIntensityTextureEnabled&&!this._refractionIntensityTexture.isReadyOrNotBlocking()||this._translucencyColorTexture&&x.TranslucencyColorTextureEnabled&&!this._translucencyColorTexture.isReadyOrNotBlocking()||this._translucencyIntensityTexture&&x.TranslucencyIntensityTextureEnabled&&!this._translucencyIntensityTexture.isReadyOrNotBlocking())return!1;const $=this._getRefractionTexture(A);if($&&x.RefractionTextureEnabled&&!$.isReadyOrNotBlocking())return!1}return!0}prepareDefinesBeforeAttributes(t,A){if(!this._isRefractionEnabled&&!this._isTranslucencyEnabled&&!this._isScatteringEnabled){t.SUBSURFACE=!1,t.SS_DISPERSION=!1,t.SS_TRANSLUCENCY=!1,t.SS_SCATTERING=!1,t.SS_REFRACTION=!1,t.SS_REFRACTION_USE_INTENSITY_FROM_THICKNESS=!1,t.SS_TRANSLUCENCY_USE_INTENSITY_FROM_THICKNESS=!1,t.SS_THICKNESSANDMASK_TEXTURE=!1,t.SS_THICKNESSANDMASK_TEXTUREDIRECTUV=0,t.SS_HAS_THICKNESS=!1,t.SS_REFRACTIONINTENSITY_TEXTURE=!1,t.SS_REFRACTIONINTENSITY_TEXTUREDIRECTUV=0,t.SS_TRANSLUCENCYINTENSITY_TEXTURE=!1,t.SS_TRANSLUCENCYINTENSITY_TEXTUREDIRECTUV=0,t.SS_REFRACTIONMAP_3D=!1,t.SS_REFRACTIONMAP_OPPOSITEZ=!1,t.SS_LODINREFRACTIONALPHA=!1,t.SS_GAMMAREFRACTION=!1,t.SS_RGBDREFRACTION=!1,t.SS_LINEARSPECULARREFRACTION=!1,t.SS_LINKREFRACTIONTOTRANSPARENCY=!1,t.SS_ALBEDOFORREFRACTIONTINT=!1,t.SS_ALBEDOFORTRANSLUCENCYTINT=!1,t.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=!1,t.SS_USE_THICKNESS_AS_DEPTH=!1,t.SS_USE_GLTF_TEXTURES=!1,t.SS_TRANSLUCENCYCOLOR_TEXTURE=!1,t.SS_TRANSLUCENCYCOLOR_TEXTUREDIRECTUV=0,t.SS_TRANSLUCENCYCOLOR_TEXTURE_GAMMA=!1,t.SS_APPLY_ALBEDO_AFTER_SUBSURFACE=!1;return}if(t._areTexturesDirty){if(t.SUBSURFACE=!0,t.SS_DISPERSION=this._isDispersionEnabled,t.SS_TRANSLUCENCY=this._isTranslucencyEnabled,t.SS_TRANSLUCENCY_USE_INTENSITY_FROM_THICKNESS=!1,t.SS_TRANSLUCENCY_LEGACY=this.legacyTranslucency,t.SS_SCATTERING=this._isScatteringEnabled,t.SS_THICKNESSANDMASK_TEXTURE=!1,t.SS_REFRACTIONINTENSITY_TEXTURE=!1,t.SS_TRANSLUCENCYINTENSITY_TEXTURE=!1,t.SS_HAS_THICKNESS=!1,t.SS_USE_GLTF_TEXTURES=!1,t.SS_REFRACTION=!1,t.SS_REFRACTION_USE_INTENSITY_FROM_THICKNESS=!1,t.SS_REFRACTIONMAP_3D=!1,t.SS_GAMMAREFRACTION=!1,t.SS_RGBDREFRACTION=!1,t.SS_LINEARSPECULARREFRACTION=!1,t.SS_REFRACTIONMAP_OPPOSITEZ=!1,t.SS_LODINREFRACTIONALPHA=!1,t.SS_LINKREFRACTIONTOTRANSPARENCY=!1,t.SS_ALBEDOFORREFRACTIONTINT=!1,t.SS_ALBEDOFORTRANSLUCENCYTINT=!1,t.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=!1,t.SS_USE_THICKNESS_AS_DEPTH=!1,t.SS_TRANSLUCENCYCOLOR_TEXTURE=!1,t.SS_APPLY_ALBEDO_AFTER_SUBSURFACE=this.applyAlbedoAfterSubSurface,t._areTexturesDirty&&A.texturesEnabled&&(this._thicknessTexture&&x.ThicknessTextureEnabled&&j(this._thicknessTexture,t,"SS_THICKNESSANDMASK_TEXTURE"),this._refractionIntensityTexture&&x.RefractionIntensityTextureEnabled&&j(this._refractionIntensityTexture,t,"SS_REFRACTIONINTENSITY_TEXTURE"),this._translucencyIntensityTexture&&x.TranslucencyIntensityTextureEnabled&&j(this._translucencyIntensityTexture,t,"SS_TRANSLUCENCYINTENSITY_TEXTURE"),this._translucencyColorTexture&&x.TranslucencyColorTextureEnabled&&(j(this._translucencyColorTexture,t,"SS_TRANSLUCENCYCOLOR_TEXTURE"),t.SS_TRANSLUCENCYCOLOR_TEXTURE_GAMMA=this._translucencyColorTexture.gammaSpace)),t.SS_HAS_THICKNESS=this.maximumThickness-this.minimumThickness!==0,t.SS_USE_GLTF_TEXTURES=this._useGltfStyleTextures,t.SS_REFRACTION_USE_INTENSITY_FROM_THICKNESS=this._useMaskFromThicknessTexture&&!this._refractionIntensityTexture,t.SS_TRANSLUCENCY_USE_INTENSITY_FROM_THICKNESS=this._useMaskFromThicknessTexture&&!this._translucencyIntensityTexture,this._isRefractionEnabled&&A.texturesEnabled){const $=this._getRefractionTexture(A);$&&x.RefractionTextureEnabled&&(t.SS_REFRACTION=!0,t.SS_REFRACTIONMAP_3D=$.isCube,t.SS_GAMMAREFRACTION=$.gammaSpace,t.SS_RGBDREFRACTION=$.isRGBD,t.SS_LINEARSPECULARREFRACTION=$.linearSpecularLOD,t.SS_REFRACTIONMAP_OPPOSITEZ=this._scene.useRightHandedSystem&&$.isCube?!$.invertZ:$.invertZ,t.SS_LODINREFRACTIONALPHA=$.lodLevelInAlpha,t.SS_LINKREFRACTIONTOTRANSPARENCY=this._linkRefractionWithTransparency,t.SS_ALBEDOFORREFRACTIONTINT=this._useAlbedoToTintRefraction,t.SS_USE_LOCAL_REFRACTIONMAP_CUBIC=$.isCube&&$.boundingBoxSize,t.SS_USE_THICKNESS_AS_DEPTH=this.useThicknessAsDepth)}this._isTranslucencyEnabled&&(t.SS_ALBEDOFORTRANSLUCENCYTINT=this._useAlbedoToTintTranslucency)}}hardBindForSubMesh(t,A,$,He){if(!(!this._isRefractionEnabled&&!this._isTranslucencyEnabled&&!this._isScatteringEnabled))if(this.maximumThickness===0&&this.minimumThickness===0)t.updateFloat2("vThicknessParam",0,0);else{He.getRenderingMesh().getWorldMatrix().decompose(Bt.Vector3[0]);const Te=Math.max(Math.abs(Bt.Vector3[0].x),Math.abs(Bt.Vector3[0].y),Math.abs(Bt.Vector3[0].z));t.updateFloat2("vThicknessParam",this.minimumThickness*Te,(this.maximumThickness-this.minimumThickness)*Te)}}bindForSubMesh(t,A,$,He){if(!this._isRefractionEnabled&&!this._isTranslucencyEnabled&&!this._isScatteringEnabled)return;const Te=He.materialDefines,Dt=this._material.isFrozen,Pt=this._material.realTimeFiltering,kt=Te.LODBASEDMICROSFURACE,ee=this._getRefractionTexture(A);if(!t.useUbo||!Dt||!t.isSync){if(this._thicknessTexture&&x.ThicknessTextureEnabled&&(t.updateFloat2("vThicknessInfos",this._thicknessTexture.coordinatesIndex,this._thicknessTexture.level),Q(this._thicknessTexture,t,"thickness")),this._refractionIntensityTexture&&x.RefractionIntensityTextureEnabled&&Te.SS_REFRACTIONINTENSITY_TEXTURE&&(t.updateFloat2("vRefractionIntensityInfos",this._refractionIntensityTexture.coordinatesIndex,this._refractionIntensityTexture.level),Q(this._refractionIntensityTexture,t,"refractionIntensity")),this._translucencyColorTexture&&x.TranslucencyColorTextureEnabled&&Te.SS_TRANSLUCENCYCOLOR_TEXTURE&&(t.updateFloat2("vTranslucencyColorInfos",this._translucencyColorTexture.coordinatesIndex,this._translucencyColorTexture.level),Q(this._translucencyColorTexture,t,"translucencyColor")),this._translucencyIntensityTexture&&x.TranslucencyIntensityTextureEnabled&&Te.SS_TRANSLUCENCYINTENSITY_TEXTURE&&(t.updateFloat2("vTranslucencyIntensityInfos",this._translucencyIntensityTexture.coordinatesIndex,this._translucencyIntensityTexture.level),Q(this._translucencyIntensityTexture,t,"translucencyIntensity")),ee&&x.RefractionTextureEnabled){t.updateMatrix("refractionMatrix",ee.getRefractionTextureMatrix());let Ot=1;ee.isCube||ee.depth&&(Ot=ee.depth);const Ge=ee.getSize().width,Ut=this.volumeIndexOfRefraction;if(t.updateFloat4("vRefractionInfos",ee.level,1/Ut,Ot,this._invertRefractionY?-1:1),t.updateFloat4("vRefractionMicrosurfaceInfos",Ge,ee.lodGenerationScale,ee.lodGenerationOffset,1/this.indexOfRefraction),Pt&&t.updateFloat2("vRefractionFilteringInfo",Ge,Math.log2(Ge)),ee.boundingBoxSize){const Ft=ee;t.updateVector3("vRefractionPosition",Ft.boundingBoxPosition),t.updateVector3("vRefractionSize",Ft.boundingBoxSize)}}this._isScatteringEnabled&&t.updateFloat("scatteringDiffusionProfile",this._scatteringDiffusionProfileIndex),t.updateColor3("vDiffusionDistance",this.diffusionDistance),t.updateFloat4("vTintColor",this.tintColor.r,this.tintColor.g,this.tintColor.b,Math.max(1e-5,this.tintColorAtDistance)),t.updateColor4("vTranslucencyColor",this.translucencyColor??this.tintColor,0),t.updateFloat3("vSubSurfaceIntensity",this.refractionIntensity,this.translucencyIntensity,0),t.updateFloat("dispersion",this.dispersion)}A.texturesEnabled&&(this._thicknessTexture&&x.ThicknessTextureEnabled&&t.setTexture("thicknessSampler",this._thicknessTexture),this._refractionIntensityTexture&&x.RefractionIntensityTextureEnabled&&Te.SS_REFRACTIONINTENSITY_TEXTURE&&t.setTexture("refractionIntensitySampler",this._refractionIntensityTexture),this._translucencyIntensityTexture&&x.TranslucencyIntensityTextureEnabled&&Te.SS_TRANSLUCENCYINTENSITY_TEXTURE&&t.setTexture("translucencyIntensitySampler",this._translucencyIntensityTexture),this._translucencyColorTexture&&x.TranslucencyColorTextureEnabled&&Te.SS_TRANSLUCENCYCOLOR_TEXTURE&&t.setTexture("translucencyColorSampler",this._translucencyColorTexture),ee&&x.RefractionTextureEnabled&&(kt?t.setTexture("refractionSampler",ee):(t.setTexture("refractionSampler",ee._lodTextureMid||ee),t.setTexture("refractionSamplerLow",ee._lodTextureLow||ee),t.setTexture("refractionSamplerHigh",ee._lodTextureHigh||ee))))}_getRefractionTexture(t){return this._refractionTexture?this._refractionTexture:this._isRefractionEnabled?t.environmentTexture:null}get disableAlphaBlending(){return this._isRefractionEnabled&&this._linkRefractionWithTransparency}fillRenderTargetTextures(t){x.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget&&t.push(this._refractionTexture)}hasTexture(t){return this._thicknessTexture===t||this._refractionTexture===t||this._refractionIntensityTexture===t||this._translucencyIntensityTexture===t||this._translucencyColorTexture===t}hasRenderTargetTextures(){return!!(x.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)}getActiveTextures(t){this._thicknessTexture&&t.push(this._thicknessTexture),this._refractionTexture&&t.push(this._refractionTexture),this._refractionIntensityTexture&&t.push(this._refractionIntensityTexture),this._translucencyColorTexture&&t.push(this._translucencyColorTexture),this._translucencyIntensityTexture&&t.push(this._translucencyIntensityTexture)}getAnimatables(t){this._thicknessTexture&&this._thicknessTexture.animations&&this._thicknessTexture.animations.length>0&&t.push(this._thicknessTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&t.push(this._refractionTexture),this._refractionIntensityTexture&&this._refractionIntensityTexture.animations&&this._refractionIntensityTexture.animations.length>0&&t.push(this._refractionIntensityTexture),this._translucencyColorTexture&&this._translucencyColorTexture.animations&&this._translucencyColorTexture.animations.length>0&&t.push(this._translucencyColorTexture),this._translucencyIntensityTexture&&this._translucencyIntensityTexture.animations&&this._translucencyIntensityTexture.animations.length>0&&t.push(this._translucencyIntensityTexture)}dispose(t){t&&(this._thicknessTexture&&this._thicknessTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose(),this._refractionIntensityTexture&&this._refractionIntensityTexture.dispose(),this._translucencyColorTexture&&this._translucencyColorTexture.dispose(),this._translucencyIntensityTexture&&this._translucencyIntensityTexture.dispose())}getClassName(){return"PBRSubSurfaceConfiguration"}addFallbacks(t,A,$){return t.SS_SCATTERING&&A.addFallback($++,"SS_SCATTERING"),t.SS_TRANSLUCENCY&&A.addFallback($++,"SS_TRANSLUCENCY"),$}getSamplers(t){t.push("thicknessSampler","refractionIntensitySampler","translucencyIntensitySampler","refractionSampler","refractionSamplerLow","refractionSamplerHigh","translucencyColorSampler")}getUniforms(){return{ubo:[{name:"vRefractionMicrosurfaceInfos",size:4,type:"vec4"},{name:"vRefractionFilteringInfo",size:2,type:"vec2"},{name:"vTranslucencyIntensityInfos",size:2,type:"vec2"},{name:"vRefractionInfos",size:4,type:"vec4"},{name:"refractionMatrix",size:16,type:"mat4"},{name:"vThicknessInfos",size:2,type:"vec2"},{name:"vRefractionIntensityInfos",size:2,type:"vec2"},{name:"thicknessMatrix",size:16,type:"mat4"},{name:"refractionIntensityMatrix",size:16,type:"mat4"},{name:"translucencyIntensityMatrix",size:16,type:"mat4"},{name:"vThicknessParam",size:2,type:"vec2"},{name:"vDiffusionDistance",size:3,type:"vec3"},{name:"vTintColor",size:4,type:"vec4"},{name:"vSubSurfaceIntensity",size:3,type:"vec3"},{name:"vRefractionPosition",size:3,type:"vec3"},{name:"vRefractionSize",size:3,type:"vec3"},{name:"scatteringDiffusionProfile",size:1,type:"float"},{name:"dispersion",size:1,type:"float"},{name:"vTranslucencyColor",size:4,type:"vec4"},{name:"vTranslucencyColorInfos",size:2,type:"vec2"},{name:"translucencyColorMatrix",size:16,type:"mat4"}]}}},v=new WeakMap,k=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,l=new WeakMap,d=new WeakMap,a=new WeakMap,I=new WeakMap,g=new WeakMap,F=new WeakMap,M=new WeakMap,P=new WeakMap,B=new WeakMap,p=new WeakMap,(()=>{const z=typeof Symbol=="function"&&Symbol.metadata?Object.create(b[Symbol.metadata]??null):void 0;y=[m(),T("_markAllSubMeshesAsTexturesDirty")],f=[m(),T("_markAllSubMeshesAsTexturesDirty")],q=[m(),T("_markAllSubMeshesAsTexturesDirty")],o=[m(),T("_markScenePrePassDirty")],ae=[m()],ne=[m()],K=[m()],E=[m(),T("_markAllSubMeshesAsTexturesDirty")],me=[m(),T("_markAllSubMeshesAsTexturesDirty")],de=[X(),T("_markAllSubMeshesAsTexturesDirty")],ge=[X(),T("_markAllSubMeshesAsTexturesDirty")],Ce=[m(),T("_markAllSubMeshesAsTexturesDirty")],r=[m()],Ee=[m(),T("_markAllSubMeshesAsTexturesDirty")],Le=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ne=[m()],ke=[m()],Ye=[m()],je=[xe()],Je=[m()],et=[m()],it=[xe()],lt=[m(),T("_markAllSubMeshesAsTexturesDirty")],ct=[X(),T("_markAllSubMeshesAsTexturesDirty")],_t=[X(),T("_markAllSubMeshesAsTexturesDirty")],mt=[xe()],Rt=[X(),T("_markAllSubMeshesAsTexturesDirty")],St=[m(),T("_markAllSubMeshesAsTexturesDirty")],It=[m()],Mt=[m()],u(i,null,y,{kind:"accessor",name:"isRefractionEnabled",static:!1,private:!1,access:{has:t=>"isRefractionEnabled"in t,get:t=>t.isRefractionEnabled,set:(t,A)=>{t.isRefractionEnabled=A}},metadata:z},R,N),u(i,null,f,{kind:"accessor",name:"isTranslucencyEnabled",static:!1,private:!1,access:{has:t=>"isTranslucencyEnabled"in t,get:t=>t.isTranslucencyEnabled,set:(t,A)=>{t.isTranslucencyEnabled=A}},metadata:z},L,V),u(i,null,q,{kind:"accessor",name:"isDispersionEnabled",static:!1,private:!1,access:{has:t=>"isDispersionEnabled"in t,get:t=>t.isDispersionEnabled,set:(t,A)=>{t.isDispersionEnabled=A}},metadata:z},te,Y),u(i,null,o,{kind:"accessor",name:"isScatteringEnabled",static:!1,private:!1,access:{has:t=>"isScatteringEnabled"in t,get:t=>t.isScatteringEnabled,set:(t,A)=>{t.isScatteringEnabled=A}},metadata:z},D,J),u(i,null,E,{kind:"accessor",name:"useAlbedoToTintRefraction",static:!1,private:!1,access:{has:t=>"useAlbedoToTintRefraction"in t,get:t=>t.useAlbedoToTintRefraction,set:(t,A)=>{t.useAlbedoToTintRefraction=A}},metadata:z},w,_e),u(i,null,me,{kind:"accessor",name:"useAlbedoToTintTranslucency",static:!1,private:!1,access:{has:t=>"useAlbedoToTintTranslucency"in t,get:t=>t.useAlbedoToTintTranslucency,set:(t,A)=>{t.useAlbedoToTintTranslucency=A}},metadata:z},Re,Ae),u(i,null,de,{kind:"accessor",name:"thicknessTexture",static:!1,private:!1,access:{has:t=>"thicknessTexture"in t,get:t=>t.thicknessTexture,set:(t,A)=>{t.thicknessTexture=A}},metadata:z},Se,pe),u(i,null,ge,{kind:"accessor",name:"refractionTexture",static:!1,private:!1,access:{has:t=>"refractionTexture"in t,get:t=>t.refractionTexture,set:(t,A)=>{t.refractionTexture=A}},metadata:z},Ie,be),u(i,null,Ce,{kind:"accessor",name:"indexOfRefraction",static:!1,private:!1,access:{has:t=>"indexOfRefraction"in t,get:t=>t.indexOfRefraction,set:(t,A)=>{t.indexOfRefraction=A}},metadata:z},Me,Z),u(i,null,Ee,{kind:"accessor",name:"invertRefractionY",static:!1,private:!1,access:{has:t=>"invertRefractionY"in t,get:t=>t.invertRefractionY,set:(t,A)=>{t.invertRefractionY=A}},metadata:z},ye,De),u(i,null,Le,{kind:"accessor",name:"linkRefractionWithTransparency",static:!1,private:!1,access:{has:t=>"linkRefractionWithTransparency"in t,get:t=>t.linkRefractionWithTransparency,set:(t,A)=>{t.linkRefractionWithTransparency=A}},metadata:z},Oe,Fe),u(i,null,lt,{kind:"accessor",name:"useMaskFromThicknessTexture",static:!1,private:!1,access:{has:t=>"useMaskFromThicknessTexture"in t,get:t=>t.useMaskFromThicknessTexture,set:(t,A)=>{t.useMaskFromThicknessTexture=A}},metadata:z},nt,ut),u(i,null,ct,{kind:"accessor",name:"refractionIntensityTexture",static:!1,private:!1,access:{has:t=>"refractionIntensityTexture"in t,get:t=>t.refractionIntensityTexture,set:(t,A)=>{t.refractionIntensityTexture=A}},metadata:z},ot,ht),u(i,null,_t,{kind:"accessor",name:"translucencyIntensityTexture",static:!1,private:!1,access:{has:t=>"translucencyIntensityTexture"in t,get:t=>t.translucencyIntensityTexture,set:(t,A)=>{t.translucencyIntensityTexture=A}},metadata:z},Tt,ft),u(i,null,Rt,{kind:"accessor",name:"translucencyColorTexture",static:!1,private:!1,access:{has:t=>"translucencyColorTexture"in t,get:t=>t.translucencyColorTexture,set:(t,A)=>{t.translucencyColorTexture=A}},metadata:z},At,dt),u(i,null,St,{kind:"accessor",name:"useGltfStyleTextures",static:!1,private:!1,access:{has:t=>"useGltfStyleTextures"in t,get:t=>t.useGltfStyleTextures,set:(t,A)=>{t.useGltfStyleTextures=A}},metadata:z},pt,gt),u(null,null,ae,{kind:"field",name:"_scatteringDiffusionProfileIndex",static:!1,private:!1,access:{has:t=>"_scatteringDiffusionProfileIndex"in t,get:t=>t._scatteringDiffusionProfileIndex,set:(t,A)=>{t._scatteringDiffusionProfileIndex=A}},metadata:z},re,le),u(null,null,ne,{kind:"field",name:"refractionIntensity",static:!1,private:!1,access:{has:t=>"refractionIntensity"in t,get:t=>t.refractionIntensity,set:(t,A)=>{t.refractionIntensity=A}},metadata:z},ue,ce),u(null,null,K,{kind:"field",name:"translucencyIntensity",static:!1,private:!1,access:{has:t=>"translucencyIntensity"in t,get:t=>t.translucencyIntensity,set:(t,A)=>{t.translucencyIntensity=A}},metadata:z},c,C),u(null,null,r,{kind:"field",name:"_volumeIndexOfRefraction",static:!1,private:!1,access:{has:t=>"_volumeIndexOfRefraction"in t,get:t=>t._volumeIndexOfRefraction,set:(t,A)=>{t._volumeIndexOfRefraction=A}},metadata:z},O,ie),u(null,null,Ne,{kind:"field",name:"minimumThickness",static:!1,private:!1,access:{has:t=>"minimumThickness"in t,get:t=>t.minimumThickness,set:(t,A)=>{t.minimumThickness=A}},metadata:z},ve,Pe),u(null,null,ke,{kind:"field",name:"maximumThickness",static:!1,private:!1,access:{has:t=>"maximumThickness"in t,get:t=>t.maximumThickness,set:(t,A)=>{t.maximumThickness=A}},metadata:z},Ve,ze),u(null,null,Ye,{kind:"field",name:"useThicknessAsDepth",static:!1,private:!1,access:{has:t=>"useThicknessAsDepth"in t,get:t=>t.useThicknessAsDepth,set:(t,A)=>{t.useThicknessAsDepth=A}},metadata:z},Xe,Ke),u(null,null,je,{kind:"field",name:"tintColor",static:!1,private:!1,access:{has:t=>"tintColor"in t,get:t=>t.tintColor,set:(t,A)=>{t.tintColor=A}},metadata:z},Qe,Ze),u(null,null,Je,{kind:"field",name:"tintColorAtDistance",static:!1,private:!1,access:{has:t=>"tintColorAtDistance"in t,get:t=>t.tintColorAtDistance,set:(t,A)=>{t.tintColorAtDistance=A}},metadata:z},$e,qe),u(null,null,et,{kind:"field",name:"dispersion",static:!1,private:!1,access:{has:t=>"dispersion"in t,get:t=>t.dispersion,set:(t,A)=>{t.dispersion=A}},metadata:z},tt,st),u(null,null,it,{kind:"field",name:"diffusionDistance",static:!1,private:!1,access:{has:t=>"diffusionDistance"in t,get:t=>t.diffusionDistance,set:(t,A)=>{t.diffusionDistance=A}},metadata:z},at,rt),u(null,null,mt,{kind:"field",name:"translucencyColor",static:!1,private:!1,access:{has:t=>"translucencyColor"in t,get:t=>t.translucencyColor,set:(t,A)=>{t.translucencyColor=A}},metadata:z},Et,xt),u(null,null,It,{kind:"field",name:"applyAlbedoAfterSubSurface",static:!1,private:!1,access:{has:t=>"applyAlbedoAfterSubSurface"in t,get:t=>t.applyAlbedoAfterSubSurface,set:(t,A)=>{t.applyAlbedoAfterSubSurface=A}},metadata:z},bt,Ct),u(null,null,Mt,{kind:"field",name:"legacyTranslucency",static:!1,private:!1,access:{has:t=>"legacyTranslucency"in t,get:t=>t.legacyTranslucency,set:(t,A)=>{t.legacyTranslucency=A}},metadata:z},yt,Lt),z&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:z})})(),i.DEFAULT_APPLY_ALBEDO_AFTERSUBSURFACE=!1,i.DEFAULT_LEGACY_TRANSLUCENCY=!1,i})();const We={effect:null,subMesh:null};class Dr extends xr(Rr(Be)){}class La extends fr(Dr){constructor(v){super(v),this.PBR=!0,this.NUM_SAMPLES="0",this.REALTIME_FILTERING=!1,this.IBL_CDF_FILTERING=!1,this.ALBEDO=!1,this.GAMMAALBEDO=!1,this.ALBEDODIRECTUV=0,this.VERTEXCOLOR=!1,this.BASE_WEIGHT=!1,this.BASE_WEIGHTDIRECTUV=0,this.BASE_DIFFUSE_ROUGHNESS=!1,this.BASE_DIFFUSE_ROUGHNESSDIRECTUV=0,this.BAKED_VERTEX_ANIMATION_TEXTURE=!1,this.AMBIENT=!1,this.AMBIENTDIRECTUV=0,this.AMBIENTINGRAYSCALE=!1,this.OPACITY=!1,this.VERTEXALPHA=!1,this.OPACITYDIRECTUV=0,this.OPACITYRGB=!1,this.ALPHATEST=!1,this.DEPTHPREPASS=!1,this.ALPHABLEND=!1,this.ALPHAFROMALBEDO=!1,this.ALPHATESTVALUE="0.5",this.SPECULAROVERALPHA=!1,this.RADIANCEOVERALPHA=!1,this.ALPHAFRESNEL=!1,this.LINEARALPHAFRESNEL=!1,this.PREMULTIPLYALPHA=!1,this.EMISSIVE=!1,this.EMISSIVEDIRECTUV=0,this.GAMMAEMISSIVE=!1,this.REFLECTIVITY=!1,this.REFLECTIVITY_GAMMA=!1,this.REFLECTIVITYDIRECTUV=0,this.SPECULARTERM=!1,this.MICROSURFACEFROMREFLECTIVITYMAP=!1,this.MICROSURFACEAUTOMATIC=!1,this.LODBASEDMICROSFURACE=!1,this.MICROSURFACEMAP=!1,this.MICROSURFACEMAPDIRECTUV=0,this.METALLICWORKFLOW=!1,this.ROUGHNESSSTOREINMETALMAPALPHA=!1,this.ROUGHNESSSTOREINMETALMAPGREEN=!1,this.METALLNESSSTOREINMETALMAPBLUE=!1,this.AOSTOREINMETALMAPRED=!1,this.METALLIC_REFLECTANCE=!1,this.METALLIC_REFLECTANCE_GAMMA=!1,this.METALLIC_REFLECTANCEDIRECTUV=0,this.METALLIC_REFLECTANCE_USE_ALPHA_ONLY=!1,this.REFLECTANCE=!1,this.REFLECTANCE_GAMMA=!1,this.REFLECTANCEDIRECTUV=0,this.ENVIRONMENTBRDF=!1,this.ENVIRONMENTBRDF_RGBD=!1,this.NORMAL=!1,this.TANGENT=!1,this.BUMP=!1,this.BUMPDIRECTUV=0,this.OBJECTSPACE_NORMALMAP=!1,this.PARALLAX=!1,this.PARALLAX_RHS=!1,this.PARALLAXOCCLUSION=!1,this.NORMALXYSCALE=!0,this.LIGHTMAP=!1,this.LIGHTMAPDIRECTUV=0,this.USELIGHTMAPASSHADOWMAP=!1,this.GAMMALIGHTMAP=!1,this.RGBDLIGHTMAP=!1,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,this.LINEARSPECULARREFLECTION=!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.MULTIVIEW=!1,this.ORDER_INDEPENDENT_TRANSPARENCY=!1,this.ORDER_INDEPENDENT_TRANSPARENCY_16BITS=!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.rebuild()}reset(){super.reset(),this.ALPHATESTVALUE="0.5",this.PBR=!0,this.NORMALXYSCALE=!0}}class Pr extends mr(Er){}let he=(()=>{var i,v;let k=Pr,U,G=[],W=[];return i=class extends k{get realTimeFiltering(){return this._realTimeFiltering}set realTimeFiltering(l){this._realTimeFiltering=l,this.markAsDirty(1)}get realTimeFilteringQuality(){return this._realTimeFilteringQuality}set realTimeFilteringQuality(l){this._realTimeFilteringQuality=l,this.markAsDirty(1)}get canRenderToMRT(){return!0}get debugMode(){return h(this,v,"f")}set debugMode(l){_(this,v,l,"f")}constructor(l,d,a=!1){super(l,d,void 0,a||i.ForceGLSL),this._directIntensity=1,this._emissiveIntensity=1,this._environmentIntensity=1,this._specularIntensity=1,this._lightingInfos=new Da(this._directIntensity,this._emissiveIntensity,this._environmentIntensity,this._specularIntensity),this._disableBumpMap=!1,this._albedoTexture=null,this._baseWeightTexture=null,this._baseDiffuseRoughnessTexture=null,this._ambientTexture=null,this._ambientTextureStrength=1,this._ambientTextureImpactOnAnalyticalLights=i.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,this._opacityTexture=null,this._reflectionTexture=null,this._emissiveTexture=null,this._reflectivityTexture=null,this._metallicTexture=null,this._metallic=null,this._roughness=null,this._metallicF0Factor=1,this._metallicReflectanceColor=se.White(),this._useOnlyMetallicFromMetallicReflectanceTexture=!1,this._metallicReflectanceTexture=null,this._reflectanceTexture=null,this._microSurfaceTexture=null,this._bumpTexture=null,this._lightmapTexture=null,this._ambientColor=new se(0,0,0),this._albedoColor=new se(1,1,1),this._baseWeight=1,this._baseDiffuseRoughness=null,this._reflectivityColor=new se(1,1,1),this._reflectionColor=new se(1,1,1),this._emissiveColor=new se(0,0,0),this._microSurface=.9,this._useLightmapAsShadowmap=!1,this._useHorizonOcclusion=!0,this._useRadianceOcclusion=!0,this._useAlphaFromAlbedoTexture=!1,this._useSpecularOverAlpha=!0,this._useMicroSurfaceFromReflectivityMapAlpha=!1,this._useRoughnessFromMetallicTextureAlpha=!0,this._useRoughnessFromMetallicTextureGreen=!1,this._useMetallnessFromMetallicTextureBlue=!1,this._useAmbientOcclusionFromMetallicTextureRed=!1,this._useAmbientInGrayScale=!1,this._useAutoMicroSurfaceFromReflectivityMap=!1,this._lightFalloff=i.LIGHTFALLOFF_PHYSICAL,this._useRadianceOverAlpha=!0,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._forceIrradianceInFragment=!1,this._realTimeFiltering=!1,this._realTimeFilteringQuality=8,this._forceNormalForward=!1,this._enableSpecularAntiAliasing=!1,this._renderTargets=new Pa(16),this._globalAmbientColor=new se(0,0,0),this._unlit=!1,this._applyDecalMapAfterDetailMap=!1,this._debugMode=0,this._shadersLoaded=!1,this._breakShaderLoadedCheck=!1,this._vertexPullingMetadata=null,v.set(this,s(this,G,0)),this.debugLimit=(s(this,W),-1),this.debugFactor=1,this._cacheHasRenderTargetTextures=!1,this.brdf=new gr(this),this.clearCoat=new br(this),this.iridescence=new Mr(this),this.anisotropy=new Lr(this),this.sheen=new Fr(this),this.subSurface=new vr(this),this.detailMap=new ka(this),this._attachImageProcessingConfiguration(null),this.getRenderTargetTextures=()=>(this._renderTargets.reset(),x.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&this._renderTargets.push(this._reflectionTexture),this._eventInfo.renderTargets=this._renderTargets,this._callbackPluginEventFillRenderTargetTextures(this._eventInfo),this._renderTargets),this._environmentBRDFTexture=Fa(this.getScene()),this.prePassConfiguration=new Ma}get hasRenderTargetTextures(){return x.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget?!0:this._cacheHasRenderTargetTextures}get isPrePassCapable(){return!this.disableDepthWrite}getClassName(){return"PBRBaseMaterial"}get _disableAlphaBlending(){return this._transparencyMode===i.PBRMATERIAL_OPAQUE||this._transparencyMode===i.PBRMATERIAL_ALPHATEST||this.subSurface?.disableAlphaBlending}needAlphaBlending(){return this._hasTransparencyMode?this._transparencyModeIsBlend:this._disableAlphaBlending?!1:this.alpha<1||this._opacityTexture!=null||this._shouldUseAlphaFromAlbedoTexture()}needAlphaTesting(){return this._hasTransparencyMode?this._transparencyModeIsTest:this.subSurface?.disableAlphaBlending?!1:this._hasAlphaChannel()&&(this._transparencyMode==null||this._transparencyMode===i.PBRMATERIAL_ALPHATEST)}_shouldUseAlphaFromAlbedoTexture(){return this._albedoTexture!=null&&this._albedoTexture.hasAlpha&&this._useAlphaFromAlbedoTexture&&this._transparencyMode!==i.PBRMATERIAL_OPAQUE}_hasAlphaChannel(){return this._albedoTexture!=null&&this._albedoTexture.hasAlpha||this._opacityTexture!=null}getAlphaTestTexture(){return this._albedoTexture}isReadyForSubMesh(l,d,a){this._uniformBufferLayoutBuilt||this.buildUniformLayout();const I=d._drawWrapper;if(I.effect&&this.isFrozen&&I._wasPreviouslyReady&&I._wasPreviouslyUsingInstances===a)return!0;d.materialDefines||(this._callbackPluginEventGeneric(4,this._eventInfo),d.materialDefines=new La(this._eventInfo.defineNames));const g=d.materialDefines;if(this._isReadyForSubMesh(d))return!0;const F=this.getScene(),M=F.getEngine();if(g._areTexturesDirty&&(this._eventInfo.hasRenderTargetTextures=!1,this._callbackPluginEventHasRenderTargetTextures(this._eventInfo),this._cacheHasRenderTargetTextures=this._eventInfo.hasRenderTargetTextures,F.texturesEnabled)){if(this._albedoTexture&&x.DiffuseTextureEnabled&&!this._albedoTexture.isReadyOrNotBlocking()||this._baseWeightTexture&&x.BaseWeightTextureEnabled&&!this._baseWeightTexture.isReadyOrNotBlocking()||this._baseDiffuseRoughnessTexture&&x.BaseDiffuseRoughnessTextureEnabled&&!this._baseDiffuseRoughnessTexture.isReadyOrNotBlocking()||this._ambientTexture&&x.AmbientTextureEnabled&&!this._ambientTexture.isReadyOrNotBlocking()||this._opacityTexture&&x.OpacityTextureEnabled&&!this._opacityTexture.isReadyOrNotBlocking())return!1;const y=this._getReflectionTexture();if(y&&x.ReflectionTextureEnabled){if(!y.isReadyOrNotBlocking())return!1;if(y.irradianceTexture){if(!y.irradianceTexture.isReadyOrNotBlocking())return!1}else if(!y.sphericalPolynomial&&y.getInternalTexture()?._sphericalPolynomialPromise)return!1}if(this._lightmapTexture&&x.LightmapTextureEnabled&&!this._lightmapTexture.isReadyOrNotBlocking()||this._emissiveTexture&&x.EmissiveTextureEnabled&&!this._emissiveTexture.isReadyOrNotBlocking())return!1;if(x.SpecularTextureEnabled){if(this._metallicTexture){if(!this._metallicTexture.isReadyOrNotBlocking())return!1}else if(this._reflectivityTexture&&!this._reflectivityTexture.isReadyOrNotBlocking())return!1;if(this._metallicReflectanceTexture&&!this._metallicReflectanceTexture.isReadyOrNotBlocking()||this._reflectanceTexture&&!this._reflectanceTexture.isReadyOrNotBlocking()||this._microSurfaceTexture&&!this._microSurfaceTexture.isReadyOrNotBlocking())return!1}if(M.getCaps().standardDerivatives&&this._bumpTexture&&x.BumpTextureEnabled&&!this._disableBumpMap&&!this._bumpTexture.isReady()||this._environmentBRDFTexture&&x.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady())return!1}if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=g,this._eventInfo.subMesh=d,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh||g._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;if(g.AREALIGHTUSED||g.CLUSTLIGHT_BATCH){for(let y=0;y<l.lightSources.length;y++)if(!l.lightSources[y]._isReady())return!1}if(!M.getCaps().standardDerivatives&&!l.isVerticesDataPresent(Ue.NormalKind)&&(l.createNormals(!0),Ua.Warn("PBRMaterial: Normals have been created for the mesh: "+l.name)),!Ba(F,l,this._maxSimultaneousLights,this._disableLighting))return!1;const P=d.effect,B=g._areLightsDisposed,p=this._prepareEffect(l,d.getRenderingMesh(),g,this.onCompiled,this.onError,a,null);let b=!1;if(p)if(this._onEffectCreatedObservable&&(We.effect=p,We.subMesh=d,this._onEffectCreatedObservable.notifyObservers(We)),this.allowShaderHotSwapping&&P&&!p.isReady()){if(g.markAsUnprocessed(),b=this.isFrozen,B)return g._areLightsDisposed=!0,!1}else F.resetCachedMaterial(),d.setEffect(p,g,this._materialContext);return!d.effect||!d.effect.isReady()?!1:(g._renderId=F.getRenderId(),I._wasPreviouslyReady=!b,I._wasPreviouslyUsingInstances=!!a,this._checkScenePerformancePriority(),!0)}isMetallicWorkflow(){return!!(this._metallic!=null||this._roughness!=null||this._metallicTexture)}_prepareEffect(l,d,a,I=null,g=null,F=null,M=null){if(this._prepareDefines(l,d,a,F,M),!a.isDirty)return null;a.markAsProcessed();const B=this.getScene().getEngine(),p=new za;let b=0;a.USESPHERICALINVERTEX&&p.addFallback(b++,"USESPHERICALINVERTEX"),a.FOG&&p.addFallback(b,"FOG"),a.SPECULARAA&&p.addFallback(b,"SPECULARAA"),a.POINTSIZE&&p.addFallback(b,"POINTSIZE"),a.LOGARITHMICDEPTH&&p.addFallback(b,"LOGARITHMICDEPTH"),a.PARALLAX&&p.addFallback(b,"PARALLAX"),a.PARALLAX_RHS&&p.addFallback(b,"PARALLAX_RHS"),a.PARALLAXOCCLUSION&&p.addFallback(b++,"PARALLAXOCCLUSION"),a.ENVIRONMENTBRDF&&p.addFallback(b++,"ENVIRONMENTBRDF"),a.TANGENT&&p.addFallback(b++,"TANGENT"),a.BUMP&&p.addFallback(b++,"BUMP"),b=Ha(a,p,this._maxSimultaneousLights,b),a.SPECULARTERM&&p.addFallback(b++,"SPECULARTERM"),a.USESPHERICALFROMREFLECTIONMAP&&p.addFallback(b++,"USESPHERICALFROMREFLECTIONMAP"),a.USEIRRADIANCEMAP&&p.addFallback(b++,"USEIRRADIANCEMAP"),a.LIGHTMAP&&p.addFallback(b++,"LIGHTMAP"),a.NORMAL&&p.addFallback(b++,"NORMAL"),a.AMBIENT&&p.addFallback(b++,"AMBIENT"),a.EMISSIVE&&p.addFallback(b++,"EMISSIVE"),a.VERTEXCOLOR&&p.addFallback(b++,"VERTEXCOLOR"),a.MORPHTARGETS&&p.addFallback(b++,"MORPHTARGETS"),a.MULTIVIEW&&p.addFallback(0,"MULTIVIEW");const y=[Ue.PositionKind];a.NORMAL&&y.push(Ue.NormalKind),a.TANGENT&&y.push(Ue.TangentKind);for(let o=1;o<=6;++o)a["UV"+o]&&y.push(`uv${o===1?"":o}`);a.VERTEXCOLOR&&y.push(Ue.ColorKind),Ga(y,l,a,p),Wa(y,a),wa(y,l,a),Va(y,l,a);let R="pbr";const N=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vAlbedoColor","baseWeight","baseDiffuseRoughness","vReflectivityColor","vMetallicReflectanceFactors","vEmissiveColor","visibility","vFogInfos","vFogColor","pointSize","vAlbedoInfos","vBaseWeightInfos","vBaseDiffuseRoughnessInfos","vAmbientInfos","vOpacityInfos","vEmissiveInfos","vReflectivityInfos","vMetallicReflectanceInfos","vReflectanceInfos","vMicroSurfaceSamplerInfos","vBumpInfos","vLightmapInfos","mBones","albedoMatrix","baseWeightMatrix","baseDiffuseRoughnessMatrix","ambientMatrix","opacityMatrix","emissiveMatrix","reflectivityMatrix","normalMatrix","microSurfaceSamplerMatrix","bumpMatrix","lightmapMatrix","metallicReflectanceMatrix","reflectanceMatrix","vLightingIntensity","logarithmicDepthConstant","vTangentSpaceParams","boneTextureInfo","vDebugMode","morphTargetTextureInfo","morphTargetTextureIndices","cameraInfo","vTextureRepetitionHexTilingParams"],f=["albedoSampler","baseWeightSampler","baseDiffuseRoughnessSampler","reflectivitySampler","ambientSampler","emissiveSampler","bumpSampler","lightmapSampler","opacitySampler","microSurfaceSampler","environmentBrdfSampler","boneSampler","metallicReflectanceSampler","reflectanceSampler","morphTargets","oitDepthSampler","oitFrontColorSampler","areaLightsLTC1Sampler","areaLightsLTC2Sampler"];Ya(N,f,!0);const L=["Material","Scene","Mesh"],V={maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:a.NUM_MORPH_INFLUENCERS};if(this._eventInfo.fallbacks=p,this._eventInfo.fallbackRank=b,this._eventInfo.defines=a,this._eventInfo.uniforms=N,this._eventInfo.attributes=y,this._eventInfo.samplers=f,this._eventInfo.uniformBuffersNames=L,this._eventInfo.customCode=void 0,this._eventInfo.mesh=l,this._eventInfo.indexParameters=V,this._callbackPluginEventGeneric(128,this._eventInfo),Ht.AddUniformsAndSamplers(N,f),Ma.AddUniforms(N),Xa(N),this._useVertexPulling){const o=d?.geometry;o&&(this._vertexPullingMetadata=Ka(o),this._vertexPullingMetadata&&this._vertexPullingMetadata.forEach((D,J)=>{N.push(`vp_${J}_info`)}))}else this._vertexPullingMetadata=null;Gt&&(Gt.PrepareUniforms(N,a),Gt.PrepareSamplers(f,a)),ja({uniformsNames:N,uniformBuffersNames:L,samplers:f,defines:a,maxSimultaneousLights:this._maxSimultaneousLights,shaderLanguage:this._shaderLanguage});const q={};this.customShaderNameResolve&&(R=this.customShaderNameResolve(R,N,L,f,a,y,q));const te=a.toString(),Y=B.createEffect(R,{attributes:y,uniformsNames:N,uniformBuffersNames:L,samplers:f,defines:te,fallbacks:p,onCompiled:I,onError:g,indexParameters:V,processFinalCode:q.processFinalCode,processCodeAfterIncludes:this._eventInfo.customCode,multiTarget:a.PREPASS,shaderLanguage:this._shaderLanguage,extraInitializationsAsync:this._shadersLoaded?void 0:async()=>{this.shaderLanguage===1?await Promise.all([zt(()=>import("./pbr.vertex-BfdONsf2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),zt(()=>import("./pbr.fragment-cIhMKwLs.js"),__vite__mapDeps([17,1,2,18,3,4,5,7,19,20,21,22,15,23,8,11,9,24,25]),import.meta.url)]):await Promise.all([zt(()=>import("./index-B2zBEWsq.js").then(o=>o.cQ),__vite__mapDeps([1,2]),import.meta.url),zt(()=>import("./index-B2zBEWsq.js").then(o=>o.cP),__vite__mapDeps([1,2]),import.meta.url)]),this._shadersLoaded=!0}},B);return this._eventInfo.customCode=void 0,Y}_prepareDefines(l,d,a,I=null,g=null){const F=d.hasThinInstances,M=this.getScene(),P=M.getEngine();Qa(M,l,a,!0,this._maxSimultaneousLights,this._disableLighting),a._needNormals=!0,Za(M,a);const B=this.needAlphaBlendingForMesh(l)&&this.getScene().useOrderIndependentTransparency;if(Ja(M,a,this.canRenderToMRT&&!B),$a(M,a,B),Ht.PrepareDefines(P.currentRenderPassId,l,a),a.METALLICWORKFLOW=this.isMetallicWorkflow(),a._areTexturesDirty){a._needUVs=!1;for(let p=1;p<=6;++p)a["MAINUV"+p]=!1;if(M.texturesEnabled){a.ALBEDODIRECTUV=0,a.BASE_WEIGHTDIRECTUV=0,a.BASE_DIFFUSE_ROUGHNESSDIRECTUV=0,a.AMBIENTDIRECTUV=0,a.OPACITYDIRECTUV=0,a.EMISSIVEDIRECTUV=0,a.REFLECTIVITYDIRECTUV=0,a.MICROSURFACEMAPDIRECTUV=0,a.METALLIC_REFLECTANCEDIRECTUV=0,a.REFLECTANCEDIRECTUV=0,a.BUMPDIRECTUV=0,a.LIGHTMAPDIRECTUV=0,P.getCaps().textureLOD&&(a.LODBASEDMICROSFURACE=!0),this._albedoTexture&&x.DiffuseTextureEnabled?(j(this._albedoTexture,a,"ALBEDO"),a.GAMMAALBEDO=this._albedoTexture.gammaSpace):a.ALBEDO=!1,this._baseWeightTexture&&x.BaseWeightTextureEnabled?j(this._baseWeightTexture,a,"BASE_WEIGHT"):a.BASE_WEIGHT=!1,this._baseDiffuseRoughnessTexture&&x.BaseDiffuseRoughnessTextureEnabled?j(this._baseDiffuseRoughnessTexture,a,"BASE_DIFFUSE_ROUGHNESS"):a.BASE_DIFFUSE_ROUGHNESS=!1,this._ambientTexture&&x.AmbientTextureEnabled?(j(this._ambientTexture,a,"AMBIENT"),a.AMBIENTINGRAYSCALE=this._useAmbientInGrayScale):a.AMBIENT=!1,this._opacityTexture&&x.OpacityTextureEnabled?(j(this._opacityTexture,a,"OPACITY"),a.OPACITYRGB=this._opacityTexture.getAlphaFromRGB):a.OPACITY=!1;const p=this._getReflectionTexture(),b=this._forceIrradianceInFragment||this.realTimeFiltering||this._twoSidedLighting||P.getCaps().maxVaryingVectors<=8||this._baseDiffuseRoughnessTexture!=null;qa(M,p,a,this.realTimeFiltering,this.realTimeFilteringQuality,!b),this._lightmapTexture&&x.LightmapTextureEnabled?(j(this._lightmapTexture,a,"LIGHTMAP"),a.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,a.GAMMALIGHTMAP=this._lightmapTexture.gammaSpace,a.RGBDLIGHTMAP=this._lightmapTexture.isRGBD):a.LIGHTMAP=!1,this._emissiveTexture&&x.EmissiveTextureEnabled?(j(this._emissiveTexture,a,"EMISSIVE"),a.GAMMAEMISSIVE=this._emissiveTexture.gammaSpace):a.EMISSIVE=!1,x.SpecularTextureEnabled?(this._metallicTexture?(j(this._metallicTexture,a,"REFLECTIVITY"),a.ROUGHNESSSTOREINMETALMAPALPHA=this._useRoughnessFromMetallicTextureAlpha,a.ROUGHNESSSTOREINMETALMAPGREEN=!this._useRoughnessFromMetallicTextureAlpha&&this._useRoughnessFromMetallicTextureGreen,a.METALLNESSSTOREINMETALMAPBLUE=this._useMetallnessFromMetallicTextureBlue,a.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed,a.REFLECTIVITY_GAMMA=!1):this._reflectivityTexture?(j(this._reflectivityTexture,a,"REFLECTIVITY"),a.MICROSURFACEFROMREFLECTIVITYMAP=this._useMicroSurfaceFromReflectivityMapAlpha,a.MICROSURFACEAUTOMATIC=this._useAutoMicroSurfaceFromReflectivityMap,a.REFLECTIVITY_GAMMA=this._reflectivityTexture.gammaSpace):a.REFLECTIVITY=!1,this._metallicReflectanceTexture||this._reflectanceTexture?(a.METALLIC_REFLECTANCE_USE_ALPHA_ONLY=this._useOnlyMetallicFromMetallicReflectanceTexture,this._metallicReflectanceTexture?(j(this._metallicReflectanceTexture,a,"METALLIC_REFLECTANCE"),a.METALLIC_REFLECTANCE_GAMMA=this._metallicReflectanceTexture.gammaSpace):a.METALLIC_REFLECTANCE=!1,this._reflectanceTexture&&(!this._metallicReflectanceTexture||this._metallicReflectanceTexture&&this._useOnlyMetallicFromMetallicReflectanceTexture)?(j(this._reflectanceTexture,a,"REFLECTANCE"),a.REFLECTANCE_GAMMA=this._reflectanceTexture.gammaSpace):a.REFLECTANCE=!1):(a.METALLIC_REFLECTANCE=!1,a.REFLECTANCE=!1),this._microSurfaceTexture?j(this._microSurfaceTexture,a,"MICROSURFACEMAP"):a.MICROSURFACEMAP=!1):(a.REFLECTIVITY=!1,a.MICROSURFACEMAP=!1),P.getCaps().standardDerivatives&&this._bumpTexture&&x.BumpTextureEnabled&&!this._disableBumpMap?(j(this._bumpTexture,a,"BUMP"),this._useParallax&&this._albedoTexture&&x.DiffuseTextureEnabled?(a.PARALLAX=!0,a.PARALLAX_RHS=M.useRightHandedSystem,a.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):a.PARALLAX=!1,a.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):(a.BUMP=!1,a.PARALLAX=!1,a.PARALLAX_RHS=!1,a.PARALLAXOCCLUSION=!1,a.OBJECTSPACE_NORMALMAP=!1),this._environmentBRDFTexture&&x.ReflectionTextureEnabled?(a.ENVIRONMENTBRDF=!0,a.ENVIRONMENTBRDF_RGBD=this._environmentBRDFTexture.isRGBD):(a.ENVIRONMENTBRDF=!1,a.ENVIRONMENTBRDF_RGBD=!1),this._shouldUseAlphaFromAlbedoTexture()?a.ALPHAFROMALBEDO=!0:a.ALPHAFROMALBEDO=!1}a.SPECULAROVERALPHA=this._useSpecularOverAlpha,this._lightFalloff===i.LIGHTFALLOFF_STANDARD?(a.USEPHYSICALLIGHTFALLOFF=!1,a.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===i.LIGHTFALLOFF_GLTF?(a.USEPHYSICALLIGHTFALLOFF=!1,a.USEGLTFLIGHTFALLOFF=!0):(a.USEPHYSICALLIGHTFALLOFF=!0,a.USEGLTFLIGHTFALLOFF=!1),a.RADIANCEOVERALPHA=this._useRadianceOverAlpha,!this.backFaceCulling&&this._twoSidedLighting?a.TWOSIDEDLIGHTING=!0:a.TWOSIDEDLIGHTING=!1,a.MIRRORED=!!M._mirroredCameraPosition,a.SPECULARAA=P.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(l),a.ALPHAFRESNEL=this._useAlphaFresnel||this._useLinearAlphaFresnel,a.LINEARALPHAFRESNEL=this._useLinearAlphaFresnel),a._areTexturesDirty&&(a.TEXTURE_REPETITION_MODE=P.version>1||P.isWebGPU?this.textureRepetitionMode:0),a._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(a),a.FORCENORMALFORWARD=this._forceNormalForward,a.RADIANCEOCCLUSION=this._useRadianceOcclusion,a.HORIZONOCCLUSION=this._useHorizonOcclusion,a._areMiscDirty&&(er(l,M,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this.needAlphaTestingForMesh(l),a,this._applyDecalMapAfterDetailMap,this._useVertexPulling,d,this._isVertexOutputInvariant),a.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!l.isVerticesDataPresent(Ue.NormalKind),a.DEBUGMODE=this._debugMode),tr(M,P,this,a,!!I,g,F),this._eventInfo.defines=a,this._eventInfo.mesh=l,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),sr(l,a,!0,!0,!0,this._transparencyMode!==i.PBRMATERIAL_OPAQUE),this._callbackPluginEventPrepareDefines(this._eventInfo)}forceCompilation(l,d,a){const I={clipPlane:!1,useInstances:!1,...a};this._uniformBufferLayoutBuilt||this.buildUniformLayout(),this._callbackPluginEventGeneric(4,this._eventInfo),(()=>{if(this._breakShaderLoadedCheck)return;const F=new La(this._eventInfo.defineNames),M=this._prepareEffect(l,l,F,void 0,void 0,I.useInstances,I.clipPlane);this._onEffectCreatedObservable&&(We.effect=M,We.subMesh=null,this._onEffectCreatedObservable.notifyObservers(We)),M.isReady()?d&&d(this):M.onCompileObservable.add(()=>{d&&d(this)})})()}buildUniformLayout(){const l=this._uniformBuffer;l.addUniform("vAlbedoInfos",2),l.addUniform("vBaseWeightInfos",2),l.addUniform("vBaseDiffuseRoughnessInfos",2),l.addUniform("vAmbientInfos",4),l.addUniform("vOpacityInfos",2),l.addUniform("vEmissiveInfos",2),l.addUniform("vLightmapInfos",2),l.addUniform("vReflectivityInfos",3),l.addUniform("vMicroSurfaceSamplerInfos",2),l.addUniform("vBumpInfos",3),l.addUniform("albedoMatrix",16),l.addUniform("baseWeightMatrix",16),l.addUniform("baseDiffuseRoughnessMatrix",16),l.addUniform("ambientMatrix",16),l.addUniform("opacityMatrix",16),l.addUniform("emissiveMatrix",16),l.addUniform("lightmapMatrix",16),l.addUniform("reflectivityMatrix",16),l.addUniform("microSurfaceSamplerMatrix",16),l.addUniform("bumpMatrix",16),l.addUniform("vTangentSpaceParams",2),l.addUniform("vAlbedoColor",4),l.addUniform("baseWeight",1),l.addUniform("baseDiffuseRoughness",1),l.addUniform("vLightingIntensity",4),l.addUniform("pointSize",1),l.addUniform("vReflectivityColor",4),l.addUniform("vEmissiveColor",3),l.addUniform("vAmbientColor",3),l.addUniform("vDebugMode",2),l.addUniform("vMetallicReflectanceFactors",4),l.addUniform("vMetallicReflectanceInfos",2),l.addUniform("metallicReflectanceMatrix",16),l.addUniform("vReflectanceInfos",2),l.addUniform("reflectanceMatrix",16),l.addUniform("cameraInfo",4),l.addUniform("vTextureRepetitionHexTilingParams",4),ir(l,!0,!0,!0,!0,!0),super.buildUniformLayout()}bindForSubMesh(l,d,a){const I=this.getScene(),g=a.materialDefines;if(!g)return;const F=a.effect;if(!F)return;this._activeEffect=F,d.getMeshUniformBuffer().bindToEffect(F,"Mesh"),d.transferToEffect(l);const M=I.getEngine();this._uniformBuffer.bindToEffect(F,"Material"),this.prePassConfiguration.bindForSubMesh(this._activeEffect,I,d,l,this.isFrozen),Ht.Bind(M.currentRenderPassId,this._activeEffect,d,l,this);const P=I.activeCamera;P?this._uniformBuffer.updateFloat4("cameraInfo",P.minZ,P.maxZ,0,0):this._uniformBuffer.updateFloat4("cameraInfo",0,0,0,0);const B=this.textureRepetitionHexTilingParams;this._uniformBuffer.updateFloat4("vTextureRepetitionHexTilingParams",B[0],B[1],B[2],B[3]),this._eventInfo.subMesh=a,this._callbackPluginEventHardBindForSubMesh(this._eventInfo),g.OBJECTSPACE_NORMALMAP&&(l.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));const p=this._mustRebind(I,F,a,d.visibility),b=M._features.needToAlwaysBindUniformBuffers;ar(d,this._activeEffect,this.prePassConfiguration),this._vertexPullingMetadata&&rr(this._activeEffect,this._vertexPullingMetadata);let y=null;const R=this._uniformBuffer;if(p){if(this.bindViewProjection(F),y=this._getReflectionTexture(),!R.useUbo||!this.isFrozen||!R.isSync||a._drawWrapper._forceRebindOnNextCall){if(I.texturesEnabled&&(this._albedoTexture&&x.DiffuseTextureEnabled&&(R.updateFloat2("vAlbedoInfos",this._albedoTexture.coordinatesIndex,this._albedoTexture.level),Q(this._albedoTexture,R,"albedo")),this._baseWeightTexture&&x.BaseWeightTextureEnabled&&(R.updateFloat2("vBaseWeightInfos",this._baseWeightTexture.coordinatesIndex,this._baseWeightTexture.level),Q(this._baseWeightTexture,R,"baseWeight")),this._baseDiffuseRoughnessTexture&&x.BaseDiffuseRoughnessTextureEnabled&&(R.updateFloat2("vBaseDiffuseRoughnessInfos",this._baseDiffuseRoughnessTexture.coordinatesIndex,this._baseDiffuseRoughnessTexture.level),Q(this._baseDiffuseRoughnessTexture,R,"baseDiffuseRoughness")),this._ambientTexture&&x.AmbientTextureEnabled&&(R.updateFloat4("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level,this._ambientTextureStrength,this._ambientTextureImpactOnAnalyticalLights),Q(this._ambientTexture,R,"ambient")),this._opacityTexture&&x.OpacityTextureEnabled&&(R.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),Q(this._opacityTexture,R,"opacity")),this._emissiveTexture&&x.EmissiveTextureEnabled&&(R.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),Q(this._emissiveTexture,R,"emissive")),this._lightmapTexture&&x.LightmapTextureEnabled&&(R.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),Q(this._lightmapTexture,R,"lightmap")),x.SpecularTextureEnabled&&(this._metallicTexture?(R.updateFloat3("vReflectivityInfos",this._metallicTexture.coordinatesIndex,this._metallicTexture.level,this._ambientTextureStrength),Q(this._metallicTexture,R,"reflectivity")):this._reflectivityTexture&&(R.updateFloat3("vReflectivityInfos",this._reflectivityTexture.coordinatesIndex,this._reflectivityTexture.level,1),Q(this._reflectivityTexture,R,"reflectivity")),this._metallicReflectanceTexture&&(R.updateFloat2("vMetallicReflectanceInfos",this._metallicReflectanceTexture.coordinatesIndex,this._metallicReflectanceTexture.level),Q(this._metallicReflectanceTexture,R,"metallicReflectance")),this._reflectanceTexture&&g.REFLECTANCE&&(R.updateFloat2("vReflectanceInfos",this._reflectanceTexture.coordinatesIndex,this._reflectanceTexture.level),Q(this._reflectanceTexture,R,"reflectance")),this._microSurfaceTexture&&(R.updateFloat2("vMicroSurfaceSamplerInfos",this._microSurfaceTexture.coordinatesIndex,this._microSurfaceTexture.level),Q(this._microSurfaceTexture,R,"microSurfaceSampler"))),this._bumpTexture&&M.getCaps().standardDerivatives&&x.BumpTextureEnabled&&!this._disableBumpMap&&(R.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,this._bumpTexture.level,this._parallaxScaleBias),Q(this._bumpTexture,R,"bump"),I._mirroredCameraPosition?R.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):R.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),lr(I,g,R,this._reflectionColor,y,this.realTimeFiltering,!0,!0,!0,!0,!0)),this.pointsCloud&&R.updateFloat("pointSize",this.pointSize),g.METALLICWORKFLOW){Nt.Color4[0].r=this._metallic===void 0||this._metallic===null?1:this._metallic,Nt.Color4[0].g=this._roughness===void 0||this._roughness===null?1:this._roughness;const N=this.subSurface?._indexOfRefraction??1.5,f=1;Nt.Color4[0].b=N;const L=Math.pow((N-f)/(N+f),2);Nt.Color4[0].a=L,R.updateDirectColor4("vReflectivityColor",Nt.Color4[0]),R.updateColor4("vMetallicReflectanceFactors",this._metallicReflectanceColor,this._metallicF0Factor)}else R.updateColor4("vReflectivityColor",this._reflectivityColor,this._microSurface);R.updateColor3("vEmissiveColor",x.EmissiveTextureEnabled?this._emissiveColor:se.BlackReadOnly),!g.SS_REFRACTION&&this.subSurface?._linkRefractionWithTransparency?R.updateColor4("vAlbedoColor",this._albedoColor,1):R.updateColor4("vAlbedoColor",this._albedoColor,this.alpha),R.updateFloat("baseWeight",this._baseWeight),R.updateFloat("baseDiffuseRoughness",this._baseDiffuseRoughness||0),this._lightingInfos.x=this._directIntensity,this._lightingInfos.y=this._emissiveIntensity,this._lightingInfos.z=this._environmentIntensity*I.environmentIntensity,this._lightingInfos.w=this._specularIntensity,R.updateVector4("vLightingIntensity",this._lightingInfos),I.ambientColor.multiplyToRef(this._ambientColor,this._globalAmbientColor),R.updateColor3("vAmbientColor",this._globalAmbientColor),R.updateFloat2("vDebugMode",this.debugLimit,this.debugFactor)}I.texturesEnabled&&(this._albedoTexture&&x.DiffuseTextureEnabled&&R.setTexture("albedoSampler",this._albedoTexture),this._baseWeightTexture&&x.BaseWeightTextureEnabled&&R.setTexture("baseWeightSampler",this._baseWeightTexture),this._baseDiffuseRoughnessTexture&&x.BaseDiffuseRoughnessTextureEnabled&&R.setTexture("baseDiffuseRoughnessSampler",this._baseDiffuseRoughnessTexture),this._ambientTexture&&x.AmbientTextureEnabled&&R.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&x.OpacityTextureEnabled&&R.setTexture("opacitySampler",this._opacityTexture),nr(I,g,R,y,this.realTimeFiltering),g.ENVIRONMENTBRDF&&R.setTexture("environmentBrdfSampler",this._environmentBRDFTexture),this._emissiveTexture&&x.EmissiveTextureEnabled&&R.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&x.LightmapTextureEnabled&&R.setTexture("lightmapSampler",this._lightmapTexture),x.SpecularTextureEnabled&&(this._metallicTexture?R.setTexture("reflectivitySampler",this._metallicTexture):this._reflectivityTexture&&R.setTexture("reflectivitySampler",this._reflectivityTexture),this._metallicReflectanceTexture&&R.setTexture("metallicReflectanceSampler",this._metallicReflectanceTexture),this._reflectanceTexture&&g.REFLECTANCE&&R.setTexture("reflectanceSampler",this._reflectanceTexture),this._microSurfaceTexture&&R.setTexture("microSurfaceSampler",this._microSurfaceTexture)),this._bumpTexture&&M.getCaps().standardDerivatives&&x.BumpTextureEnabled&&!this._disableBumpMap&&R.setTexture("bumpSampler",this._bumpTexture)),this.getScene().useOrderIndependentTransparency&&this.needAlphaBlendingForMesh(d)&&this.getScene().depthPeelingRenderer.bind(F),this._eventInfo.subMesh=a,this._callbackPluginEventBindForSubMesh(this._eventInfo),ur(this._activeEffect,this,I),this.bindEyePosition(F)}else b&&(this._needToBindSceneUbo=!0);(p||!this.isFrozen||b)&&I.lightsEnabled&&!this._disableLighting&&cr(I,d,this._activeEffect,g,this._maxSimultaneousLights),(p||!this.isFrozen)&&((I.fogEnabled&&d.applyFog&&I.fogMode!==or.FOGMODE_NONE||y||this.subSurface.refractionTexture||d.receiveShadows||g.PREPASS||g.CLUSTLIGHT_BATCH)&&this.bindView(F),hr(I,d,this._activeEffect,!0),g.NUM_MORPH_INFLUENCERS&&_r(d,this._activeEffect),g.BAKED_VERTEX_ANIMATION_TEXTURE&&d.bakedVertexAnimationManager?.bind(F,g.INSTANCES),this._imageProcessingConfiguration.bind(this._activeEffect),Tr(g,this._activeEffect,I)),this._afterBind(d,this._activeEffect,a),R.update()}getAnimatables(){const l=super.getAnimatables();return this._albedoTexture&&this._albedoTexture.animations&&this._albedoTexture.animations.length>0&&l.push(this._albedoTexture),this._baseWeightTexture&&this._baseWeightTexture.animations&&this._baseWeightTexture.animations.length>0&&l.push(this._baseWeightTexture),this._baseDiffuseRoughnessTexture&&this._baseDiffuseRoughnessTexture.animations&&this._baseDiffuseRoughnessTexture.animations.length>0&&l.push(this._baseDiffuseRoughnessTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&l.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&l.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&l.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&l.push(this._emissiveTexture),this._metallicTexture&&this._metallicTexture.animations&&this._metallicTexture.animations.length>0?l.push(this._metallicTexture):this._reflectivityTexture&&this._reflectivityTexture.animations&&this._reflectivityTexture.animations.length>0&&l.push(this._reflectivityTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&l.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&l.push(this._lightmapTexture),this._metallicReflectanceTexture&&this._metallicReflectanceTexture.animations&&this._metallicReflectanceTexture.animations.length>0&&l.push(this._metallicReflectanceTexture),this._reflectanceTexture&&this._reflectanceTexture.animations&&this._reflectanceTexture.animations.length>0&&l.push(this._reflectanceTexture),this._microSurfaceTexture&&this._microSurfaceTexture.animations&&this._microSurfaceTexture.animations.length>0&&l.push(this._microSurfaceTexture),l}_getReflectionTexture(){return this._reflectionTexture?this._reflectionTexture:this.getScene().environmentTexture}getActiveTextures(){const l=super.getActiveTextures();return this._albedoTexture&&l.push(this._albedoTexture),this._baseWeightTexture&&l.push(this._baseWeightTexture),this._baseDiffuseRoughnessTexture&&l.push(this._baseDiffuseRoughnessTexture),this._ambientTexture&&l.push(this._ambientTexture),this._opacityTexture&&l.push(this._opacityTexture),this._reflectionTexture&&l.push(this._reflectionTexture),this._emissiveTexture&&l.push(this._emissiveTexture),this._reflectivityTexture&&l.push(this._reflectivityTexture),this._metallicTexture&&l.push(this._metallicTexture),this._metallicReflectanceTexture&&l.push(this._metallicReflectanceTexture),this._reflectanceTexture&&l.push(this._reflectanceTexture),this._microSurfaceTexture&&l.push(this._microSurfaceTexture),this._bumpTexture&&l.push(this._bumpTexture),this._lightmapTexture&&l.push(this._lightmapTexture),l}hasTexture(l){return!!(super.hasTexture(l)||this._albedoTexture===l||this._baseWeightTexture===l||this._baseDiffuseRoughnessTexture===l||this._ambientTexture===l||this._opacityTexture===l||this._reflectionTexture===l||this._emissiveTexture===l||this._reflectivityTexture===l||this._metallicTexture===l||this._metallicReflectanceTexture===l||this._reflectanceTexture===l||this._microSurfaceTexture===l||this._bumpTexture===l||this._lightmapTexture===l)}setPrePassRenderer(){if(!this.subSurface?.isScatteringEnabled)return!1;const l=this.getScene().enableSubSurfaceForPrePass();return l&&(l.enabled=!0),!0}dispose(l,d){this._breakShaderLoadedCheck=!0,d&&(this._environmentBRDFTexture&&this.getScene().environmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),this._albedoTexture?.dispose(),this._baseWeightTexture?.dispose(),this._baseDiffuseRoughnessTexture?.dispose(),this._ambientTexture?.dispose(),this._opacityTexture?.dispose(),this._reflectionTexture?.dispose(),this._emissiveTexture?.dispose(),this._metallicTexture?.dispose(),this._reflectivityTexture?.dispose(),this._bumpTexture?.dispose(),this._lightmapTexture?.dispose(),this._metallicReflectanceTexture?.dispose(),this._reflectanceTexture?.dispose(),this._microSurfaceTexture?.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),super.dispose(l,d)}},v=new WeakMap,(()=>{const H=typeof Symbol=="function"&&Symbol.metadata?Object.create(k[Symbol.metadata]??null):void 0;U=[T("_markAllSubMeshesAsMiscDirty")],u(i,null,U,{kind:"accessor",name:"debugMode",static:!1,private:!1,access:{has:l=>"debugMode"in l,get:l=>l.debugMode,set:(l,d)=>{l.debugMode=d}},metadata:H},G,W),H&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:H})})(),i.PBRMATERIAL_OPAQUE=vt.MATERIAL_OPAQUE,i.PBRMATERIAL_ALPHATEST=vt.MATERIAL_ALPHATEST,i.PBRMATERIAL_ALPHABLEND=vt.MATERIAL_ALPHABLEND,i.PBRMATERIAL_ALPHATESTANDBLEND=vt.MATERIAL_ALPHATESTANDBLEND,i.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=0,i.LIGHTFALLOFF_PHYSICAL=0,i.LIGHTFALLOFF_GLTF=1,i.LIGHTFALLOFF_STANDARD=2,i.ForceGLSL=!1,i})();Object.getOwnPropertyDescriptor(he.prototype,"decalMap")||Object.defineProperty(he.prototype,"decalMap",Ar("PBRBaseMaterial","decalMap"));let kr=(()=>{var i,v,k,U,G,W,H,l,d,a,I,g,F,M,P,B,p,b,y,R,N,f,L,V,q,te,Y,o,D,J,ae,re,le,ne,ue,ce,K,c,C,E,w,_e,me,Re,Ae,de,Se,pe,ge,Ie,be,Ce,Me,Z,r,O,ie,Ee,ye,De,Le,Oe,Fe,Ne,ve,Pe,ke;let Ve=he,ze=[],Ye,Xe=[],Ke=[],je,Qe=[],Ze=[],Je,$e=[],qe=[],et,tt=[],st=[],it,at=[],rt=[],lt,nt=[],ut=[],ct,ot=[],ht=[],_t,Tt=[],ft=[],mt,Et=[],xt=[],Rt,At=[],dt=[],St,pt=[],gt=[],It,bt=[],Ct=[],Mt,yt=[],Lt=[],z,t=[],A=[],$,He=[],Te=[],Dt,Pt=[],kt=[],ee,Ot=[],Ge=[],Ut,Ft=[],Wt=[],wt,Vt=[],Yt=[],Xt,Kt=[],jt=[],Qt,Zt=[],Jt=[],$t,qt=[],es=[],ts,ss=[],is=[],as,rs=[],ls=[],ns,us=[],cs=[],os,hs=[],_s=[],Ts,fs=[],ms=[],Es,xs=[],Rs=[],As,ds=[],Ss=[],ps,gs=[],Is=[],bs,Cs=[],Ms=[],ys,Ls=[],Os=[],Fs,Ns=[],vs=[],Ds,Ps=[],ks=[],Us,Bs=[],zs=[],Hs,Gs=[],Ws=[],ws,Vs=[],Ys=[],Xs,Ks=[],js=[],Qs,Zs=[],Js=[],$s,qs=[],ei=[],ti,si=[],ii=[],ai,ri=[],li=[],ni,ui=[],ci=[],oi,hi=[],_i=[],Ti,fi=[],mi=[],Ei,xi=[],Ri=[],Ai,di,Si,pi=[],gi=[],Ii,bi=[],Ci=[],Mi,yi=[],Li=[],Oi,Fi=[],Ni=[],vi,Di=[],Pi=[],ki,Ui=[],Bi=[],zi,Hi=[],Gi=[],Wi,wi=[],Vi=[],Yi,Xi=[],Ki=[],ji,Qi=[],Zi=[],Ji,$i=[],qi=[],ea,ta=[],sa=[],ia,aa=[],ra=[],la,na=[],ua=[],ca,oa=[],ha=[],_a,Ta=[],fa=[],ma,Ea=[],xa=[],Ra,Aa=[],da=[],Sa,pa=[],ga=[],Ia,ba=[],Ca=[];return i=class extends Ve{get directIntensity(){return h(this,v,"f")}set directIntensity(e){_(this,v,e,"f")}get emissiveIntensity(){return h(this,k,"f")}set emissiveIntensity(e){_(this,k,e,"f")}get environmentIntensity(){return h(this,U,"f")}set environmentIntensity(e){_(this,U,e,"f")}get specularIntensity(){return h(this,G,"f")}set specularIntensity(e){_(this,G,e,"f")}get disableBumpMap(){return h(this,W,"f")}set disableBumpMap(e){_(this,W,e,"f")}get albedoTexture(){return h(this,H,"f")}set albedoTexture(e){_(this,H,e,"f")}get baseWeightTexture(){return h(this,l,"f")}set baseWeightTexture(e){_(this,l,e,"f")}get baseDiffuseRoughnessTexture(){return h(this,d,"f")}set baseDiffuseRoughnessTexture(e){_(this,d,e,"f")}get ambientTexture(){return h(this,a,"f")}set ambientTexture(e){_(this,a,e,"f")}get ambientTextureStrength(){return h(this,I,"f")}set ambientTextureStrength(e){_(this,I,e,"f")}get ambientTextureImpactOnAnalyticalLights(){return h(this,g,"f")}set ambientTextureImpactOnAnalyticalLights(e){_(this,g,e,"f")}get opacityTexture(){return h(this,F,"f")}set opacityTexture(e){_(this,F,e,"f")}get reflectionTexture(){return h(this,M,"f")}set reflectionTexture(e){_(this,M,e,"f")}get emissiveTexture(){return h(this,P,"f")}set emissiveTexture(e){_(this,P,e,"f")}get reflectivityTexture(){return h(this,B,"f")}set reflectivityTexture(e){_(this,B,e,"f")}get metallicTexture(){return h(this,p,"f")}set metallicTexture(e){_(this,p,e,"f")}get metallic(){return h(this,b,"f")}set metallic(e){_(this,b,e,"f")}get roughness(){return h(this,y,"f")}set roughness(e){_(this,y,e,"f")}get metallicF0Factor(){return h(this,R,"f")}set metallicF0Factor(e){_(this,R,e,"f")}get metallicReflectanceColor(){return h(this,N,"f")}set metallicReflectanceColor(e){_(this,N,e,"f")}get useOnlyMetallicFromMetallicReflectanceTexture(){return h(this,f,"f")}set useOnlyMetallicFromMetallicReflectanceTexture(e){_(this,f,e,"f")}get metallicReflectanceTexture(){return h(this,L,"f")}set metallicReflectanceTexture(e){_(this,L,e,"f")}get reflectanceTexture(){return h(this,V,"f")}set reflectanceTexture(e){_(this,V,e,"f")}get microSurfaceTexture(){return h(this,q,"f")}set microSurfaceTexture(e){_(this,q,e,"f")}get bumpTexture(){return h(this,te,"f")}set bumpTexture(e){_(this,te,e,"f")}get lightmapTexture(){return h(this,Y,"f")}set lightmapTexture(e){_(this,Y,e,"f")}get refractionTexture(){return this.subSurface.refractionTexture}set refractionTexture(e){this.subSurface.refractionTexture=e,e?this.subSurface.isRefractionEnabled=!0:this.subSurface.linkRefractionWithTransparency||(this.subSurface.isRefractionEnabled=!1)}get ambientColor(){return h(this,o,"f")}set ambientColor(e){_(this,o,e,"f")}get albedoColor(){return h(this,D,"f")}set albedoColor(e){_(this,D,e,"f")}get baseWeight(){return h(this,J,"f")}set baseWeight(e){_(this,J,e,"f")}get baseDiffuseRoughness(){return h(this,ae,"f")}set baseDiffuseRoughness(e){_(this,ae,e,"f")}get reflectivityColor(){return h(this,re,"f")}set reflectivityColor(e){_(this,re,e,"f")}get reflectionColor(){return h(this,le,"f")}set reflectionColor(e){_(this,le,e,"f")}get emissiveColor(){return h(this,ne,"f")}set emissiveColor(e){_(this,ne,e,"f")}get microSurface(){return h(this,ue,"f")}set microSurface(e){_(this,ue,e,"f")}get indexOfRefraction(){return this.subSurface.indexOfRefraction}set indexOfRefraction(e){this.subSurface.indexOfRefraction=e}get invertRefractionY(){return this.subSurface.invertRefractionY}set invertRefractionY(e){this.subSurface.invertRefractionY=e}get linkRefractionWithTransparency(){return this.subSurface.linkRefractionWithTransparency}set linkRefractionWithTransparency(e){this.subSurface.linkRefractionWithTransparency=e,e&&(this.subSurface.isRefractionEnabled=!0)}get useLightmapAsShadowmap(){return h(this,ce,"f")}set useLightmapAsShadowmap(e){_(this,ce,e,"f")}get useAlphaFromAlbedoTexture(){return h(this,K,"f")}set useAlphaFromAlbedoTexture(e){_(this,K,e,"f")}get forceAlphaTest(){return h(this,c,"f")}set forceAlphaTest(e){_(this,c,e,"f")}get alphaCutOff(){return h(this,C,"f")}set alphaCutOff(e){_(this,C,e,"f")}get useSpecularOverAlpha(){return h(this,E,"f")}set useSpecularOverAlpha(e){_(this,E,e,"f")}get useMicroSurfaceFromReflectivityMapAlpha(){return h(this,w,"f")}set useMicroSurfaceFromReflectivityMapAlpha(e){_(this,w,e,"f")}get useRoughnessFromMetallicTextureAlpha(){return h(this,_e,"f")}set useRoughnessFromMetallicTextureAlpha(e){_(this,_e,e,"f")}get useRoughnessFromMetallicTextureGreen(){return h(this,me,"f")}set useRoughnessFromMetallicTextureGreen(e){_(this,me,e,"f")}get useMetallnessFromMetallicTextureBlue(){return h(this,Re,"f")}set useMetallnessFromMetallicTextureBlue(e){_(this,Re,e,"f")}get useAmbientOcclusionFromMetallicTextureRed(){return h(this,Ae,"f")}set useAmbientOcclusionFromMetallicTextureRed(e){_(this,Ae,e,"f")}get useAmbientInGrayScale(){return h(this,de,"f")}set useAmbientInGrayScale(e){_(this,de,e,"f")}get useAutoMicroSurfaceFromReflectivityMap(){return h(this,Se,"f")}set useAutoMicroSurfaceFromReflectivityMap(e){_(this,Se,e,"f")}get usePhysicalLightFalloff(){return this._lightFalloff===he.LIGHTFALLOFF_PHYSICAL}set usePhysicalLightFalloff(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),e?this._lightFalloff=he.LIGHTFALLOFF_PHYSICAL:this._lightFalloff=he.LIGHTFALLOFF_STANDARD)}get useGLTFLightFalloff(){return this._lightFalloff===he.LIGHTFALLOFF_GLTF}set useGLTFLightFalloff(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),e?this._lightFalloff=he.LIGHTFALLOFF_GLTF:this._lightFalloff=he.LIGHTFALLOFF_STANDARD)}get useRadianceOverAlpha(){return h(this,pe,"f")}set useRadianceOverAlpha(e){_(this,pe,e,"f")}get useObjectSpaceNormalMap(){return h(this,ge,"f")}set useObjectSpaceNormalMap(e){_(this,ge,e,"f")}get useParallax(){return h(this,Ie,"f")}set useParallax(e){_(this,Ie,e,"f")}get useParallaxOcclusion(){return h(this,be,"f")}set useParallaxOcclusion(e){_(this,be,e,"f")}get parallaxScaleBias(){return h(this,Ce,"f")}set parallaxScaleBias(e){_(this,Ce,e,"f")}get disableLighting(){return h(this,Me,"f")}set disableLighting(e){_(this,Me,e,"f")}get forceIrradianceInFragment(){return h(this,Z,"f")}set forceIrradianceInFragment(e){_(this,Z,e,"f")}get maxSimultaneousLights(){return h(this,r,"f")}set maxSimultaneousLights(e){_(this,r,e,"f")}get invertNormalMapX(){return h(this,O,"f")}set invertNormalMapX(e){_(this,O,e,"f")}get invertNormalMapY(){return h(this,ie,"f")}set invertNormalMapY(e){_(this,ie,e,"f")}get twoSidedLighting(){return h(this,Ee,"f")}set twoSidedLighting(e){_(this,Ee,e,"f")}get useAlphaFresnel(){return h(this,ye,"f")}set useAlphaFresnel(e){_(this,ye,e,"f")}get useLinearAlphaFresnel(){return h(this,De,"f")}set useLinearAlphaFresnel(e){_(this,De,e,"f")}get environmentBRDFTexture(){return h(this,Le,"f")}set environmentBRDFTexture(e){_(this,Le,e,"f")}get forceNormalForward(){return h(this,Oe,"f")}set forceNormalForward(e){_(this,Oe,e,"f")}get enableSpecularAntiAliasing(){return h(this,Fe,"f")}set enableSpecularAntiAliasing(e){_(this,Fe,e,"f")}get useHorizonOcclusion(){return h(this,Ne,"f")}set useHorizonOcclusion(e){_(this,Ne,e,"f")}get useRadianceOcclusion(){return h(this,ve,"f")}set useRadianceOcclusion(e){_(this,ve,e,"f")}get unlit(){return h(this,Pe,"f")}set unlit(e){_(this,Pe,e,"f")}get applyDecalMapAfterDetailMap(){return h(this,ke,"f")}set applyDecalMapAfterDetailMap(e){_(this,ke,e,"f")}constructor(e,n,fe=!1){super(e,n,fe),v.set(this,(s(this,ze),s(this,Xe,1))),k.set(this,(s(this,Ke),s(this,Qe,1))),U.set(this,(s(this,Ze),s(this,$e,1))),G.set(this,(s(this,qe),s(this,tt,1))),W.set(this,(s(this,st),s(this,at,!1))),H.set(this,(s(this,rt),s(this,nt,void 0))),l.set(this,(s(this,ut),s(this,ot,void 0))),d.set(this,(s(this,ht),s(this,Tt,void 0))),a.set(this,(s(this,ft),s(this,Et,void 0))),I.set(this,(s(this,xt),s(this,At,1))),g.set(this,(s(this,dt),s(this,pt,i.DEFAULT_AO_ON_ANALYTICAL_LIGHTS))),F.set(this,(s(this,gt),s(this,bt,void 0))),M.set(this,(s(this,Ct),s(this,yt,void 0))),P.set(this,(s(this,Lt),s(this,t,void 0))),B.set(this,(s(this,A),s(this,He,void 0))),p.set(this,(s(this,Te),s(this,Pt,void 0))),b.set(this,(s(this,kt),s(this,Ot,void 0))),y.set(this,(s(this,Ge),s(this,Ft,void 0))),R.set(this,(s(this,Wt),s(this,Vt,1))),N.set(this,(s(this,Yt),s(this,Kt,se.White()))),f.set(this,(s(this,jt),s(this,Zt,!1))),L.set(this,(s(this,Jt),s(this,qt,void 0))),V.set(this,(s(this,es),s(this,ss,void 0))),q.set(this,(s(this,is),s(this,rs,void 0))),te.set(this,(s(this,ls),s(this,us,void 0))),Y.set(this,(s(this,cs),s(this,hs,void 0))),o.set(this,(s(this,_s),s(this,fs,new se(0,0,0)))),D.set(this,(s(this,ms),s(this,xs,new se(1,1,1)))),J.set(this,(s(this,Rs),s(this,ds,1))),ae.set(this,(s(this,Ss),s(this,gs,void 0))),re.set(this,(s(this,Is),s(this,Cs,new se(1,1,1)))),le.set(this,(s(this,Ms),s(this,Ls,new se(1,1,1)))),ne.set(this,(s(this,Os),s(this,Ns,new se(0,0,0)))),ue.set(this,(s(this,vs),s(this,Ps,1))),ce.set(this,(s(this,ks),s(this,Bs,!1))),K.set(this,(s(this,zs),s(this,Gs,!1))),c.set(this,(s(this,Ws),s(this,Vs,!1))),C.set(this,(s(this,Ys),s(this,Ks,.4))),E.set(this,(s(this,js),s(this,Zs,!0))),w.set(this,(s(this,Js),s(this,qs,!1))),_e.set(this,(s(this,ei),s(this,si,!0))),me.set(this,(s(this,ii),s(this,ri,!1))),Re.set(this,(s(this,li),s(this,ui,!1))),Ae.set(this,(s(this,ci),s(this,hi,!1))),de.set(this,(s(this,_i),s(this,fi,!1))),Se.set(this,(s(this,mi),s(this,xi,!1))),pe.set(this,(s(this,Ri),s(this,pi,!0))),ge.set(this,(s(this,gi),s(this,bi,!1))),Ie.set(this,(s(this,Ci),s(this,yi,!1))),be.set(this,(s(this,Li),s(this,Fi,!1))),Ce.set(this,(s(this,Ni),s(this,Di,.05))),Me.set(this,(s(this,Pi),s(this,Ui,!1))),Z.set(this,(s(this,Bi),s(this,Hi,!1))),r.set(this,(s(this,Gi),s(this,wi,4))),O.set(this,(s(this,Vi),s(this,Xi,!1))),ie.set(this,(s(this,Ki),s(this,Qi,!1))),Ee.set(this,(s(this,Zi),s(this,$i,!1))),ye.set(this,(s(this,qi),s(this,ta,!1))),De.set(this,(s(this,sa),s(this,aa,!1))),Le.set(this,(s(this,ra),s(this,na,null))),Oe.set(this,(s(this,ua),s(this,oa,!1))),Fe.set(this,(s(this,ha),s(this,Ta,!1))),Ne.set(this,(s(this,fa),s(this,Ea,!0))),ve.set(this,(s(this,xa),s(this,Aa,!0))),Pe.set(this,(s(this,da),s(this,pa,!1))),ke.set(this,(s(this,ga),s(this,ba,!1))),s(this,Ca),this._environmentBRDFTexture=Fa(this.getScene())}getClassName(){return"PBRMaterial"}clone(e,n=!0,fe=""){const oe=ya.Clone(()=>new i(e,this.getScene()),this,{cloneTexturesOnlyOnce:n});return oe.id=e,oe.name=e,this.stencil.copyTo(oe.stencil),this._clonePlugins(oe,fe),oe}serialize(){const e=super.serialize();return e.customType="BABYLON.PBRMaterial",e}static Parse(e,n,fe){const oe=ya.Parse(()=>new i(e.name,n),e,n,fe);return e.stencil&&oe.stencil.parse(e.stencil,n,fe),vt._ParsePlugins(e,oe,n,fe),e.clearCoat&&oe.clearCoat.parse(e.clearCoat,n,fe),e.anisotropy&&oe.anisotropy.parse(e.anisotropy,n,fe),e.brdf&&oe.brdf.parse(e.brdf,n,fe),e.sheen&&oe.sheen.parse(e.sheen,n,fe),e.subSurface&&oe.subSurface.parse(e.subSurface,n,fe),e.iridescence&&oe.iridescence.parse(e.iridescence,n,fe),oe}},v=new WeakMap,k=new WeakMap,U=new WeakMap,G=new WeakMap,W=new WeakMap,H=new WeakMap,l=new WeakMap,d=new WeakMap,a=new WeakMap,I=new WeakMap,g=new WeakMap,F=new WeakMap,M=new WeakMap,P=new WeakMap,B=new WeakMap,p=new WeakMap,b=new WeakMap,y=new WeakMap,R=new WeakMap,N=new WeakMap,f=new WeakMap,L=new WeakMap,V=new WeakMap,q=new WeakMap,te=new WeakMap,Y=new WeakMap,o=new WeakMap,D=new WeakMap,J=new WeakMap,ae=new WeakMap,re=new WeakMap,le=new WeakMap,ne=new WeakMap,ue=new WeakMap,ce=new WeakMap,K=new WeakMap,c=new WeakMap,C=new WeakMap,E=new WeakMap,w=new WeakMap,_e=new WeakMap,me=new WeakMap,Re=new WeakMap,Ae=new WeakMap,de=new WeakMap,Se=new WeakMap,pe=new WeakMap,ge=new WeakMap,Ie=new WeakMap,be=new WeakMap,Ce=new WeakMap,Me=new WeakMap,Z=new WeakMap,r=new WeakMap,O=new WeakMap,ie=new WeakMap,Ee=new WeakMap,ye=new WeakMap,De=new WeakMap,Le=new WeakMap,Oe=new WeakMap,Fe=new WeakMap,Ne=new WeakMap,ve=new WeakMap,Pe=new WeakMap,ke=new WeakMap,(()=>{const S=typeof Symbol=="function"&&Symbol.metadata?Object.create(Ve[Symbol.metadata]??null):void 0;Ye=[m(),T("_markAllSubMeshesAsTexturesDirty")],je=[m(),T("_markAllSubMeshesAsTexturesDirty")],Je=[m(),T("_markAllSubMeshesAsTexturesDirty")],et=[m(),T("_markAllSubMeshesAsTexturesDirty")],it=[m(),T("_markAllSubMeshesAsTexturesDirty")],lt=[X(),T("_markAllSubMeshesAsTexturesDirty")],ct=[X(),T("_markAllSubMeshesAsTexturesDirty")],_t=[X(),T("_markAllSubMeshesAsTexturesDirty")],mt=[X(),T("_markAllSubMeshesAsTexturesDirty")],Rt=[m(),T("_markAllSubMeshesAsTexturesDirty")],St=[m(),T("_markAllSubMeshesAsTexturesDirty")],It=[X(),T("_markAllSubMeshesAsTexturesAndMiscDirty")],Mt=[X(),T("_markAllSubMeshesAsTexturesDirty")],z=[X(),T("_markAllSubMeshesAsTexturesDirty")],$=[X(),T("_markAllSubMeshesAsTexturesDirty")],Dt=[X(),T("_markAllSubMeshesAsTexturesDirty")],ee=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ut=[m(),T("_markAllSubMeshesAsTexturesDirty")],wt=[m(),T("_markAllSubMeshesAsTexturesDirty")],Xt=[xe(),T("_markAllSubMeshesAsTexturesDirty")],Qt=[m(),T("_markAllSubMeshesAsTexturesDirty")],$t=[X(),T("_markAllSubMeshesAsTexturesDirty")],ts=[X(),T("_markAllSubMeshesAsTexturesDirty")],as=[X(),T("_markAllSubMeshesAsTexturesDirty")],ns=[X(),T("_markAllSubMeshesAsTexturesDirty")],os=[X(),T("_markAllSubMeshesAsTexturesDirty",null)],Ts=[xe("ambient"),T("_markAllSubMeshesAsTexturesDirty")],Es=[xe("albedo"),T("_markAllSubMeshesAsTexturesDirty")],As=[m("baseWeight"),T("_markAllSubMeshesAsTexturesDirty")],ps=[m("baseDiffuseRoughness"),T("_markAllSubMeshesAsTexturesDirty")],bs=[xe("reflectivity"),T("_markAllSubMeshesAsTexturesDirty")],ys=[xe("reflection"),T("_markAllSubMeshesAsTexturesDirty")],Fs=[xe("emissive"),T("_markAllSubMeshesAsTexturesDirty")],Ds=[m(),T("_markAllSubMeshesAsTexturesDirty")],Us=[m(),T("_markAllSubMeshesAsTexturesDirty")],Hs=[m(),T("_markAllSubMeshesAsTexturesAndMiscDirty")],ws=[m(),T("_markAllSubMeshesAsTexturesAndMiscDirty")],Xs=[m(),T("_markAllSubMeshesAsTexturesAndMiscDirty")],Qs=[m(),T("_markAllSubMeshesAsTexturesDirty")],$s=[m(),T("_markAllSubMeshesAsTexturesDirty")],ti=[m(),T("_markAllSubMeshesAsTexturesDirty")],ai=[m(),T("_markAllSubMeshesAsTexturesDirty")],ni=[m(),T("_markAllSubMeshesAsTexturesDirty")],oi=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ti=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ei=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ai=[m()],di=[m()],Si=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ii=[m(),T("_markAllSubMeshesAsTexturesDirty")],Mi=[m(),T("_markAllSubMeshesAsTexturesDirty")],Oi=[m(),T("_markAllSubMeshesAsTexturesDirty")],vi=[m(),T("_markAllSubMeshesAsTexturesDirty")],ki=[m(),T("_markAllSubMeshesAsLightsDirty")],zi=[m(),T("_markAllSubMeshesAsTexturesDirty")],Wi=[m(),T("_markAllSubMeshesAsLightsDirty")],Yi=[m(),T("_markAllSubMeshesAsTexturesDirty")],ji=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ji=[m(),T("_markAllSubMeshesAsTexturesDirty")],ea=[m(),T("_markAllSubMeshesAsTexturesDirty")],ia=[m(),T("_markAllSubMeshesAsTexturesDirty")],la=[T("_markAllSubMeshesAsTexturesDirty")],ca=[m(),T("_markAllSubMeshesAsTexturesDirty")],_a=[m(),T("_markAllSubMeshesAsTexturesDirty")],ma=[m(),T("_markAllSubMeshesAsTexturesDirty")],Ra=[m(),T("_markAllSubMeshesAsTexturesDirty")],Sa=[m(),T("_markAllSubMeshesAsMiscDirty")],Ia=[m(),T("_markAllSubMeshesAsMiscDirty")],u(i,null,Ye,{kind:"accessor",name:"directIntensity",static:!1,private:!1,access:{has:e=>"directIntensity"in e,get:e=>e.directIntensity,set:(e,n)=>{e.directIntensity=n}},metadata:S},Xe,Ke),u(i,null,je,{kind:"accessor",name:"emissiveIntensity",static:!1,private:!1,access:{has:e=>"emissiveIntensity"in e,get:e=>e.emissiveIntensity,set:(e,n)=>{e.emissiveIntensity=n}},metadata:S},Qe,Ze),u(i,null,Je,{kind:"accessor",name:"environmentIntensity",static:!1,private:!1,access:{has:e=>"environmentIntensity"in e,get:e=>e.environmentIntensity,set:(e,n)=>{e.environmentIntensity=n}},metadata:S},$e,qe),u(i,null,et,{kind:"accessor",name:"specularIntensity",static:!1,private:!1,access:{has:e=>"specularIntensity"in e,get:e=>e.specularIntensity,set:(e,n)=>{e.specularIntensity=n}},metadata:S},tt,st),u(i,null,it,{kind:"accessor",name:"disableBumpMap",static:!1,private:!1,access:{has:e=>"disableBumpMap"in e,get:e=>e.disableBumpMap,set:(e,n)=>{e.disableBumpMap=n}},metadata:S},at,rt),u(i,null,lt,{kind:"accessor",name:"albedoTexture",static:!1,private:!1,access:{has:e=>"albedoTexture"in e,get:e=>e.albedoTexture,set:(e,n)=>{e.albedoTexture=n}},metadata:S},nt,ut),u(i,null,ct,{kind:"accessor",name:"baseWeightTexture",static:!1,private:!1,access:{has:e=>"baseWeightTexture"in e,get:e=>e.baseWeightTexture,set:(e,n)=>{e.baseWeightTexture=n}},metadata:S},ot,ht),u(i,null,_t,{kind:"accessor",name:"baseDiffuseRoughnessTexture",static:!1,private:!1,access:{has:e=>"baseDiffuseRoughnessTexture"in e,get:e=>e.baseDiffuseRoughnessTexture,set:(e,n)=>{e.baseDiffuseRoughnessTexture=n}},metadata:S},Tt,ft),u(i,null,mt,{kind:"accessor",name:"ambientTexture",static:!1,private:!1,access:{has:e=>"ambientTexture"in e,get:e=>e.ambientTexture,set:(e,n)=>{e.ambientTexture=n}},metadata:S},Et,xt),u(i,null,Rt,{kind:"accessor",name:"ambientTextureStrength",static:!1,private:!1,access:{has:e=>"ambientTextureStrength"in e,get:e=>e.ambientTextureStrength,set:(e,n)=>{e.ambientTextureStrength=n}},metadata:S},At,dt),u(i,null,St,{kind:"accessor",name:"ambientTextureImpactOnAnalyticalLights",static:!1,private:!1,access:{has:e=>"ambientTextureImpactOnAnalyticalLights"in e,get:e=>e.ambientTextureImpactOnAnalyticalLights,set:(e,n)=>{e.ambientTextureImpactOnAnalyticalLights=n}},metadata:S},pt,gt),u(i,null,It,{kind:"accessor",name:"opacityTexture",static:!1,private:!1,access:{has:e=>"opacityTexture"in e,get:e=>e.opacityTexture,set:(e,n)=>{e.opacityTexture=n}},metadata:S},bt,Ct),u(i,null,Mt,{kind:"accessor",name:"reflectionTexture",static:!1,private:!1,access:{has:e=>"reflectionTexture"in e,get:e=>e.reflectionTexture,set:(e,n)=>{e.reflectionTexture=n}},metadata:S},yt,Lt),u(i,null,z,{kind:"accessor",name:"emissiveTexture",static:!1,private:!1,access:{has:e=>"emissiveTexture"in e,get:e=>e.emissiveTexture,set:(e,n)=>{e.emissiveTexture=n}},metadata:S},t,A),u(i,null,$,{kind:"accessor",name:"reflectivityTexture",static:!1,private:!1,access:{has:e=>"reflectivityTexture"in e,get:e=>e.reflectivityTexture,set:(e,n)=>{e.reflectivityTexture=n}},metadata:S},He,Te),u(i,null,Dt,{kind:"accessor",name:"metallicTexture",static:!1,private:!1,access:{has:e=>"metallicTexture"in e,get:e=>e.metallicTexture,set:(e,n)=>{e.metallicTexture=n}},metadata:S},Pt,kt),u(i,null,ee,{kind:"accessor",name:"metallic",static:!1,private:!1,access:{has:e=>"metallic"in e,get:e=>e.metallic,set:(e,n)=>{e.metallic=n}},metadata:S},Ot,Ge),u(i,null,Ut,{kind:"accessor",name:"roughness",static:!1,private:!1,access:{has:e=>"roughness"in e,get:e=>e.roughness,set:(e,n)=>{e.roughness=n}},metadata:S},Ft,Wt),u(i,null,wt,{kind:"accessor",name:"metallicF0Factor",static:!1,private:!1,access:{has:e=>"metallicF0Factor"in e,get:e=>e.metallicF0Factor,set:(e,n)=>{e.metallicF0Factor=n}},metadata:S},Vt,Yt),u(i,null,Xt,{kind:"accessor",name:"metallicReflectanceColor",static:!1,private:!1,access:{has:e=>"metallicReflectanceColor"in e,get:e=>e.metallicReflectanceColor,set:(e,n)=>{e.metallicReflectanceColor=n}},metadata:S},Kt,jt),u(i,null,Qt,{kind:"accessor",name:"useOnlyMetallicFromMetallicReflectanceTexture",static:!1,private:!1,access:{has:e=>"useOnlyMetallicFromMetallicReflectanceTexture"in e,get:e=>e.useOnlyMetallicFromMetallicReflectanceTexture,set:(e,n)=>{e.useOnlyMetallicFromMetallicReflectanceTexture=n}},metadata:S},Zt,Jt),u(i,null,$t,{kind:"accessor",name:"metallicReflectanceTexture",static:!1,private:!1,access:{has:e=>"metallicReflectanceTexture"in e,get:e=>e.metallicReflectanceTexture,set:(e,n)=>{e.metallicReflectanceTexture=n}},metadata:S},qt,es),u(i,null,ts,{kind:"accessor",name:"reflectanceTexture",static:!1,private:!1,access:{has:e=>"reflectanceTexture"in e,get:e=>e.reflectanceTexture,set:(e,n)=>{e.reflectanceTexture=n}},metadata:S},ss,is),u(i,null,as,{kind:"accessor",name:"microSurfaceTexture",static:!1,private:!1,access:{has:e=>"microSurfaceTexture"in e,get:e=>e.microSurfaceTexture,set:(e,n)=>{e.microSurfaceTexture=n}},metadata:S},rs,ls),u(i,null,ns,{kind:"accessor",name:"bumpTexture",static:!1,private:!1,access:{has:e=>"bumpTexture"in e,get:e=>e.bumpTexture,set:(e,n)=>{e.bumpTexture=n}},metadata:S},us,cs),u(i,null,os,{kind:"accessor",name:"lightmapTexture",static:!1,private:!1,access:{has:e=>"lightmapTexture"in e,get:e=>e.lightmapTexture,set:(e,n)=>{e.lightmapTexture=n}},metadata:S},hs,_s),u(i,null,Ts,{kind:"accessor",name:"ambientColor",static:!1,private:!1,access:{has:e=>"ambientColor"in e,get:e=>e.ambientColor,set:(e,n)=>{e.ambientColor=n}},metadata:S},fs,ms),u(i,null,Es,{kind:"accessor",name:"albedoColor",static:!1,private:!1,access:{has:e=>"albedoColor"in e,get:e=>e.albedoColor,set:(e,n)=>{e.albedoColor=n}},metadata:S},xs,Rs),u(i,null,As,{kind:"accessor",name:"baseWeight",static:!1,private:!1,access:{has:e=>"baseWeight"in e,get:e=>e.baseWeight,set:(e,n)=>{e.baseWeight=n}},metadata:S},ds,Ss),u(i,null,ps,{kind:"accessor",name:"baseDiffuseRoughness",static:!1,private:!1,access:{has:e=>"baseDiffuseRoughness"in e,get:e=>e.baseDiffuseRoughness,set:(e,n)=>{e.baseDiffuseRoughness=n}},metadata:S},gs,Is),u(i,null,bs,{kind:"accessor",name:"reflectivityColor",static:!1,private:!1,access:{has:e=>"reflectivityColor"in e,get:e=>e.reflectivityColor,set:(e,n)=>{e.reflectivityColor=n}},metadata:S},Cs,Ms),u(i,null,ys,{kind:"accessor",name:"reflectionColor",static:!1,private:!1,access:{has:e=>"reflectionColor"in e,get:e=>e.reflectionColor,set:(e,n)=>{e.reflectionColor=n}},metadata:S},Ls,Os),u(i,null,Fs,{kind:"accessor",name:"emissiveColor",static:!1,private:!1,access:{has:e=>"emissiveColor"in e,get:e=>e.emissiveColor,set:(e,n)=>{e.emissiveColor=n}},metadata:S},Ns,vs),u(i,null,Ds,{kind:"accessor",name:"microSurface",static:!1,private:!1,access:{has:e=>"microSurface"in e,get:e=>e.microSurface,set:(e,n)=>{e.microSurface=n}},metadata:S},Ps,ks),u(i,null,Us,{kind:"accessor",name:"useLightmapAsShadowmap",static:!1,private:!1,access:{has:e=>"useLightmapAsShadowmap"in e,get:e=>e.useLightmapAsShadowmap,set:(e,n)=>{e.useLightmapAsShadowmap=n}},metadata:S},Bs,zs),u(i,null,Hs,{kind:"accessor",name:"useAlphaFromAlbedoTexture",static:!1,private:!1,access:{has:e=>"useAlphaFromAlbedoTexture"in e,get:e=>e.useAlphaFromAlbedoTexture,set:(e,n)=>{e.useAlphaFromAlbedoTexture=n}},metadata:S},Gs,Ws),u(i,null,ws,{kind:"accessor",name:"forceAlphaTest",static:!1,private:!1,access:{has:e=>"forceAlphaTest"in e,get:e=>e.forceAlphaTest,set:(e,n)=>{e.forceAlphaTest=n}},metadata:S},Vs,Ys),u(i,null,Xs,{kind:"accessor",name:"alphaCutOff",static:!1,private:!1,access:{has:e=>"alphaCutOff"in e,get:e=>e.alphaCutOff,set:(e,n)=>{e.alphaCutOff=n}},metadata:S},Ks,js),u(i,null,Qs,{kind:"accessor",name:"useSpecularOverAlpha",static:!1,private:!1,access:{has:e=>"useSpecularOverAlpha"in e,get:e=>e.useSpecularOverAlpha,set:(e,n)=>{e.useSpecularOverAlpha=n}},metadata:S},Zs,Js),u(i,null,$s,{kind:"accessor",name:"useMicroSurfaceFromReflectivityMapAlpha",static:!1,private:!1,access:{has:e=>"useMicroSurfaceFromReflectivityMapAlpha"in e,get:e=>e.useMicroSurfaceFromReflectivityMapAlpha,set:(e,n)=>{e.useMicroSurfaceFromReflectivityMapAlpha=n}},metadata:S},qs,ei),u(i,null,ti,{kind:"accessor",name:"useRoughnessFromMetallicTextureAlpha",static:!1,private:!1,access:{has:e=>"useRoughnessFromMetallicTextureAlpha"in e,get:e=>e.useRoughnessFromMetallicTextureAlpha,set:(e,n)=>{e.useRoughnessFromMetallicTextureAlpha=n}},metadata:S},si,ii),u(i,null,ai,{kind:"accessor",name:"useRoughnessFromMetallicTextureGreen",static:!1,private:!1,access:{has:e=>"useRoughnessFromMetallicTextureGreen"in e,get:e=>e.useRoughnessFromMetallicTextureGreen,set:(e,n)=>{e.useRoughnessFromMetallicTextureGreen=n}},metadata:S},ri,li),u(i,null,ni,{kind:"accessor",name:"useMetallnessFromMetallicTextureBlue",static:!1,private:!1,access:{has:e=>"useMetallnessFromMetallicTextureBlue"in e,get:e=>e.useMetallnessFromMetallicTextureBlue,set:(e,n)=>{e.useMetallnessFromMetallicTextureBlue=n}},metadata:S},ui,ci),u(i,null,oi,{kind:"accessor",name:"useAmbientOcclusionFromMetallicTextureRed",static:!1,private:!1,access:{has:e=>"useAmbientOcclusionFromMetallicTextureRed"in e,get:e=>e.useAmbientOcclusionFromMetallicTextureRed,set:(e,n)=>{e.useAmbientOcclusionFromMetallicTextureRed=n}},metadata:S},hi,_i),u(i,null,Ti,{kind:"accessor",name:"useAmbientInGrayScale",static:!1,private:!1,access:{has:e=>"useAmbientInGrayScale"in e,get:e=>e.useAmbientInGrayScale,set:(e,n)=>{e.useAmbientInGrayScale=n}},metadata:S},fi,mi),u(i,null,Ei,{kind:"accessor",name:"useAutoMicroSurfaceFromReflectivityMap",static:!1,private:!1,access:{has:e=>"useAutoMicroSurfaceFromReflectivityMap"in e,get:e=>e.useAutoMicroSurfaceFromReflectivityMap,set:(e,n)=>{e.useAutoMicroSurfaceFromReflectivityMap=n}},metadata:S},xi,Ri),u(i,null,Ai,{kind:"getter",name:"usePhysicalLightFalloff",static:!1,private:!1,access:{has:e=>"usePhysicalLightFalloff"in e,get:e=>e.usePhysicalLightFalloff},metadata:S},null,ze),u(i,null,di,{kind:"getter",name:"useGLTFLightFalloff",static:!1,private:!1,access:{has:e=>"useGLTFLightFalloff"in e,get:e=>e.useGLTFLightFalloff},metadata:S},null,ze),u(i,null,Si,{kind:"accessor",name:"useRadianceOverAlpha",static:!1,private:!1,access:{has:e=>"useRadianceOverAlpha"in e,get:e=>e.useRadianceOverAlpha,set:(e,n)=>{e.useRadianceOverAlpha=n}},metadata:S},pi,gi),u(i,null,Ii,{kind:"accessor",name:"useObjectSpaceNormalMap",static:!1,private:!1,access:{has:e=>"useObjectSpaceNormalMap"in e,get:e=>e.useObjectSpaceNormalMap,set:(e,n)=>{e.useObjectSpaceNormalMap=n}},metadata:S},bi,Ci),u(i,null,Mi,{kind:"accessor",name:"useParallax",static:!1,private:!1,access:{has:e=>"useParallax"in e,get:e=>e.useParallax,set:(e,n)=>{e.useParallax=n}},metadata:S},yi,Li),u(i,null,Oi,{kind:"accessor",name:"useParallaxOcclusion",static:!1,private:!1,access:{has:e=>"useParallaxOcclusion"in e,get:e=>e.useParallaxOcclusion,set:(e,n)=>{e.useParallaxOcclusion=n}},metadata:S},Fi,Ni),u(i,null,vi,{kind:"accessor",name:"parallaxScaleBias",static:!1,private:!1,access:{has:e=>"parallaxScaleBias"in e,get:e=>e.parallaxScaleBias,set:(e,n)=>{e.parallaxScaleBias=n}},metadata:S},Di,Pi),u(i,null,ki,{kind:"accessor",name:"disableLighting",static:!1,private:!1,access:{has:e=>"disableLighting"in e,get:e=>e.disableLighting,set:(e,n)=>{e.disableLighting=n}},metadata:S},Ui,Bi),u(i,null,zi,{kind:"accessor",name:"forceIrradianceInFragment",static:!1,private:!1,access:{has:e=>"forceIrradianceInFragment"in e,get:e=>e.forceIrradianceInFragment,set:(e,n)=>{e.forceIrradianceInFragment=n}},metadata:S},Hi,Gi),u(i,null,Wi,{kind:"accessor",name:"maxSimultaneousLights",static:!1,private:!1,access:{has:e=>"maxSimultaneousLights"in e,get:e=>e.maxSimultaneousLights,set:(e,n)=>{e.maxSimultaneousLights=n}},metadata:S},wi,Vi),u(i,null,Yi,{kind:"accessor",name:"invertNormalMapX",static:!1,private:!1,access:{has:e=>"invertNormalMapX"in e,get:e=>e.invertNormalMapX,set:(e,n)=>{e.invertNormalMapX=n}},metadata:S},Xi,Ki),u(i,null,ji,{kind:"accessor",name:"invertNormalMapY",static:!1,private:!1,access:{has:e=>"invertNormalMapY"in e,get:e=>e.invertNormalMapY,set:(e,n)=>{e.invertNormalMapY=n}},metadata:S},Qi,Zi),u(i,null,Ji,{kind:"accessor",name:"twoSidedLighting",static:!1,private:!1,access:{has:e=>"twoSidedLighting"in e,get:e=>e.twoSidedLighting,set:(e,n)=>{e.twoSidedLighting=n}},metadata:S},$i,qi),u(i,null,ea,{kind:"accessor",name:"useAlphaFresnel",static:!1,private:!1,access:{has:e=>"useAlphaFresnel"in e,get:e=>e.useAlphaFresnel,set:(e,n)=>{e.useAlphaFresnel=n}},metadata:S},ta,sa),u(i,null,ia,{kind:"accessor",name:"useLinearAlphaFresnel",static:!1,private:!1,access:{has:e=>"useLinearAlphaFresnel"in e,get:e=>e.useLinearAlphaFresnel,set:(e,n)=>{e.useLinearAlphaFresnel=n}},metadata:S},aa,ra),u(i,null,la,{kind:"accessor",name:"environmentBRDFTexture",static:!1,private:!1,access:{has:e=>"environmentBRDFTexture"in e,get:e=>e.environmentBRDFTexture,set:(e,n)=>{e.environmentBRDFTexture=n}},metadata:S},na,ua),u(i,null,ca,{kind:"accessor",name:"forceNormalForward",static:!1,private:!1,access:{has:e=>"forceNormalForward"in e,get:e=>e.forceNormalForward,set:(e,n)=>{e.forceNormalForward=n}},metadata:S},oa,ha),u(i,null,_a,{kind:"accessor",name:"enableSpecularAntiAliasing",static:!1,private:!1,access:{has:e=>"enableSpecularAntiAliasing"in e,get:e=>e.enableSpecularAntiAliasing,set:(e,n)=>{e.enableSpecularAntiAliasing=n}},metadata:S},Ta,fa),u(i,null,ma,{kind:"accessor",name:"useHorizonOcclusion",static:!1,private:!1,access:{has:e=>"useHorizonOcclusion"in e,get:e=>e.useHorizonOcclusion,set:(e,n)=>{e.useHorizonOcclusion=n}},metadata:S},Ea,xa),u(i,null,Ra,{kind:"accessor",name:"useRadianceOcclusion",static:!1,private:!1,access:{has:e=>"useRadianceOcclusion"in e,get:e=>e.useRadianceOcclusion,set:(e,n)=>{e.useRadianceOcclusion=n}},metadata:S},Aa,da),u(i,null,Sa,{kind:"accessor",name:"unlit",static:!1,private:!1,access:{has:e=>"unlit"in e,get:e=>e.unlit,set:(e,n)=>{e.unlit=n}},metadata:S},pa,ga),u(i,null,Ia,{kind:"accessor",name:"applyDecalMapAfterDetailMap",static:!1,private:!1,access:{has:e=>"applyDecalMapAfterDetailMap"in e,get:e=>e.applyDecalMapAfterDetailMap,set:(e,n)=>{e.applyDecalMapAfterDetailMap=n}},metadata:S},ba,Ca),S&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:S})})(),i.PBRMATERIAL_OPAQUE=he.PBRMATERIAL_OPAQUE,i.PBRMATERIAL_ALPHATEST=he.PBRMATERIAL_ALPHATEST,i.PBRMATERIAL_ALPHABLEND=he.PBRMATERIAL_ALPHABLEND,i.PBRMATERIAL_ALPHATESTANDBLEND=he.PBRMATERIAL_ALPHATESTANDBLEND,i.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=he.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,i})(),Oa=!1;function Ur(){Oa||(Oa=!0,dr(),Sr("BABYLON.PBRMaterial",kr))}function jr(){Ur()}export{kr as PBRMaterial,jr as RegisterPBRMaterial,Ur as RegisterPbrMaterial};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as r,c as i,V as u}from"./index-B2zBEWsq.js";class h{constructor(e){this._specWorkflow=!1,this._material=e,this._material.enableSpecularAntiAliasing=!0}get material(){return this._material}async finalizeAsync(e){}get isUnlit(){return this._material.unlit}set isUnlit(e){this._material.unlit=e}set backFaceCulling(e){this._material.backFaceCulling=e}get backFaceCulling(){return this._material.backFaceCulling}set twoSidedLighting(e){this._material.twoSidedLighting=e}get twoSidedLighting(){return this._material.twoSidedLighting}set alphaCutOff(e){this._material.alphaCutOff=e}get alphaCutOff(){return this._material.alphaCutOff}set useAlphaFromBaseColorTexture(e){this._material.useAlphaFromAlbedoTexture=e}get useAlphaFromBaseColorTexture(){return this._material.useAlphaFromAlbedoTexture}get transparencyAsAlphaCoverage(){return this._material.useRadianceOverAlpha||this._material.useSpecularOverAlpha}set transparencyAsAlphaCoverage(e){this._material.useRadianceOverAlpha=!e,this._material.useSpecularOverAlpha=!e}set baseColor(e){this._material.albedoColor=e}get baseColor(){return this._material.albedoColor}set baseColorTexture(e){this._material.albedoTexture=e}get baseColorTexture(){return this._material.albedoTexture}set baseDiffuseRoughness(e){this._material.baseDiffuseRoughness=e,e>0&&(this._material.brdf.baseDiffuseModel=r.MATERIAL_DIFFUSE_MODEL_E_OREN_NAYAR)}get baseDiffuseRoughness(){return this._material.baseDiffuseRoughness??0}set baseDiffuseRoughnessTexture(e){this._material.baseDiffuseRoughnessTexture=e}get baseDiffuseRoughnessTexture(){return this._material.baseDiffuseRoughnessTexture}set baseMetalness(e){this._material.metallic=e}get baseMetalness(){return this._material.metallic??1}set baseMetalnessTexture(e){this._material.metallicTexture=e}get baseMetalnessTexture(){return this._material.metallicTexture}set useRoughnessFromMetallicTextureGreen(e){this._material.useRoughnessFromMetallicTextureGreen=e,this._material.useRoughnessFromMetallicTextureAlpha=!e}set useMetallicFromMetallicTextureBlue(e){this._material.useMetallnessFromMetallicTextureBlue=e}enableSpecularEdgeColor(e=!1){e&&(this._material.brdf.dielectricSpecularModel=r.MATERIAL_DIELECTRIC_SPECULAR_MODEL_OPENPBR,this._material.brdf.conductorSpecularModel=r.MATERIAL_CONDUCTOR_SPECULAR_MODEL_OPENPBR)}configureSpecularGlossiness(){this._specWorkflow=!0,this._material.metallic=null,this._material.roughness=null,this._material.useMicroSurfaceFromReflectivityMapAlpha=!0}set specularWeight(e){this._material.metallicF0Factor=e}get specularWeight(){return this._material.metallicF0Factor??1}set specularWeightTexture(e){e?(this._material.metallicReflectanceTexture=e,this._material.useOnlyMetallicFromMetallicReflectanceTexture=!0):(this._material.metallicReflectanceTexture=null,this._material.useOnlyMetallicFromMetallicReflectanceTexture=!1)}get specularWeightTexture(){return this._material.metallicReflectanceTexture}set specularColor(e){this._specWorkflow?this._material.reflectivityColor=e:this._material.metallicReflectanceColor=e}get specularColor(){return this._specWorkflow?this._material.reflectivityColor:this._material.metallicReflectanceColor}set specularColorTexture(e){this._specWorkflow?(this._material.reflectivityTexture=e,this._material.reflectivityTexture&&(this._material.reflectivityTexture.hasAlpha=!0)):this._material.reflectanceTexture=e}get specularColorTexture(){return this._specWorkflow?this._material.reflectivityTexture:this._material.reflectanceTexture}set specularRoughness(e){this._material.roughness=e}get specularRoughness(){return this._material.roughness??1}set specularRoughnessTexture(e){this.baseMetalnessTexture||(this._material.metallicTexture=e)}get specularRoughnessTexture(){return this._material.metallicTexture}set specularIor(e){this._material.indexOfRefraction=e}get specularIor(){return this._material.indexOfRefraction}get glossiness(){return this._material.microSurface??1}set glossiness(e){this._material.microSurface=e}set emissionColor(e){this._material.emissiveColor=e}get emissionColor(){return this._material.emissiveColor}set emissionLuminance(e){this._material.emissiveIntensity=e}get emissionLuminance(){return this._material.emissiveIntensity}set emissionColorTexture(e){this._material.emissiveTexture=e}get emissionColorTexture(){return this._material.emissiveTexture}set ambientOcclusionTexture(e){this._material.ambientTexture=e,e&&(this._material.useAmbientInGrayScale=!0)}get ambientOcclusionTexture(){return this._material.ambientTexture}set ambientOcclusionTextureStrength(e){this._material.ambientTextureStrength=e}get ambientOcclusionTextureStrength(){return this._material.ambientTextureStrength??1}configureCoat(){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.useRoughnessFromMainTexture=!1,this._material.clearCoat.remapF0OnInterfaceChange=!1}set coatWeight(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.intensity=e}get coatWeight(){return this._material.clearCoat.intensity}set coatWeightTexture(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.texture=e}get coatWeightTexture(){return this._material.clearCoat.texture}set coatColor(e){this._material.clearCoat.isTintEnabled=e!=i.White(),this._material.clearCoat.tintColor=e}set coatColorTexture(e){this._material.clearCoat.tintTexture=e}set coatRoughness(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.roughness=e}get coatRoughness(){return this._material.clearCoat.roughness??0}set coatRoughnessTexture(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.useRoughnessFromMainTexture=!1,this._material.clearCoat.textureRoughness=e}get coatRoughnessTexture(){return this._material.clearCoat.textureRoughness}set coatIor(e){this._material.clearCoat.indexOfRefraction=e}set coatDarkening(e){}set coatDarkeningTexture(e){}set coatRoughnessAnisotropy(e){}get coatRoughnessAnisotropy(){return 0}set geometryCoatTangentAngle(e){}set geometryCoatTangentTexture(e){}get geometryCoatTangentTexture(){return null}set transmissionWeight(e){this._material.subSurface.isRefractionEnabled=e>0,this._material.subSurface.refractionIntensity=e}get transmissionWeight(){return this._material.subSurface.isRefractionEnabled?this._material.subSurface.refractionIntensity:0}set transmissionWeightTexture(e){this._material.subSurface.isRefractionEnabled=!0,this._material.subSurface.refractionIntensityTexture=e,this._material.subSurface.useGltfStyleTextures=!0}set transmissionDepth(e){this.transmissionWeight>0?this._material.subSurface.tintColorAtDistance=e:this.subsurfaceWeight>0&&this._material.subSurface.diffusionDistance.multiplyInPlace(new i(e,e,e))}get transmissionDepth(){return this.transmissionWeight>0?this._material.subSurface.tintColorAtDistance:0}set transmissionColor(e){this.transmissionWeight>0?this._material.subSurface.tintColor=e:this.subsurfaceWeight>0&&this._material.subSurface.diffusionDistance.multiplyInPlace(e)}get transmissionColor(){return this.transmissionWeight>0?this._material.subSurface.tintColor:this.subsurfaceWeight>0?this._material.subSurface.diffusionDistance:new i(0,0,0)}set transmissionScatter(e){this._material.subSurface.diffusionDistance=e}get transmissionScatter(){return this._material.subSurface.diffusionDistance}set transmissionScatterTexture(e){}set transmissionScatterAnisotropy(e){}set transmissionDispersionAbbeNumber(e){}set transmissionDispersionScale(e){e>0?(this._material.subSurface.isDispersionEnabled=!0,this._material.subSurface.dispersion=20/e):(this._material.subSurface.isDispersionEnabled=!1,this._material.subSurface.dispersion=0)}get refractionBackgroundTexture(){return this._material.subSurface.refractionTexture}set refractionBackgroundTexture(e){this._material.subSurface.refractionTexture=e}configureTransmission(){this._material.subSurface.volumeIndexOfRefraction=1,this._material.subSurface.useAlbedoToTintRefraction=!0,this._material.subSurface.minimumThickness=0,this._material.subSurface.maximumThickness=0}configureVolume(){}set geometryThinWalled(e){}get geometryThinWalled(){return this._material.subSurface.maximumThickness===0}set volumeThicknessTexture(e){this._material.subSurface.thicknessTexture=e,this._material.subSurface.useGltfStyleTextures=!0}set volumeThickness(e){this._material.subSurface.minimumThickness=0,this._material.subSurface.maximumThickness=e,this._material.subSurface.useThicknessAsDepth=!0,e>0&&(this._material.subSurface.volumeIndexOfRefraction=this._material.indexOfRefraction)}configureSubsurface(){this._material.subSurface.useGltfStyleTextures=!0,this._material.subSurface.volumeIndexOfRefraction=1,this._material.subSurface.minimumThickness=0,this._material.subSurface.maximumThickness=0,this._material.subSurface.useAlbedoToTintTranslucency=!1}set subsurfaceWeight(e){this._material.subSurface.isTranslucencyEnabled=e>0,this._material.subSurface.translucencyIntensity=e}get subsurfaceWeight(){return this._material.subSurface.isTranslucencyEnabled?this._material.subSurface.translucencyIntensity:0}set subsurfaceWeightTexture(e){this._material.subSurface.translucencyIntensityTexture=e}set subsurfaceColor(e){const a=new u(-Math.log(this.transmissionColor.r),-Math.log(this.transmissionColor.g),-Math.log(this.transmissionColor.b));a.scaleInPlace(1/Math.max(this.transmissionDepth,.001));const t=a,l=Math.max(t.x,Math.max(t.y,t.z)),s=l>0?1/l:1;this._material.subSurface.diffusionDistance=new i(Math.exp(-t.x*s),Math.exp(-t.y*s),Math.exp(-t.z*s))}set subsurfaceColorTexture(e){}set diffuseTransmissionTint(e){this._material.subSurface.tintColor=e}get diffuseTransmissionTint(){return this._material.subSurface.tintColor}set diffuseTransmissionTintTexture(e){this._material.subSurface.translucencyColorTexture=e}get subsurfaceRadius(){return 1}set subsurfaceRadius(e){}get subsurfaceRadiusScale(){return this._material.subSurface.scatteringDiffusionProfile??i.White()}set subsurfaceRadiusScale(e){this._material.subSurface.scatteringDiffusionProfile=e}set subsurfaceScatterAnisotropy(e){}isTranslucent(){return this.transmissionWeight>0||this.subsurfaceWeight>0}configureFuzz(){this._material.sheen.isEnabled=!0,this._material.sheen.useRoughnessFromMainTexture=!1,this._material.sheen.albedoScaling=!0}set fuzzWeight(e){this._material.sheen.isEnabled=!0,this._material.sheen.intensity=e}set fuzzWeightTexture(e){this._material.sheen.texture||(this._material.sheen.texture=e)}set fuzzColor(e){this._material.sheen.isEnabled=!0,this._material.sheen.color=e}set fuzzColorTexture(e){this._material.sheen.texture=e}set fuzzRoughness(e){this._material.sheen.isEnabled=!0,this._material.sheen.roughness=e}set fuzzRoughnessTexture(e){this._material.sheen.isEnabled=!0,this._material.sheen.textureRoughness=e}set specularRoughnessAnisotropy(e){this._material.anisotropy.isEnabled=!0,this._material.anisotropy.intensity=e}get specularRoughnessAnisotropy(){return this._material.anisotropy.intensity}set geometryTangentAngle(e){this._material.anisotropy.isEnabled=!0,this._material.anisotropy.angle=e}set geometryTangentTexture(e){this._material.anisotropy.isEnabled=!0,this._material.anisotropy.texture=e}get geometryTangentTexture(){return this._material.anisotropy.texture}configureGltfStyleAnisotropy(e=!0){}set thinFilmWeight(e){this._material.iridescence.isEnabled=e>0,this._material.iridescence.intensity=e}set thinFilmIor(e){this._material.iridescence.indexOfRefraction=e}set thinFilmThicknessMinimum(e){this._material.iridescence.minimumThickness=e}set thinFilmThicknessMaximum(e){this._material.iridescence.maximumThickness=e}set thinFilmWeightTexture(e){this._material.iridescence.texture=e}set thinFilmThicknessTexture(e){this._material.iridescence.thicknessTexture=e}set unlit(e){this._material.unlit=e}set geometryOpacity(e){this._material.alpha=e}get geometryOpacity(){return this._material.alpha}set geometryNormalTexture(e){this._material.bumpTexture=e,this._material.forceIrradianceInFragment=!0}get geometryNormalTexture(){return this._material.bumpTexture}setNormalMapInversions(e,a){this._material.invertNormalMapX=e,this._material.invertNormalMapY=a}set geometryCoatNormalTexture(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.bumpTexture=e}get geometryCoatNormalTexture(){return this._material.clearCoat.bumpTexture}set geometryCoatNormalTextureScale(e){this._material.clearCoat.bumpTexture&&(this._material.clearCoat.bumpTexture.level=e)}}export{h as PBRMaterialLoadingAdapter};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{S as f}from"./index-B2zBEWsq.js";import"./sceneUboDeclaration-BzFIc4mb.js";import"./meshUboDeclaration-BnX046aQ.js";const e="pbrUboDeclaration",i=`uniform vAlbedoInfos: vec2f;uniform vBaseWeightInfos: vec2f;uniform vBaseDiffuseRoughnessInfos: vec2f;uniform vAmbientInfos: vec4f;uniform vOpacityInfos: vec2f;uniform vEmissiveInfos: vec2f;uniform vLightmapInfos: vec2f;uniform vReflectivityInfos: vec3f;uniform vMicroSurfaceSamplerInfos: vec2f;uniform vBumpInfos: vec3f;uniform albedoMatrix: mat4x4f;uniform baseWeightMatrix: mat4x4f;uniform baseDiffuseRoughnessMatrix: mat4x4f;uniform ambientMatrix: mat4x4f;uniform opacityMatrix: mat4x4f;uniform emissiveMatrix: mat4x4f;uniform lightmapMatrix: mat4x4f;uniform reflectivityMatrix: mat4x4f;uniform microSurfaceSamplerMatrix: mat4x4f;uniform bumpMatrix: mat4x4f;uniform vTangentSpaceParams: vec2f;uniform vAlbedoColor: vec4f;uniform baseWeight: f32;uniform baseDiffuseRoughness: f32;uniform vLightingIntensity: vec4f;uniform pointSize: f32;uniform vReflectivityColor: vec4f;uniform vEmissiveColor: vec3f;uniform vAmbientColor: vec3f;uniform vDebugMode: vec2f;uniform vMetallicReflectanceFactors: vec4f;uniform vMetallicReflectanceInfos: vec2f;uniform metallicReflectanceMatrix: mat4x4f;uniform vReflectanceInfos: vec2f;uniform reflectanceMatrix: mat4x4f;uniform cameraInfo: vec4f;uniform vTextureRepetitionHexTilingParams: vec4f;uniform vReflectionInfos: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionMicrosurfaceInfos: vec3f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;uniform vReflectionFilteringInfo: vec2f;uniform vReflectionDominantDirection: vec3f;uniform vReflectionColor: vec3f;uniform vSphericalL00: vec3f;uniform vSphericalL1_1: vec3f;uniform vSphericalL10: vec3f;uniform vSphericalL11: vec3f;uniform vSphericalL2_2: vec3f;uniform vSphericalL2_1: vec3f;uniform vSphericalL20: vec3f;uniform vSphericalL21: vec3f;uniform vSphericalL22: vec3f;uniform vSphericalX: vec3f;uniform vSphericalY: vec3f;uniform vSphericalZ: vec3f;uniform vSphericalXX_ZZ: vec3f;uniform vSphericalYY_ZZ: vec3f;uniform vSphericalZZ: vec3f;uniform vSphericalXY: vec3f;uniform vSphericalYZ: vec3f;uniform vSphericalZX: vec3f;
|
|
2
|
+
#define ADDITIONAL_UBO_DECLARATION
|
|
3
|
+
#include<sceneUboDeclaration>
|
|
4
|
+
#include<meshUboDeclaration>
|
|
5
|
+
`;f.IncludesShadersStoreWGSL[e]||(f.IncludesShadersStoreWGSL[e]=i);const c={name:e,shader:i};export{c as p};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{S as t}from"./index-B2zBEWsq.js";const e="postprocessVertexShader",r=`attribute position: vec2<f32>;uniform scale: vec2<f32>;varying vUV: vec2<f32>;const madd=vec2(0.5,0.5);
|
|
2
|
+
#define CUSTOM_VERTEX_DEFINITIONS
|
|
3
|
+
@vertex
|
|
4
|
+
fn main(input : VertexInputs)->FragmentInputs {
|
|
5
|
+
#define CUSTOM_VERTEX_MAIN_BEGIN
|
|
6
|
+
vertexOutputs.vUV=(vertexInputs.position*madd+madd)*uniforms.scale;vertexOutputs.position=vec4(vertexInputs.position,0.0,1.0);
|
|
7
|
+
#define CUSTOM_VERTEX_MAIN_END
|
|
8
|
+
}
|
|
9
|
+
`;t.ShadersStoreWGSL[e]||(t.ShadersStoreWGSL[e]=r);const o={name:e,shader:r};export{o as postprocessVertexShaderWGSL};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{S as o}from"./index-B2zBEWsq.js";const e="proceduralVertexShader",i=`attribute vec2 position;varying vec2 vPosition;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);
|
|
2
|
+
#define CUSTOM_VERTEX_DEFINITIONS
|
|
3
|
+
void main(void) {
|
|
4
|
+
#define CUSTOM_VERTEX_MAIN_BEGIN
|
|
5
|
+
vPosition=position;vUV=position*madd+madd;gl_Position=vec4(position,0.0,1.0);
|
|
6
|
+
#define CUSTOM_VERTEX_MAIN_END
|
|
7
|
+
}`;o.ShadersStore[e]||(o.ShadersStore[e]=i);const t={name:e,shader:i};export{t as proceduralVertexShader};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{S as t}from"./index-B2zBEWsq.js";const e="proceduralVertexShader",r=`attribute position: vec2f;varying vPosition: vec2f;varying vUV: vec2f;const madd: vec2f= vec2f(0.5,0.5);
|
|
2
|
+
#define CUSTOM_VERTEX_DEFINITIONS
|
|
3
|
+
@vertex
|
|
4
|
+
fn main(input : VertexInputs)->FragmentInputs {
|
|
5
|
+
#define CUSTOM_VERTEX_MAIN_BEGIN
|
|
6
|
+
vertexOutputs.vPosition=vertexInputs.position;vertexOutputs.vUV=vertexInputs.position*madd+madd;vertexOutputs.position= vec4f(vertexInputs.position,0.0,1.0);
|
|
7
|
+
#define CUSTOM_VERTEX_MAIN_END
|
|
8
|
+
}`;t.ShadersStoreWGSL[e]||(t.ShadersStoreWGSL[e]=r);const o={name:e,shader:r};export{o as proceduralVertexShaderWGSL};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import{S as e}from"./index-B2zBEWsq.js";const r="samplerFragmentDeclaration",i=`#ifdef _DEFINENAME_
|
|
2
|
+
#if _DEFINENAME_DIRECTUV==1
|
|
3
|
+
#define v_VARYINGNAME_UV vMainUV1
|
|
4
|
+
#elif _DEFINENAME_DIRECTUV==2
|
|
5
|
+
#define v_VARYINGNAME_UV vMainUV2
|
|
6
|
+
#elif _DEFINENAME_DIRECTUV==3
|
|
7
|
+
#define v_VARYINGNAME_UV vMainUV3
|
|
8
|
+
#elif _DEFINENAME_DIRECTUV==4
|
|
9
|
+
#define v_VARYINGNAME_UV vMainUV4
|
|
10
|
+
#elif _DEFINENAME_DIRECTUV==5
|
|
11
|
+
#define v_VARYINGNAME_UV vMainUV5
|
|
12
|
+
#elif _DEFINENAME_DIRECTUV==6
|
|
13
|
+
#define v_VARYINGNAME_UV vMainUV6
|
|
14
|
+
#else
|
|
15
|
+
varying v_VARYINGNAME_UV: vec2f;
|
|
16
|
+
#endif
|
|
17
|
+
var _SAMPLERNAME_SamplerSampler: sampler;var _SAMPLERNAME_Sampler: texture_2d<f32>;
|
|
18
|
+
#endif
|
|
19
|
+
`;e.IncludesShadersStoreWGSL[r]||(e.IncludesShadersStoreWGSL[r]=i);const n={name:r,shader:i},o="reflectionFunction",f=`fn computeFixedEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,direction: vec3f)->vec3f
|
|
20
|
+
{var lon: f32=atan2(direction.z,direction.x);var lat: f32=acos(direction.y);var sphereCoords: vec2f= vec2f(lon,lat)*RECIPROCAL_PI2*2.0;var s: f32=sphereCoords.x*0.5+0.5;var t: f32=sphereCoords.y;return vec3f(s,t,0); }
|
|
21
|
+
fn computeMirroredFixedEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,direction: vec3f)->vec3f
|
|
22
|
+
{var lon: f32=atan2(direction.z,direction.x);var lat: f32=acos(direction.y);var sphereCoords: vec2f= vec2f(lon,lat)*RECIPROCAL_PI2*2.0;var s: f32=sphereCoords.x*0.5+0.5;var t: f32=sphereCoords.y;return vec3f(1.0-s,t,0); }
|
|
23
|
+
fn computeEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f)->vec3f
|
|
24
|
+
{var cameraToVertex: vec3f=normalize(worldPos.xyz-eyePosition);var r: vec3f=normalize(reflect(cameraToVertex,worldNormal));r= (reflectionMatrix* vec4f(r,0)).xyz;var lon: f32=atan2(r.z,r.x);var lat: f32=acos(r.y);var sphereCoords: vec2f= vec2f(lon,lat)*RECIPROCAL_PI2*2.0;var s: f32=sphereCoords.x*0.5+0.5;var t: f32=sphereCoords.y;return vec3f(s,t,0);}
|
|
25
|
+
fn computeSphericalCoords(worldPos: vec4f,worldNormal: vec3f,view: mat4x4f,reflectionMatrix: mat4x4f)->vec3f
|
|
26
|
+
{var viewDir: vec3f=normalize((view*worldPos).xyz);var viewNormal: vec3f=normalize((view* vec4f(worldNormal,0.0)).xyz);var r: vec3f=reflect(viewDir,viewNormal);r= (reflectionMatrix* vec4f(r,0)).xyz;r.z=r.z-1.0;var m: f32=2.0*length(r);return vec3f(r.x/m+0.5,1.0-r.y/m-0.5,0);}
|
|
27
|
+
fn computePlanarCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f)->vec3f
|
|
28
|
+
{var viewDir: vec3f=worldPos.xyz-eyePosition;var coords: vec3f=normalize(reflect(viewDir,worldNormal));return (reflectionMatrix* vec4f(coords,1)).xyz;}
|
|
29
|
+
fn computeCubicCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f)->vec3f
|
|
30
|
+
{var viewDir: vec3f=normalize(worldPos.xyz-eyePosition);var coords: vec3f=reflect(viewDir,worldNormal);coords= (reflectionMatrix* vec4f(coords,0)).xyz;
|
|
31
|
+
#ifdef INVERTCUBICMAP
|
|
32
|
+
coords.y*=-1.0;
|
|
33
|
+
#endif
|
|
34
|
+
return coords;}
|
|
35
|
+
fn computeCubicLocalCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f,reflectionSize: vec3f,reflectionPosition: vec3f)->vec3f
|
|
36
|
+
{var viewDir: vec3f=normalize(worldPos.xyz-eyePosition);var coords: vec3f=reflect(viewDir,worldNormal);coords=parallaxCorrectNormal(worldPos.xyz,coords,reflectionSize,reflectionPosition);coords=(reflectionMatrix* vec4f(coords,0)).xyz;
|
|
37
|
+
#ifdef INVERTCUBICMAP
|
|
38
|
+
coords.y*=-1.0;
|
|
39
|
+
#endif
|
|
40
|
+
return coords;}
|
|
41
|
+
fn computeProjectionCoords(worldPos: vec4f,view: mat4x4f,reflectionMatrix: mat4x4f)->vec3f
|
|
42
|
+
{return (reflectionMatrix*(view*worldPos)).xyz;}
|
|
43
|
+
fn computeSkyBoxCoords(positionW: vec3f,reflectionMatrix: mat4x4f)->vec3f
|
|
44
|
+
{return (reflectionMatrix* vec4f(positionW,1.)).xyz;}
|
|
45
|
+
#ifdef REFLECTION
|
|
46
|
+
fn computeReflectionCoords(worldPos: vec4f,worldNormal: vec3f)->vec3f
|
|
47
|
+
{
|
|
48
|
+
#ifdef REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED
|
|
49
|
+
var direction: vec3f=normalize(fragmentInputs.vDirectionW);return computeMirroredFixedEquirectangularCoords(worldPos,worldNormal,direction);
|
|
50
|
+
#endif
|
|
51
|
+
#ifdef REFLECTIONMAP_EQUIRECTANGULAR_FIXED
|
|
52
|
+
var direction: vec3f=normalize(fragmentInputs.vDirectionW);return computeFixedEquirectangularCoords(worldPos,worldNormal,direction);
|
|
53
|
+
#endif
|
|
54
|
+
#ifdef REFLECTIONMAP_EQUIRECTANGULAR
|
|
55
|
+
return computeEquirectangularCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix);
|
|
56
|
+
#endif
|
|
57
|
+
#ifdef REFLECTIONMAP_SPHERICAL
|
|
58
|
+
return computeSphericalCoords(worldPos,worldNormal,scene.view,uniforms.reflectionMatrix);
|
|
59
|
+
#endif
|
|
60
|
+
#ifdef REFLECTIONMAP_PLANAR
|
|
61
|
+
return computePlanarCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix);
|
|
62
|
+
#endif
|
|
63
|
+
#ifdef REFLECTIONMAP_CUBIC
|
|
64
|
+
#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC
|
|
65
|
+
return computeCubicLocalCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix,uniforms.vReflectionSize,uniforms.vReflectionPosition);
|
|
66
|
+
#else
|
|
67
|
+
return computeCubicCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix);
|
|
68
|
+
#endif
|
|
69
|
+
#endif
|
|
70
|
+
#ifdef REFLECTIONMAP_PROJECTION
|
|
71
|
+
return computeProjectionCoords(worldPos,scene.view,uniforms.reflectionMatrix);
|
|
72
|
+
#endif
|
|
73
|
+
#ifndef REFLECTIONMAP_CUBIC
|
|
74
|
+
#ifdef REFLECTIONMAP_SKYBOX
|
|
75
|
+
return computeSkyBoxCoords(fragmentInputs.vPositionUVW,uniforms.reflectionMatrix);
|
|
76
|
+
#endif
|
|
77
|
+
#endif
|
|
78
|
+
#ifdef REFLECTIONMAP_EXPLICIT
|
|
79
|
+
return vec3f(0,0,0);
|
|
80
|
+
#endif
|
|
81
|
+
}
|
|
82
|
+
#endif
|
|
83
|
+
`;e.IncludesShadersStoreWGSL[o]||(e.IncludesShadersStoreWGSL[o]=f);const t={name:o,shader:f};export{t as r,n as s};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{S as e}from"./index-B2zBEWsq.js";import{h as n}from"./helperFunctions-Cugfp1Fz.js";const t="rgbdDecodePixelShader",a=`varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
2
|
+
#include<helperFunctions>
|
|
3
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
4
|
+
@fragment
|
|
5
|
+
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;e.ShadersStoreWGSL[t]||(e.ShadersStoreWGSL[t]=a);const S=[n];for(const r of S)e.IncludesShadersStoreWGSL[r.name]||(e.IncludesShadersStoreWGSL[r.name]=r.shader);const m={name:t,shader:a};export{m as rgbdDecodePixelShaderWGSL};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{S as e,p as t}from"./index-B2zBEWsq.js";const o="rgbdEncodePixelShader",n=`varying vec2 vUV;uniform sampler2D textureSampler;
|
|
2
|
+
#include<helperFunctions>
|
|
3
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
4
|
+
void main(void)
|
|
5
|
+
{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;e.ShadersStore[o]||(e.ShadersStore[o]=n);const a=[t];for(const r of a)e.IncludesShadersStore[r.name]||(e.IncludesShadersStore[r.name]=r.shader);const s={name:o,shader:n};export{s as rgbdEncodePixelShader};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{S as e}from"./index-B2zBEWsq.js";import{h as n}from"./helperFunctions-Cugfp1Fz.js";const t="rgbdEncodePixelShader",a=`varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
2
|
+
#include<helperFunctions>
|
|
3
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
4
|
+
@fragment
|
|
5
|
+
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;e.ShadersStoreWGSL[t]||(e.ShadersStoreWGSL[t]=a);const S=[n];for(const r of S)e.IncludesShadersStoreWGSL[r.name]||(e.IncludesShadersStoreWGSL[r.name]=r.shader);const m={name:t,shader:a};export{m as rgbdEncodePixelShaderWGSL};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{S as o}from"./index-B2zBEWsq.js";const e="sceneUboDeclaration",n=`struct Scene {viewProjection : mat4x4<f32>,
|
|
2
|
+
#ifdef MULTIVIEW
|
|
3
|
+
viewProjectionR : mat4x4<f32>,
|
|
4
|
+
#endif
|
|
5
|
+
view : mat4x4<f32>,
|
|
6
|
+
projection : mat4x4<f32>,
|
|
7
|
+
vEyePosition : vec4<f32>,
|
|
8
|
+
inverseProjection : mat4x4<f32>,};
|
|
9
|
+
#define SCENE_UBO
|
|
10
|
+
var<uniform> scene : Scene;
|
|
11
|
+
`;o.IncludesShadersStoreWGSL[e]||(o.IncludesShadersStoreWGSL[e]=n);const r={name:e,shader:n};export{r as s};
|