@crystaldesign/real-time-viewer 25.9.0-beta.2 → 25.9.0-beta.21
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.
- package/build/esm/index.js +9 -7
- package/build/types/real-time-viewer/src/CustomMaterial/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/parser/findAssets/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/store/SceneStore.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/useRealTimeRenderData.d.ts.map +1 -1
- package/build/umd/1309.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1447.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1499.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1781.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1896.real-time-viewer.umd.min.js +2 -0
- package/build/umd/1896.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1924.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2011.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2439.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2817.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2871.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3116.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3243.real-time-viewer.umd.min.js +2 -0
- package/build/umd/3243.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3351.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3456.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3945.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4091.real-time-viewer.umd.min.js +1 -1
- package/build/umd/410.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4153.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4248.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4378.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4431.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4542.real-time-viewer.umd.min.js +2 -0
- package/build/umd/4542.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4602.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4661.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4669.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4711.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4823.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5462.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5478.real-time-viewer.umd.min.js +2 -0
- package/build/umd/5478.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5483.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5555.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5846.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5860.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5922.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6095.real-time-viewer.umd.min.js +1 -1
- package/build/umd/615.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6230.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6357.real-time-viewer.umd.min.js +1 -1
- package/build/umd/653.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6656.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6829.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7042.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7046.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7046.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/710.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7142.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7144.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7144.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7229.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7276.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7276.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7352.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7501.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7607.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7729.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7751.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7754.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8078.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8105.real-time-viewer.umd.min.js +1 -1
- package/build/umd/815.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8240.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8333.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8620.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8728.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8729.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8991.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9078.real-time-viewer.umd.min.js +1 -1
- package/build/umd/913.real-time-viewer.umd.min.js +1 -1
- package/build/umd/930.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9383.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9568.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9712.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9884.real-time-viewer.umd.min.js +1 -1
- package/build/umd/real-time-viewer.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +12 -13
- package/build/umd/1020.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1020.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1153.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1153.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1459.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1459.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1510.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1510.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1605.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1605.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1887.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1887.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2265.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2265.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2371.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2371.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2517.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2517.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2528.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2528.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2619.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2619.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2668.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2668.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2760.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2760.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2782.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2782.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2795.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2795.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3040.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3040.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3219.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3219.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3242.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3242.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3296.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3296.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3330.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3330.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3420.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3420.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3436.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3436.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3439.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3439.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3652.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3652.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/377.real-time-viewer.umd.min.js +0 -2
- package/build/umd/377.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3839.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3839.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3917.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3917.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4049.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4049.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4051.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4051.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4141.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4141.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4358.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4358.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4478.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4478.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4486.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4486.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4555.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4555.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4560.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4560.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4667.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4667.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4806.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4806.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4953.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4953.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5197.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5197.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/539.real-time-viewer.umd.min.js +0 -2
- package/build/umd/539.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5477.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5477.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5645.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5645.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5650.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5650.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5746.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5746.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5779.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5779.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5880.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5880.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5925.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5925.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6030.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6030.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6126.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6126.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6169.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6169.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6182.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6182.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6288.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6288.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6728.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6728.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6746.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6746.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6748.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6748.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6761.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6761.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6954.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6954.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7038.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7038.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7069.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7069.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7154.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7154.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7540.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7540.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7615.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7615.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7635.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7635.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7647.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7647.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7664.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7664.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7736.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7736.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/781.real-time-viewer.umd.min.js +0 -2
- package/build/umd/781.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8180.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8180.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8254.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8254.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8588.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8588.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8627.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8627.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8645.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8645.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8954.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8954.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9449.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9449.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9487.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9487.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/957.real-time-viewer.umd.min.js +0 -2
- package/build/umd/957.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9646.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9646.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9883.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9883.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9928.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9928.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9990.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9990.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4049.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4049],{94049:(o,r,a)=>{a.r(r),a.d(r,{FlowGraphAbsBlock:()=>FlowGraphAbsBlock,FlowGraphAcosBlock:()=>FlowGraphAcosBlock,FlowGraphAcoshBlock:()=>FlowGraphAcoshBlock,FlowGraphAddBlock:()=>FlowGraphAddBlock,FlowGraphAsinBlock:()=>FlowGraphAsinBlock,FlowGraphAsinhBlock:()=>FlowGraphAsinhBlock,FlowGraphAtan2Block:()=>FlowGraphAtan2Block,FlowGraphAtanBlock:()=>FlowGraphAtanBlock,FlowGraphAtanhBlock:()=>FlowGraphAtanhBlock,FlowGraphBitwiseAndBlock:()=>FlowGraphBitwiseAndBlock,FlowGraphBitwiseLeftShiftBlock:()=>FlowGraphBitwiseLeftShiftBlock,FlowGraphBitwiseNotBlock:()=>FlowGraphBitwiseNotBlock,FlowGraphBitwiseOrBlock:()=>FlowGraphBitwiseOrBlock,FlowGraphBitwiseRightShiftBlock:()=>FlowGraphBitwiseRightShiftBlock,FlowGraphBitwiseXorBlock:()=>FlowGraphBitwiseXorBlock,FlowGraphCeilBlock:()=>FlowGraphCeilBlock,FlowGraphClampBlock:()=>FlowGraphClampBlock,FlowGraphCosBlock:()=>FlowGraphCosBlock,FlowGraphCoshBlock:()=>FlowGraphCoshBlock,FlowGraphCubeRootBlock:()=>FlowGraphCubeRootBlock,FlowGraphDegToRadBlock:()=>FlowGraphDegToRadBlock,FlowGraphDivideBlock:()=>FlowGraphDivideBlock,FlowGraphEBlock:()=>FlowGraphEBlock,FlowGraphEqualityBlock:()=>FlowGraphEqualityBlock,FlowGraphExpBlock:()=>FlowGraphExpBlock,FlowGraphFloorBlock:()=>FlowGraphFloorBlock,FlowGraphFractionBlock:()=>FlowGraphFractionBlock,FlowGraphGreaterThanBlock:()=>FlowGraphGreaterThanBlock,FlowGraphGreaterThanOrEqualBlock:()=>FlowGraphGreaterThanOrEqualBlock,FlowGraphInfBlock:()=>FlowGraphInfBlock,FlowGraphIsInfinityBlock:()=>FlowGraphIsInfinityBlock,FlowGraphIsNanBlock:()=>FlowGraphIsNanBlock,FlowGraphLeadingZerosBlock:()=>FlowGraphLeadingZerosBlock,FlowGraphLessThanBlock:()=>FlowGraphLessThanBlock,FlowGraphLessThanOrEqualBlock:()=>FlowGraphLessThanOrEqualBlock,FlowGraphLog10Block:()=>FlowGraphLog10Block,FlowGraphLog2Block:()=>FlowGraphLog2Block,FlowGraphLogBlock:()=>FlowGraphLogBlock,FlowGraphMathInterpolationBlock:()=>FlowGraphMathInterpolationBlock,FlowGraphMaxBlock:()=>FlowGraphMaxBlock,FlowGraphMinBlock:()=>FlowGraphMinBlock,FlowGraphModuloBlock:()=>FlowGraphModuloBlock,FlowGraphMultiplyBlock:()=>FlowGraphMultiplyBlock,FlowGraphNaNBlock:()=>FlowGraphNaNBlock,FlowGraphNegationBlock:()=>FlowGraphNegationBlock,FlowGraphOneBitsCounterBlock:()=>FlowGraphOneBitsCounterBlock,FlowGraphPiBlock:()=>FlowGraphPiBlock,FlowGraphPowerBlock:()=>FlowGraphPowerBlock,FlowGraphRadToDegBlock:()=>FlowGraphRadToDegBlock,FlowGraphRandomBlock:()=>FlowGraphRandomBlock,FlowGraphRoundBlock:()=>FlowGraphRoundBlock,FlowGraphSaturateBlock:()=>FlowGraphSaturateBlock,FlowGraphSignBlock:()=>FlowGraphSignBlock,FlowGraphSinBlock:()=>FlowGraphSinBlock,FlowGraphSinhBlock:()=>FlowGraphSinhBlock,FlowGraphSquareRootBlock:()=>FlowGraphSquareRootBlock,FlowGraphSubtractBlock:()=>FlowGraphSubtractBlock,FlowGraphTanBlock:()=>FlowGraphTanBlock,FlowGraphTanhBlock:()=>FlowGraphTanhBlock,FlowGraphTrailingZerosBlock:()=>FlowGraphTrailingZerosBlock,FlowGraphTruncBlock:()=>FlowGraphTruncBlock});var l=a(20538),e=a(39426),t=a(41554),p=a(49492);class FlowGraphConstantOperationBlock extends p.D{constructor(o,r,a,l){super(o,l),this._operation=r,this._className=a}_doOperation(o){return this._operation(o)}getClassName(){return this._className}}var n=a(49486),s=a(86562);class FlowGraphTernaryOperationBlock extends p.D{constructor(o,r,a,l,e,t,p){super(l,p),this._operation=e,this._className=t,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",r),this.c=this.registerDataInput("c",a)}_doOperation(o){return this._operation(this.a.getValue(o),this.b.getValue(o),this.c.getValue(o))}getClassName(){return this._className}}var c=a(234),h=a(33203),i=a(7181);class FlowGraphAddBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicAdd(o,r)),"FlowGraphAddBlock",o)}_polymorphicAdd(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.u7)(a,l)||(0,i.bh)(a,l)||(0,i.s1)(a,l))return o.add(r);if("Quaternion"===a||"Quaternion"===l)return o.add(r);if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)+(0,i.J0)(r)}}(0,l.H7)("FlowGraphAddBlock",FlowGraphAddBlock);class FlowGraphSubtractBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicSubtract(o,r)),"FlowGraphSubtractBlock",o)}_polymorphicSubtract(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.u7)(a,l)||(0,i.s1)(a,l)||(0,i.bh)(a,l))return o.subtract(r);if("Quaternion"===a||"Quaternion"===l)return o.subtract(r);if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)-(0,i.J0)(r)}}(0,l.H7)("FlowGraphSubtractBlock",FlowGraphSubtractBlock);class FlowGraphMultiplyBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicMultiply(o,r)),"FlowGraphMultiplyBlock",o)}_polymorphicMultiply(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.u7)(a,l)||(0,i.s1)(a,l))return o.multiply(r);if("Quaternion"===a||"Quaternion"===l){const a=o.clone();return a.x*=r.x,a.y*=r.y,a.z*=r.z,a.w*=r.w,a}if((0,i.bh)(a,l)){if(this.config?.useMatrixPerComponent){const l=o.m;for(let o=0;o<l.length;o++)l[o]*=r.m[o];return"Matrix2D"===a?new h.x(l):"Matrix3D"===a?new h.o(l):n.y3.FromArray(l)}return o=o,(r=r).multiply(o)}if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)*(0,i.J0)(r)}}(0,l.H7)("FlowGraphMultiplyBlock",FlowGraphMultiplyBlock);class FlowGraphDivideBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicDivide(o,r)),"FlowGraphDivideBlock",o)}_polymorphicDivide(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.u7)(a,l)||(0,i.s1)(a,l))return o.divide(r);if("Quaternion"===a||"Quaternion"===l){const a=o.clone();return a.x/=r.x,a.y/=r.y,a.z/=r.z,a.w/=r.w,a}if((0,i.bh)(a,l)){if(this.config?.useMatrixPerComponent){const l=o.m;for(let o=0;o<l.length;o++)l[o]/=r.m[o];return"Matrix2D"===a?new h.x(l):"Matrix3D"===a?new h.o(l):n.y3.FromArray(l)}return r=r,(o=o).divide(r)}if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)/(0,i.J0)(r)}}(0,l.H7)("FlowGraphDivideBlock",FlowGraphDivideBlock);class FlowGraphRandomBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(o=>this._random(o)),"FlowGraphRandomBlock",o),this.min=this.registerDataInput("min",e.ab,o?.min??0),this.max=this.registerDataInput("max",e.ab,o?.max??1),o?.seed&&(this._seed=o.seed)}_isSeed(o=this._seed){return void 0!==o}_getRandomValue(){if(this._isSeed(this._seed)){const o=1e4*Math.sin(this._seed++);return o-Math.floor(o)}return Math.random()}_random(o){const r=this.min.getValue(o),a=this.max.getValue(o);return this._getRandomValue()*(a-r)+r}}(0,l.H7)("FlowGraphRandomBlock",FlowGraphRandomBlock);class FlowGraphEBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Math.E),"FlowGraphEBlock",o)}}(0,l.H7)("FlowGraphEBlock",FlowGraphEBlock);class FlowGraphPiBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Math.PI),"FlowGraphPIBlock",o)}}(0,l.H7)("FlowGraphPIBlock",FlowGraphPiBlock);class FlowGraphInfBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Number.POSITIVE_INFINITY),"FlowGraphInfBlock",o)}}(0,l.H7)("FlowGraphInfBlock",FlowGraphInfBlock);class FlowGraphNaNBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Number.NaN),"FlowGraphNaNBlock",o)}}function ComponentWiseUnaryOperation(o,r){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,new c.K(r(o.value));case"Vector2":return o=o,new n.FM(r(o.x),r(o.y));case"Vector3":return o=o,new n.P(r(o.x),r(o.y),r(o.z));case"Vector4":return o=o,new n.Lt(r(o.x),r(o.y),r(o.z),r(o.w));case"Quaternion":return o=o,new n._f(r(o.x),r(o.y),r(o.z),r(o.w));case"Matrix":return o=o,n.y3.FromArray(o.m.map(r));case"Matrix2D":return o=o,new h.x(o.m.map(r));case"Matrix3D":return o=o,new h.o(o.m.map(r));default:return r(o=o)}}(0,l.H7)("FlowGraphNaNBlock",FlowGraphNaNBlock);class FlowGraphAbsBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAbs(o)),"FlowGraphAbsBlock",o)}_polymorphicAbs(o){return ComponentWiseUnaryOperation(o,Math.abs)}}(0,l.H7)("FlowGraphAbsBlock",FlowGraphAbsBlock);class FlowGraphSignBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicSign(o)),"FlowGraphSignBlock",o)}_polymorphicSign(o){return ComponentWiseUnaryOperation(o,Math.sign)}}(0,l.H7)("FlowGraphSignBlock",FlowGraphSignBlock);class FlowGraphTruncBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicTrunc(o)),"FlowGraphTruncBlock",o)}_polymorphicTrunc(o){return ComponentWiseUnaryOperation(o,Math.trunc)}}(0,l.H7)("FlowGraphTruncBlock",FlowGraphTruncBlock);class FlowGraphFloorBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicFloor(o)),"FlowGraphFloorBlock",o)}_polymorphicFloor(o){return ComponentWiseUnaryOperation(o,Math.floor)}}(0,l.H7)("FlowGraphFloorBlock",FlowGraphFloorBlock);class FlowGraphCeilBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicCeiling(o)),"FlowGraphCeilBlock",o)}_polymorphicCeiling(o){return ComponentWiseUnaryOperation(o,Math.ceil)}}(0,l.H7)("FlowGraphCeilBlock",FlowGraphCeilBlock);class FlowGraphRoundBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicRound(o)),"FlowGraphRoundBlock",o)}_polymorphicRound(o){return ComponentWiseUnaryOperation(o,(o=>o<0&&this.config?.roundHalfAwayFromZero?-Math.round(-o):Math.round(o)))}}(0,l.H7)("FlowGraphRoundBlock",FlowGraphRoundBlock);class FlowGraphFractionBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicFraction(o)),"FlowGraphFractBlock",o)}_polymorphicFraction(o){return ComponentWiseUnaryOperation(o,(o=>o-Math.floor(o)))}}(0,l.H7)("FlowGraphFractBlock",FlowGraphFractionBlock);class FlowGraphNegationBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicNeg(o)),"FlowGraphNegationBlock",o)}_polymorphicNeg(o){return ComponentWiseUnaryOperation(o,(o=>-o))}}function ComponentWiseBinaryOperation(o,r,a){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,r=r,new c.K(a(o.value,r.value));case"Vector2":return o=o,r=r,new n.FM(a(o.x,r.x),a(o.y,r.y));case"Vector3":return o=o,r=r,new n.P(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z));case"Vector4":return o=o,r=r,new n.Lt(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z),a(o.w,r.w));case"Quaternion":return o=o,r=r,new n._f(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z),a(o.w,r.w));case"Matrix":return o=o,n.y3.FromArray(o.m.map(((o,l)=>a(o,r.m[l]))));case"Matrix2D":return o=o,new h.x(o.m.map(((o,l)=>a(o,r.m[l]))));case"Matrix3D":return o=o,new h.o(o.m.map(((o,l)=>a(o,r.m[l]))));default:return a((0,i.J0)(o),(0,i.J0)(r))}}(0,l.H7)("FlowGraphNegationBlock",FlowGraphNegationBlock);class FlowGraphModuloBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicRemainder(o,r)),"FlowGraphModuloBlock",o)}_polymorphicRemainder(o,r){return ComponentWiseBinaryOperation(o,r,((o,r)=>o%r))}}(0,l.H7)("FlowGraphModuloBlock",FlowGraphModuloBlock);class FlowGraphMinBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicMin(o,r)),"FlowGraphMinBlock",o)}_polymorphicMin(o,r){return ComponentWiseBinaryOperation(o,r,Math.min)}}(0,l.H7)("FlowGraphMinBlock",FlowGraphMinBlock);class FlowGraphMaxBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicMax(o,r)),"FlowGraphMaxBlock",o)}_polymorphicMax(o,r){return ComponentWiseBinaryOperation(o,r,Math.max)}}function Clamp(o,r,a){return Math.min(Math.max(o,Math.min(r,a)),Math.max(r,a))}function ComponentWiseTernaryOperation(o,r,a,l){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,r=r,a=a,new c.K(l(o.value,r.value,a.value));case"Vector2":return o=o,r=r,a=a,new n.FM(l(o.x,r.x,a.x),l(o.y,r.y,a.y));case"Vector3":return o=o,r=r,a=a,new n.P(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z));case"Vector4":return o=o,r=r,a=a,new n.Lt(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z),l(o.w,r.w,a.w));case"Quaternion":return o=o,r=r,a=a,new n._f(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z),l(o.w,r.w,a.w));case"Matrix":return n.y3.FromArray(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));case"Matrix2D":return new h.x(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));case"Matrix3D":return new h.o(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));default:return l((0,i.J0)(o),(0,i.J0)(r),(0,i.J0)(a))}}(0,l.H7)("FlowGraphMaxBlock",FlowGraphMaxBlock);class FlowGraphClampBlock extends FlowGraphTernaryOperationBlock{constructor(o){super(e.s8,e.s8,e.s8,e.s8,((o,r,a)=>this._polymorphicClamp(o,r,a)),"FlowGraphClampBlock",o)}_polymorphicClamp(o,r,a){return ComponentWiseTernaryOperation(o,r,a,Clamp)}}function Saturate(o){return Math.min(Math.max(o,0),1)}(0,l.H7)("FlowGraphClampBlock",FlowGraphClampBlock);class FlowGraphSaturateBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicSaturate(o)),"FlowGraphSaturateBlock",o)}_polymorphicSaturate(o){return ComponentWiseUnaryOperation(o,Saturate)}}function Interpolate(o,r,a){return(1-a)*o+a*r}(0,l.H7)("FlowGraphSaturateBlock",FlowGraphSaturateBlock);class FlowGraphMathInterpolationBlock extends FlowGraphTernaryOperationBlock{constructor(o){super(e.s8,e.s8,e.s8,e.s8,((o,r,a)=>this._polymorphicInterpolate(o,r,a)),"FlowGraphMathInterpolationBlock",o)}_polymorphicInterpolate(o,r,a){return ComponentWiseTernaryOperation(o,r,a,Interpolate)}}(0,l.H7)("FlowGraphMathInterpolationBlock",FlowGraphMathInterpolationBlock);class FlowGraphEqualityBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicEq(o,r)),"FlowGraphEqualityBlock",o)}_polymorphicEq(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);return typeof o==typeof r&&((0,i.u7)(a,l)||(0,i.bh)(a,l)||(0,i.s1)(a,l)?o.equals(r):o===r)}}function ComparisonOperators(o,r,a){if((0,i.kE)(o)&&(0,i.kE)(r))return a((0,i.J0)(o),(0,i.J0)(r));throw new Error(`Cannot compare ${o} and ${r}`)}(0,l.H7)("FlowGraphEqualityBlock",FlowGraphEqualityBlock);class FlowGraphLessThanBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicLessThan(o,r)),"FlowGraphLessThanBlock",o)}_polymorphicLessThan(o,r){return ComparisonOperators(o,r,((o,r)=>o<r))}}(0,l.H7)("FlowGraphLessThanBlock",FlowGraphLessThanBlock);class FlowGraphLessThanOrEqualBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicLessThanOrEqual(o,r)),"FlowGraphLessThanOrEqualBlock",o)}_polymorphicLessThanOrEqual(o,r){return ComparisonOperators(o,r,((o,r)=>o<=r))}}(0,l.H7)("FlowGraphLessThanOrEqualBlock",FlowGraphLessThanOrEqualBlock);class FlowGraphGreaterThanBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicGreaterThan(o,r)),"FlowGraphGreaterThanBlock",o)}_polymorphicGreaterThan(o,r){return ComparisonOperators(o,r,((o,r)=>o>r))}}(0,l.H7)("FlowGraphGreaterThanBlock",FlowGraphGreaterThanBlock);class FlowGraphGreaterThanOrEqualBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicGreaterThanOrEqual(o,r)),"FlowGraphGreaterThanOrEqualBlock",o)}_polymorphicGreaterThanOrEqual(o,r){return ComparisonOperators(o,r,((o,r)=>o>=r))}}(0,l.H7)("FlowGraphGreaterThanOrEqualBlock",FlowGraphGreaterThanOrEqualBlock);class FlowGraphIsNanBlock extends s.p{constructor(o){super(e.s8,e.PE,(o=>this._polymorphicIsNan(o)),"FlowGraphIsNaNBlock",o)}_polymorphicIsNan(o){if((0,i.kE)(o,!0))return isNaN((0,i.J0)(o));throw new Error(`Cannot get NaN of ${o}`)}}(0,l.H7)("FlowGraphIsNaNBlock",FlowGraphIsNanBlock);class FlowGraphIsInfinityBlock extends s.p{constructor(o){super(e.s8,e.PE,(o=>this._polymorphicIsInf(o)),"FlowGraphIsInfBlock",o)}_polymorphicIsInf(o){if((0,i.kE)(o))return!isFinite((0,i.J0)(o));throw new Error(`Cannot get isInf of ${o}`)}}(0,l.H7)("FlowGraphIsInfBlock",FlowGraphIsInfinityBlock);class FlowGraphDegToRadBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicDegToRad(o)),"FlowGraphDegToRadBlock",o)}_degToRad(o){return o*Math.PI/180}_polymorphicDegToRad(o){return ComponentWiseUnaryOperation(o,this._degToRad)}}(0,l.H7)("FlowGraphDegToRadBlock",FlowGraphDegToRadBlock);class FlowGraphRadToDegBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicRadToDeg(o)),"FlowGraphRadToDegBlock",o)}_radToDeg(o){return 180*o/Math.PI}_polymorphicRadToDeg(o){return ComponentWiseUnaryOperation(o,this._radToDeg)}}(0,l.H7)("FlowGraphRadToDegBlock",FlowGraphRadToDegBlock);class FlowGraphSinBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicSin(o)),"FlowGraphSinBlock",o)}_polymorphicSin(o){return ComponentWiseUnaryOperation(o,Math.sin)}}class FlowGraphCosBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicCos(o)),"FlowGraphCosBlock",o)}_polymorphicCos(o){return ComponentWiseUnaryOperation(o,Math.cos)}}class FlowGraphTanBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicTan(o)),"FlowGraphTanBlock",o)}_polymorphicTan(o){return ComponentWiseUnaryOperation(o,Math.tan)}}class FlowGraphAsinBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAsin(o)),"FlowGraphASinBlock",o)}_polymorphicAsin(o){return ComponentWiseUnaryOperation(o,Math.asin)}}(0,l.H7)("FlowGraphASinBlock",FlowGraphAsinBlock);class FlowGraphAcosBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAcos(o)),"FlowGraphACosBlock",o)}_polymorphicAcos(o){return ComponentWiseUnaryOperation(o,Math.acos)}}(0,l.H7)("FlowGraphACosBlock",FlowGraphAcosBlock);class FlowGraphAtanBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAtan(o)),"FlowGraphATanBlock",o)}_polymorphicAtan(o){return ComponentWiseUnaryOperation(o,Math.atan)}}(0,l.H7)("FlowGraphATanBlock",FlowGraphAtanBlock);class FlowGraphAtan2Block extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicAtan2(o,r)),"FlowGraphATan2Block",o)}_polymorphicAtan2(o,r){return ComponentWiseBinaryOperation(o,r,Math.atan2)}}(0,l.H7)("FlowGraphATan2Block",FlowGraphAtan2Block);class FlowGraphSinhBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicSinh(o)),"FlowGraphSinhBlock",o)}_polymorphicSinh(o){return ComponentWiseUnaryOperation(o,Math.sinh)}}(0,l.H7)("FlowGraphSinhBlock",FlowGraphSinhBlock);class FlowGraphCoshBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicCosh(o)),"FlowGraphCoshBlock",o)}_polymorphicCosh(o){return ComponentWiseUnaryOperation(o,Math.cosh)}}(0,l.H7)("FlowGraphCoshBlock",FlowGraphCoshBlock);class FlowGraphTanhBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicTanh(o)),"FlowGraphTanhBlock",o)}_polymorphicTanh(o){return ComponentWiseUnaryOperation(o,Math.tanh)}}(0,l.H7)("FlowGraphTanhBlock",FlowGraphTanhBlock);class FlowGraphAsinhBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAsinh(o)),"FlowGraphASinhBlock",o)}_polymorphicAsinh(o){return ComponentWiseUnaryOperation(o,Math.asinh)}}(0,l.H7)("FlowGraphASinhBlock",FlowGraphAsinhBlock);class FlowGraphAcoshBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAcosh(o)),"FlowGraphACoshBlock",o)}_polymorphicAcosh(o){return ComponentWiseUnaryOperation(o,Math.acosh)}}(0,l.H7)("FlowGraphACoshBlock",FlowGraphAcoshBlock);class FlowGraphAtanhBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAtanh(o)),"FlowGraphATanhBlock",o)}_polymorphicAtanh(o){return ComponentWiseUnaryOperation(o,Math.atanh)}}(0,l.H7)("FlowGraphATanhBlock",FlowGraphAtanhBlock);class FlowGraphExpBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicExp(o)),"FlowGraphExponentialBlock",o)}_polymorphicExp(o){return ComponentWiseUnaryOperation(o,Math.exp)}}(0,l.H7)("FlowGraphExponentialBlock",FlowGraphExpBlock);class FlowGraphLogBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog(o)),"FlowGraphLogBlock",o)}_polymorphicLog(o){return ComponentWiseUnaryOperation(o,Math.log)}}(0,l.H7)("FlowGraphLogBlock",FlowGraphLogBlock);class FlowGraphLog2Block extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog2(o)),"FlowGraphLog2Block",o)}_polymorphicLog2(o){return ComponentWiseUnaryOperation(o,Math.log2)}}(0,l.H7)("FlowGraphLog2Block",FlowGraphLog2Block);class FlowGraphLog10Block extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog10(o)),"FlowGraphLog10Block",o)}_polymorphicLog10(o){return ComponentWiseUnaryOperation(o,Math.log10)}}(0,l.H7)("FlowGraphLog10Block",FlowGraphLog10Block);class FlowGraphSquareRootBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicSqrt(o)),"FlowGraphSquareRootBlock",o)}_polymorphicSqrt(o){return ComponentWiseUnaryOperation(o,Math.sqrt)}}(0,l.H7)("FlowGraphSquareRootBlock",FlowGraphSquareRootBlock);class FlowGraphCubeRootBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicCubeRoot(o)),"FlowGraphCubeRootBlock",o)}_polymorphicCubeRoot(o){return ComponentWiseUnaryOperation(o,Math.cbrt)}}(0,l.H7)("FlowGraphCubeRootBlock",FlowGraphCubeRootBlock);class FlowGraphPowerBlock extends t.V{constructor(o){super(e.s8,e.ab,e.ab,((o,r)=>this._polymorphicPow(o,r)),"FlowGraphPowerBlock",o)}_polymorphicPow(o,r){return ComponentWiseBinaryOperation(o,r,Math.pow)}}(0,l.H7)("FlowGraphPowerBlock",FlowGraphPowerBlock);class FlowGraphBitwiseNotBlock extends s.p{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(o=>"boolean"==typeof o?!o:"number"==typeof o?~o:new c.K(~o.value)),"FlowGraphBitwiseNotBlock",o)}}(0,l.H7)("FlowGraphBitwiseNotBlock",FlowGraphBitwiseNotBlock);class FlowGraphBitwiseAndBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o&&r;if("number"==typeof o&&"number"==typeof r)return o&r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value&r.value);throw new Error(`Cannot perform bitwise AND on ${o} and ${r}`)}),"FlowGraphBitwiseAndBlock",o)}}(0,l.H7)("FlowGraphBitwiseAndBlock",FlowGraphBitwiseAndBlock);class FlowGraphBitwiseOrBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o||r;if("number"==typeof o&&"number"==typeof r)return o|r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value|r.value);throw new Error(`Cannot perform bitwise OR on ${o} and ${r}`)}),"FlowGraphBitwiseOrBlock",o)}}(0,l.H7)("FlowGraphBitwiseOrBlock",FlowGraphBitwiseOrBlock);class FlowGraphBitwiseXorBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o!==r;if("number"==typeof o&&"number"==typeof r)return o^r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value^r.value);throw new Error(`Cannot perform bitwise XOR on ${o} and ${r}`)}),"FlowGraphBitwiseXorBlock",o)}}(0,l.H7)("FlowGraphBitwiseXorBlock",FlowGraphBitwiseXorBlock);class FlowGraphBitwiseLeftShiftBlock extends t.V{constructor(o){super(e.fj,e.fj,e.fj,((o,r)=>new c.K(o.value<<r.value)),"FlowGraphBitwiseLeftShiftBlock",o)}}(0,l.H7)("FlowGraphBitwiseLeftShiftBlock",FlowGraphBitwiseLeftShiftBlock);class FlowGraphBitwiseRightShiftBlock extends t.V{constructor(o){super(e.fj,e.fj,e.fj,((o,r)=>new c.K(o.value>>r.value)),"FlowGraphBitwiseRightShiftBlock",o)}}(0,l.H7)("FlowGraphBitwiseRightShiftBlock",FlowGraphBitwiseRightShiftBlock);class FlowGraphLeadingZerosBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(Math.clz32(o.value))),"FlowGraphLeadingZerosBlock",o)}}(0,l.H7)("FlowGraphLeadingZerosBlock",FlowGraphLeadingZerosBlock);class FlowGraphTrailingZerosBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(o.value?31-Math.clz32(o.value&-o.value):32)),"FlowGraphTrailingZerosBlock",o)}}(0,l.H7)("FlowGraphTrailingZerosBlock",FlowGraphTrailingZerosBlock);class FlowGraphOneBitsCounterBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(function CountOnes(o){let r=0;for(;o;)r+=1&o,o>>=1;return r}(o.value))),"FlowGraphOneBitsCounterBlock",o)}}(0,l.H7)("FlowGraphOneBitsCounterBlock",FlowGraphOneBitsCounterBlock)},41554:(o,r,a)=>{a.d(r,{V:()=>FlowGraphBinaryOperationBlock});var l=a(49492);class FlowGraphBinaryOperationBlock extends l.D{constructor(o,r,a,l,e,t){super(a,t),this._operation=l,this._className=e,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",r)}_doOperation(o){const r=this.a.getValue(o),a=this.b.getValue(o);return this._operation(r,a)}getClassName(){return this._className}}},49492:(o,r,a)=>{a.d(r,{D:()=>FlowGraphCachedOperationBlock});var l=a(43890),e=a(39426);const t="cachedOperationValue",p="cachedExecutionId";class FlowGraphCachedOperationBlock extends l.A{constructor(o,r){super(r),this.value=this.registerDataOutput("value",o),this.isValid=this.registerDataOutput("isValid",e.PE)}_updateOutputs(o){const r=o._getExecutionVariable(this,p,-1),a=o._getExecutionVariable(this,t,null);if(null!=a&&r===o.executionId)this.isValid.setValue(!0,o),this.value.setValue(a,o);else try{const r=this._doOperation(o);if(null==r)return void this.isValid.setValue(!1,o);o._setExecutionVariable(this,t,r),o._setExecutionVariable(this,p,o.executionId),this.value.setValue(r,o),this.isValid.setValue(!0,o)}catch(r){this.isValid.setValue(!1,o)}}}},86562:(o,r,a)=>{a.d(r,{p:()=>FlowGraphUnaryOperationBlock});var l=a(49492);class FlowGraphUnaryOperationBlock extends l.D{constructor(o,r,a,l,e){super(r,e),this._operation=a,this._className=l,this.a=this.registerDataInput("a",o)}_doOperation(o){return this._operation(this.a.getValue(o))}getClassName(){return this._className}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4049 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4051.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4051],{54051:(e,r,f)=>{f.r(r),f.d(r,{iblCdfDebugPixelShaderWGSL:()=>a});var c=f(17416);const i="iblCdfDebugPixelShader",t="#define PI 3.1415927\nvarying vUV: vec2f;var cdfySampler: sampler;var cdfy: texture_2d<f32>;var cdfxSampler: sampler;var cdfx: texture_2d<f32>;var icdfSampler: sampler;var icdf: texture_2d<f32>;\n#ifdef IBL_USE_CUBE_MAP\nvar iblSourceSampler: sampler;var iblSource: texture_cube<f32>;\n#else\nvar iblSourceSampler: sampler;var iblSource: texture_2d<f32>;\n#endif\nvar textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#define cdfyVSize (0.8/3.0)\n#define cdfxVSize 0.1\n#define cdfyHSize 0.5\nuniform sizeParams: vec4f;\n#ifdef IBL_USE_CUBE_MAP\nfn equirectangularToCubemapDirection(uv: vec2f)->vec3f {var longitude: f32=uv.x*2.0*PI-PI;var latitude: f32=PI*0.5-uv.y*PI;var direction: vec3f;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}\n#endif\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs { \nvar colour: vec3f= vec3f(0.0);var uv: vec2f =\nvec2f((uniforms.sizeParams.x+input.vUV.x)*uniforms.sizeParams.z,(uniforms.sizeParams.y+input.vUV.y)*uniforms.sizeParams.w);var backgroundColour: vec3f=textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb;var cdfxWidth: u32=textureDimensions(cdfx,0).x;var cdfyHeight: u32=textureDimensions(cdfy,0).y;const iblStart: f32=1.0-cdfyVSize;const pdfStart: f32=1.0-2.0*cdfyVSize;const cdfyStart: f32=1.0-3.0*cdfyVSize;const cdfxStart: f32=1.0-3.0*cdfyVSize-cdfxVSize;const icdfxStart: f32=1.0-3.0*cdfyVSize-2.0*cdfxVSize;\n#ifdef IBL_USE_CUBE_MAP\nvar direction: vec3f=equirectangularToCubemapDirection(\n(uv- vec2f(0.0,iblStart))* vec2f(1.0,1.0/cdfyVSize));var iblColour: vec3f=textureSampleLevel(iblSource,iblSourceSampler,direction,0.0).rgb;\n#else\nvar iblColour: vec3f=textureSample(iblSource,iblSourceSampler,(uv- vec2f(0.0,iblStart)) *\nvec2f(1.0,1.0/cdfyVSize))\n.rgb;\n#endif\nvar pdfColour: vec3f =\ntextureSample(icdf,icdfSampler,(uv- vec2f(0.0,pdfStart))* vec2f(1.0,1.0/cdfyVSize)).zzz;var cdfyColour: f32 =\ntextureSample(cdfy,cdfySampler,(uv- vec2f(0.0,cdfyStart))* vec2f(2.0,1.0/cdfyVSize)).r;var icdfyColour: f32 =\ntextureSample(icdf,icdfSampler,(uv- vec2f(0.5,cdfyStart))* vec2f(2.0,1.0/cdfyVSize)).g;var cdfxColour: f32 =\ntextureSample(cdfx,cdfxSampler,(uv- vec2f(0.0,cdfxStart))* vec2f(1.0,1.0/cdfxVSize)).r;var icdfxColour: f32=textureSample(icdf,icdfSampler,(uv- vec2f(0.0,icdfxStart)) *\nvec2f(1.0,1.0/cdfxVSize)).r;if (uv.x<0.0 || uv.x>1.0 || uv.y<0.0 || uv.y>1.0) {colour=backgroundColour;} else if (uv.y>iblStart) {colour+=iblColour;} else if (uv.y>pdfStart) {colour+=pdfColour;} else if (uv.y>cdfyStart && uv.x<0.5) {colour.r+=cdfyColour/f32(cdfyHeight);} else if (uv.y>cdfyStart && uv.x>0.5) {colour.r+=icdfyColour;} else if (uv.y>cdfxStart) {colour.r+=cdfxColour/f32(cdfxWidth);} else if (uv.y>icdfxStart) {colour.r+=icdfxColour;}\nfragmentOutputs.color =vec4(mix(colour,backgroundColour,0.5),1.0);}";c.v.ShadersStoreWGSL[i]||(c.v.ShadersStoreWGSL[i]=t);const a={name:i,shader:t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4051 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4141.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4141],{97555:(e,n,f)=>{var r=f(17416);const o="fogFragment",a="#ifdef FOG\nvar fog: f32=CalcFogFactor();\n#ifdef PBR\nfog=toLinearSpace(fog);\n#endif\ncolor= vec4f(mix(uniforms.vFogColor,color.rgb,fog),color.a);\n#endif\n";r.v.IncludesShadersStoreWGSL[o]||(r.v.IncludesShadersStoreWGSL[o]=a)},80750:(e,n,f)=>{var r=f(17416);const o="fogFragmentDeclaration",a="#ifdef FOG\n#define FOGMODE_NONE 0.\n#define FOGMODE_EXP 1.\n#define FOGMODE_EXP2 2.\n#define FOGMODE_LINEAR 3.\nconst E=2.71828;uniform vFogInfos: vec4f;uniform vFogColor: vec3f;varying vFogDistance: vec3f;fn CalcFogFactor()->f32\n{var fogCoeff: f32=1.0;var fogStart: f32=uniforms.vFogInfos.y;var fogEnd: f32=uniforms.vFogInfos.z;var fogDensity: f32=uniforms.vFogInfos.w;var fogDistance: f32=length(fragmentInputs.vFogDistance);if (FOGMODE_LINEAR==uniforms.vFogInfos.x)\n{fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart);}\nelse if (FOGMODE_EXP==uniforms.vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDensity);}\nelse if (FOGMODE_EXP2==uniforms.vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);}\nreturn clamp(fogCoeff,0.0,1.0);}\n#endif\n";r.v.IncludesShadersStoreWGSL[o]||(r.v.IncludesShadersStoreWGSL[o]=a)},37470:(e,n,f)=>{var r=f(17416);const o="logDepthDeclaration",a="#ifdef LOGARITHMICDEPTH\nuniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;\n#endif\n";r.v.IncludesShadersStoreWGSL[o]||(r.v.IncludesShadersStoreWGSL[o]=a)},954:(e,n,f)=>{var r=f(17416);const o="logDepthFragment",a="#ifdef LOGARITHMICDEPTH\nfragmentOutputs.fragDepth=log2(fragmentInputs.vFragmentDepth)*uniforms.logarithmicDepthConstant*0.5;\n#endif\n";r.v.IncludesShadersStoreWGSL[o]||(r.v.IncludesShadersStoreWGSL[o]=a)},24141:(e,n,f)=>{f.r(n),f.d(n,{spritesPixelShaderWGSL:()=>i});var r=f(17416);f(80750),f(37470),f(954),f(97555);const o="#ifdef IMAGEPROCESSINGPOSTPROCESS\nfragmentOutputs.color=vec4f(pow(fragmentOutputs.color.rgb, vec3f(2.2)),fragmentOutputs.color.a);\n#endif\n";r.v.IncludesShadersStoreWGSL.imageProcessingCompatibility||(r.v.IncludesShadersStoreWGSL.imageProcessingCompatibility=o);const a="spritesPixelShader",t="uniform alphaTest: i32;varying vColor: vec4f;varying vUV: vec2f;var diffuseSamplerSampler: sampler;var diffuseSampler: texture_2d<f32>;\n#include<fogFragmentDeclaration>\n#include<logDepthDeclaration>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n#ifdef PIXEL_PERFECT\nfn uvPixelPerfect(uv: vec2f)->vec2f {var res: vec2f= vec2f(textureDimensions(diffuseSampler,0));var uvTemp=uv*res;var seam: vec2f=floor(uvTemp+0.5);uvTemp=seam+clamp((uvTemp-seam)/fwidth(uvTemp),vec2f(-0.5),vec2f(0.5));return uvTemp/res;}\n#endif\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#ifdef PIXEL_PERFECT\nvar uv: vec2f=uvPixelPerfect(input.vUV);\n#else\nvar uv: vec2f=input.vUV;\n#endif\nvar color: vec4f=textureSample(diffuseSampler,diffuseSamplerSampler,uv);var fAlphaTest: f32= f32(uniforms.alphaTest);if (fAlphaTest != 0.)\n{if (color.a<0.95) {discard;}}\ncolor*=input.vColor;\n#include<logDepthFragment>\n#include<fogFragment>\nfragmentOutputs.color=color;\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}";r.v.ShadersStoreWGSL.spritesPixelShader||(r.v.ShadersStoreWGSL.spritesPixelShader=t);const i={name:a,shader:t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4141 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4358.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4358],{64358:(e,l,t)=>{t.r(l),t.d(l,{FlowGraphFlipFlopBlock:()=>FlowGraphFlipFlopBlock});var a=t(17693),i=t(39426),s=t(20538);class FlowGraphFlipFlopBlock extends a.Q{constructor(e){super(e),this.onOn=this._registerSignalOutput("onOn"),this.onOff=this._registerSignalOutput("onOff"),this.value=this.registerDataOutput("value",i.PE)}_execute(e,l){let t=e._getExecutionVariable(this,"value","boolean"==typeof this.config?.startValue&&!this.config.startValue);t=!t,e._setExecutionVariable(this,"value",t),this.value.setValue(t,e),t?this.onOn._activateSignal(e):this.onOff._activateSignal(e)}getClassName(){return"FlowGraphFlipFlopBlock"}}(0,s.H7)("FlowGraphFlipFlopBlock",FlowGraphFlipFlopBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4358 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4478.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4478],{4478:(e,t,s)=>{s.r(t),s.d(t,{FlowGraphCodeExecutionBlock:()=>FlowGraphCodeExecutionBlock});var u=s(43890),i=s(39426);class FlowGraphCodeExecutionBlock extends u.A{constructor(e){super(e),this.config=e,this.executionFunction=this.registerDataInput("function",i.s8),this.value=this.registerDataInput("value",i.s8),this.result=this.registerDataOutput("result",i.s8)}_updateOutputs(e){const t=this.executionFunction.getValue(e),s=this.value.getValue(e);t&&this.result.setValue(t(s,e),e)}getClassName(){return"FlowGraphCodeExecutionBlock"}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4478 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4486.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4486],{58632:(e,n,f)=>{var r=f(17416);const a="hdrFilteringFunctions",t="#ifdef NUM_SAMPLES\n#if NUM_SAMPLES>0\nfn radicalInverse_VdC(value: u32)->f32 \n{var bits=(value<<16u) | (value>>16u);bits=((bits & 0x55555555u)<<1u) | ((bits & 0xAAAAAAAAu)>>1u);bits=((bits & 0x33333333u)<<2u) | ((bits & 0xCCCCCCCCu)>>2u);bits=((bits & 0x0F0F0F0Fu)<<4u) | ((bits & 0xF0F0F0F0u)>>4u);bits=((bits & 0x00FF00FFu)<<8u) | ((bits & 0xFF00FF00u)>>8u);return f32(bits)*2.3283064365386963e-10; }\nfn hammersley(i: u32,N: u32)->vec2f\n{return vec2f( f32(i)/ f32(N),radicalInverse_VdC(i));}\nfn log4(x: f32)->f32 {return log2(x)/2.;}\nfn uv_to_normal(uv: vec2f)->vec3f {var N: vec3f;var uvRange: vec2f=uv;var theta: f32=uvRange.x*2.0*PI;var phi: f32=uvRange.y*PI;N.x=cos(theta)*sin(phi);N.z=sin(theta)*sin(phi);N.y=cos(phi);return N;}\nconst NUM_SAMPLES_FLOAT: f32= f32(NUM_SAMPLES);const NUM_SAMPLES_FLOAT_INVERSED: f32=1./NUM_SAMPLES_FLOAT;const K: f32=4.;fn irradiance(inputTexture: texture_cube<f32>,inputSampler: sampler,inputN: vec3f,filteringInfo: vec2f,diffuseRoughness: f32,surfaceAlbedo: vec3f,inputV: vec3f\n#ifdef IBL_CDF_FILTERING\n,icdfSampler: texture_2d<f32>,icdfSamplerSampler: sampler\n#endif\n)->vec3f\n{var n: vec3f=normalize(inputN);var result: vec3f= vec3f(0.0);\n#ifndef IBL_CDF_FILTERING\nvar tangent: vec3f=select(vec3f(1.,0.,0.),vec3f(0.,0.,1.),abs(n.z)<0.999);tangent=normalize(cross(tangent,n));var bitangent: vec3f=cross(n,tangent);var tbn: mat3x3f= mat3x3f(tangent,bitangent,n);var tbnInverse: mat3x3f=transpose(tbn);\n#endif\nvar maxLevel: f32=filteringInfo.y;var dim0: f32=filteringInfo.x;var omegaP: f32=(4.*PI)/(6.*dim0*dim0);var clampedAlbedo: vec3f=clamp(surfaceAlbedo,vec3f(0.1),vec3f(1.0));for(var i: u32=0u; i<NUM_SAMPLES; i++)\n{var Xi: vec2f=hammersley(i,NUM_SAMPLES);\n#ifdef IBL_CDF_FILTERING\nvar T: vec2f;T.x=textureSampleLevel(icdfSampler,icdfSamplerSampler,vec2(Xi.x,0.0),0.0).x;T.y=textureSampleLevel(icdfSampler,icdfSamplerSampler,vec2(T.x,Xi.y),0.0).y;var Ls: vec3f=uv_to_normal(vec2f(1.0-fract(T.x+0.25),T.y));var NoL: f32=dot(n,Ls);var NoV: f32=dot(n,inputV);\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\nvar LoV: f32=dot(Ls,inputV);\n#elif BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_BURLEY\nvar H: vec3f=(inputV+Ls)*0.5;var VoH: f32=dot(inputV,H);\n#endif \n#else\nvar Ls: vec3f=hemisphereCosSample(Xi);Ls=normalize(Ls);var Ns: vec3f= vec3f(0.,0.,1.);var NoL: f32=dot(Ns,Ls);var V: vec3f=tbnInverse*inputV;var NoV: f32=dot(Ns,V);\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\nvar LoV: f32=dot(Ls,V);\n#elif BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_BURLEY\nvar H: vec3f=(V+Ls)*0.5;var VoH: f32=dot(V,H);\n#endif\n#endif\nif (NoL>0.) {\n#ifdef IBL_CDF_FILTERING\nvar pdf: f32=textureSampleLevel(icdfSampler,icdfSamplerSampler,T,0.0).z;var c: vec3f=textureSampleLevel(inputTexture,inputSampler,Ls,0.0).rgb;\n#else\nvar pdf_inversed: f32=PI/NoL;var omegaS: f32=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;var l: f32=log4(omegaS)-log4(omegaP)+log4(K);var mipLevel: f32=clamp(l,0.0,maxLevel);var c: vec3f=textureSampleLevel(inputTexture,inputSampler,tbn*Ls,mipLevel).rgb;\n#endif\n#ifdef GAMMA_INPUT\nc=toLinearSpaceVec3(c);\n#endif\nvar diffuseRoughnessTerm: vec3f=vec3f(1.0);\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\ndiffuseRoughnessTerm=diffuseBRDF_EON(clampedAlbedo,diffuseRoughness,NoL,NoV,LoV)*PI;\n#elif BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_BURLEY\ndiffuseRoughnessTerm=vec3f(diffuseBRDF_Burley(NoL,NoV,VoH,diffuseRoughness)*PI);\n#endif\n#ifdef IBL_CDF_FILTERING\nvar light: vec3f=vec3f(0.0);if (pdf>1e-6) {light=vec3f(1.0)/vec3f(pdf)*c;}\nresult+=NoL*diffuseRoughnessTerm*light;\n#else\nresult+=c*diffuseRoughnessTerm;\n#endif\n}}\nresult=result*NUM_SAMPLES_FLOAT_INVERSED;\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\nresult=result/clampedAlbedo;\n#endif\nreturn result;}\nfn radiance(alphaG: f32,inputTexture: texture_cube<f32>,inputSampler: sampler,inputN: vec3f,filteringInfo: vec2f)->vec3f\n{var n: vec3f=normalize(inputN);var c: vec3f=textureSample(inputTexture,inputSampler,n).rgb; \nif (alphaG==0.) {\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nreturn c;} else {var result: vec3f= vec3f(0.);var tangent: vec3f=select(vec3f(1.,0.,0.),vec3f(0.,0.,1.),abs(n.z)<0.999);tangent=normalize(cross(tangent,n));var bitangent: vec3f=cross(n,tangent);var tbn: mat3x3f= mat3x3f(tangent,bitangent,n);var maxLevel: f32=filteringInfo.y;var dim0: f32=filteringInfo.x;var omegaP: f32=(4.*PI)/(6.*dim0*dim0);var weight: f32=0.;for(var i: u32=0u; i<NUM_SAMPLES; i++)\n{var Xi: vec2f=hammersley(i,NUM_SAMPLES);var H: vec3f=hemisphereImportanceSampleDggx(Xi,alphaG);var NoV: f32=1.;var NoH: f32=H.z;var NoH2: f32=H.z*H.z;var NoL: f32=2.*NoH2-1.;var L: vec3f= vec3f(2.*NoH*H.x,2.*NoH*H.y,NoL);L=normalize(L);if (NoL>0.) {var pdf_inversed: f32=4./normalDistributionFunction_TrowbridgeReitzGGX(NoH,alphaG);var omegaS: f32=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;var l: f32=log4(omegaS)-log4(omegaP)+log4(K);var mipLevel: f32=clamp( f32(l),0.0,maxLevel);weight+=NoL;var c: vec3f=textureSampleLevel(inputTexture,inputSampler,tbn*L,mipLevel).rgb;\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nresult+=c*NoL;}}\nresult=result/weight;return result;}}\n#endif\n#endif\n";r.v.IncludesShadersStoreWGSL[a]||(r.v.IncludesShadersStoreWGSL[a]=t)},5442:(e,n,f)=>{var r=f(17416);const a="importanceSampling",t="fn hemisphereCosSample(u: vec2f)->vec3f {var phi: f32=2.*PI*u.x;var cosTheta2: f32=1.-u.y;var cosTheta: f32=sqrt(cosTheta2);var sinTheta: f32=sqrt(1.-cosTheta2);return vec3f(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nfn hemisphereImportanceSampleDggx(u: vec2f,a: f32)->vec3f {var phi: f32=2.*PI*u.x;var cosTheta2: f32=(1.-u.y)/(1.+(a+1.)*((a-1.)*u.y));var cosTheta: f32=sqrt(cosTheta2);var sinTheta: f32=sqrt(1.-cosTheta2);return vec3f(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nfn hemisphereImportanceSampleDCharlie(u: vec2f,a: f32)->vec3f { \nvar phi: f32=2.*PI*u.x;var sinTheta: f32=pow(u.y,a/(2.*a+1.));var cosTheta: f32=sqrt(1.-sinTheta*sinTheta);return vec3f(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}";r.v.IncludesShadersStoreWGSL[a]||(r.v.IncludesShadersStoreWGSL[a]=t)},34366:(e,n,f)=>{var r=f(17416);const a="pbrBRDFFunctions",t="#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\n#define BRDF_DIFFUSE_MODEL_EON 0\n#define BRDF_DIFFUSE_MODEL_BURLEY 1\n#define BRDF_DIFFUSE_MODEL_LAMBERT 2\n#define BRDF_DIFFUSE_MODEL_LEGACY 3\n#define DIELECTRIC_SPECULAR_MODEL_GLTF 0\n#define DIELECTRIC_SPECULAR_MODEL_OPENPBR 1\n#define CONDUCTOR_SPECULAR_MODEL_GLTF 0\n#define CONDUCTOR_SPECULAR_MODEL_OPENPBR 1\n#ifndef PBR_VERTEX_SHADER\n#ifdef MS_BRDF_ENERGY_CONSERVATION\nfn getEnergyConservationFactor(specularEnvironmentR0: vec3f,environmentBrdf: vec3f)->vec3f {return 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0);}\n#endif\n#if CONDUCTOR_SPECULAR_MODEL==CONDUCTOR_SPECULAR_MODEL_OPENPBR \nfn getF82Specular(NdotV: f32,F0: vec3f,edgeTint: vec3f,roughness: f32)->vec3f {const cos_theta_max: f32=0.142857143; \nconst one_minus_cos_theta_max_to_the_fifth: f32=0.462664366; \nconst one_minus_cos_theta_max_to_the_sixth: f32=0.396569457; \nlet white_minus_F0: vec3f=vec3f(1.0f)-F0;let b_numerator: vec3f=(F0+white_minus_F0*one_minus_cos_theta_max_to_the_fifth)*(vec3f(1.0)-edgeTint);const b_denominator: f32=cos_theta_max*one_minus_cos_theta_max_to_the_sixth;const b_denominator_reciprocal: f32=1.0f/b_denominator;let b: vec3f=b_numerator*b_denominator_reciprocal; \nlet cos_theta: f32=max(roughness,NdotV);let one_minus_cos_theta: f32=1.0-cos_theta;let offset_from_F0: vec3f=(white_minus_F0-b*cos_theta*one_minus_cos_theta)*pow(one_minus_cos_theta,5.0f);return clamp(F0+offset_from_F0,vec3f(0.0f),vec3f(1.0f));}\n#endif\n#ifdef ENVIRONMENTBRDF\nfn getBRDFLookup(NdotV: f32,perceptualRoughness: f32)->vec3f {var UV: vec2f= vec2f(NdotV,perceptualRoughness);var brdfLookup: vec4f= textureSample(environmentBrdfSampler,environmentBrdfSamplerSampler,UV);\n#ifdef ENVIRONMENTBRDF_RGBD\nbrdfLookup=vec4f(fromRGBD(brdfLookup.rgba),brdfLookup.a);\n#endif\nreturn brdfLookup.rgb;}\nfn getReflectanceFromBRDFWithEnvLookup(specularEnvironmentR0: vec3f,specularEnvironmentR90: vec3f,environmentBrdf: vec3f)->vec3f {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvar reflectance: vec3f=(specularEnvironmentR90-specularEnvironmentR0)*environmentBrdf.x+specularEnvironmentR0*environmentBrdf.y;\n#else\nvar reflectance: vec3f=specularEnvironmentR0*environmentBrdf.x+specularEnvironmentR90*environmentBrdf.y;\n#endif\nreturn reflectance;}\nfn getReflectanceFromBRDFLookup(specularEnvironmentR0: vec3f,environmentBrdf: vec3f)->vec3f {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvar reflectance: vec3f=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0);\n#else\nvar reflectance: vec3f=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;\n#endif\nreturn reflectance;}\n#endif\n/* NOT USED\n#if defined(SHEEN) && defined(SHEEN_SOFTER)\nfn getBRDFLookupCharlieSheen(NdotV: f32,perceptualRoughness: f32)->f32\n{var c: f32=1.0-NdotV;var c3: f32=c*c*c;return 0.65584461*c3+1.0/(4.16526551+exp(-7.97291361*perceptualRoughness+6.33516894));}\n#endif\n*/\n#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL)\nfn getReflectanceFromAnalyticalBRDFLookup_Jones(VdotN: f32,reflectance0: vec3f,reflectance90: vec3f,smoothness: f32)->vec3f\n{var weight: f32=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));}\n#endif\n#if defined(SHEEN) && defined(ENVIRONMENTBRDF)\n/**\n* The sheen BRDF not containing F can be easily stored in the blue channel of the BRDF texture.\n* The blue channel contains DCharlie*VAshikhmin*NdotL as a lokkup table\n*/\nfn getSheenReflectanceFromBRDFLookup(reflectance0: vec3f,environmentBrdf: vec3f)->vec3f {var sheenEnvironmentReflectance: vec3f=reflectance0*environmentBrdf.b;return sheenEnvironmentReflectance;}\n#endif\nfn fresnelSchlickGGXVec3(VdotH: f32,reflectance0: vec3f,reflectance90: vec3f)->vec3f\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\nfn fresnelSchlickGGX(VdotH: f32,reflectance0: f32,reflectance90: f32)->f32\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\n#ifdef CLEARCOAT\nfn getR0RemappedForClearCoat(f0: vec3f)->vec3f {\n#ifdef CLEARCOAT_DEFAULTIOR\n#ifdef MOBILE\nreturn saturateVec3(f0*(f0*0.526868+0.529324)-0.0482256);\n#else\nreturn saturateVec3(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998);\n#endif\n#else\nvar s: vec3f=sqrt(f0);var t: vec3f=(uniforms.vClearCoatRefractionParams.z+uniforms.vClearCoatRefractionParams.w*s)/(uniforms.vClearCoatRefractionParams.w+uniforms.vClearCoatRefractionParams.z*s);return squareVec3(t);\n#endif\n}\n#endif\n#ifdef IRIDESCENCE\nconst XYZ_TO_REC709: mat3x3f= mat3x3f(\n3.2404542,-0.9692660, 0.0556434,\n-1.5371385, 1.8760108,-0.2040259,\n-0.4985314, 0.0415560, 1.0572252\n);fn getIORTfromAirToSurfaceR0(f0: vec3f)->vec3f {var sqrtF0: vec3f=sqrt(f0);return (1.+sqrtF0)/(1.-sqrtF0);}\nfn getR0fromIORsVec3(iorT: vec3f,iorI: f32)->vec3f {return squareVec3((iorT- vec3f(iorI))/(iorT+ vec3f(iorI)));}\nfn getR0fromIORs(iorT: f32,iorI: f32)->f32 {return square((iorT-iorI)/(iorT+iorI));}\nfn evalSensitivity(opd: f32,shift: vec3f)->vec3f {var phase: f32=2.0*PI*opd*1.0e-9;const val: vec3f= vec3f(5.4856e-13,4.4201e-13,5.2481e-13);const pos: vec3f= vec3f(1.6810e+06,1.7953e+06,2.2084e+06);const vr: vec3f= vec3f(4.3278e+09,9.3046e+09,6.6121e+09);var xyz: vec3f=val*sqrt(2.0*PI*vr)*cos(pos*phase+shift)*exp(-square(phase)*vr);xyz.x+=9.7470e-14*sqrt(2.0*PI*4.5282e+09)*cos(2.2399e+06*phase+shift[0])*exp(-4.5282e+09*square(phase));xyz/=1.0685e-7;var srgb: vec3f=XYZ_TO_REC709*xyz;return srgb;}\nfn evalIridescence(outsideIOR: f32,eta2: f32,cosTheta1: f32,thinFilmThickness: f32,baseF0: vec3f)->vec3f {var I: vec3f= vec3f(1.0);var iridescenceIOR: f32=mix(outsideIOR,eta2,smoothstep(0.0,0.03,thinFilmThickness));var sinTheta2Sq: f32=square(outsideIOR/iridescenceIOR)*(1.0-square(cosTheta1));var cosTheta2Sq: f32=1.0-sinTheta2Sq;if (cosTheta2Sq<0.0) {return I;}\nvar cosTheta2: f32=sqrt(cosTheta2Sq);var R0: f32=getR0fromIORs(iridescenceIOR,outsideIOR);var R12: f32=fresnelSchlickGGX(cosTheta1,R0,1.);var R21: f32=R12;var T121: f32=1.0-R12;var phi12: f32=0.0;if (iridescenceIOR<outsideIOR) {phi12=PI;}\nvar phi21: f32=PI-phi12;var baseIOR: vec3f=getIORTfromAirToSurfaceR0(clamp(baseF0,vec3f(0.0),vec3f(0.9999))); \nvar R1: vec3f=getR0fromIORsVec3(baseIOR,iridescenceIOR);var R23: vec3f=fresnelSchlickGGXVec3(cosTheta2,R1, vec3f(1.));var phi23: vec3f= vec3f(0.0);if (baseIOR[0]<iridescenceIOR) {phi23[0]=PI;}\nif (baseIOR[1]<iridescenceIOR) {phi23[1]=PI;}\nif (baseIOR[2]<iridescenceIOR) {phi23[2]=PI;}\nvar opd: f32=2.0*iridescenceIOR*thinFilmThickness*cosTheta2;var phi: vec3f= vec3f(phi21)+phi23;var R123: vec3f=clamp(R12*R23,vec3f(1e-5),vec3f(0.9999));var r123: vec3f=sqrt(R123);var Rs: vec3f=(T121*T121)*R23/( vec3f(1.0)-R123);var C0: vec3f=R12+Rs;I=C0;var Cm: vec3f=Rs-T121;for (var m: i32=1; m<=2; m++)\n{Cm*=r123;var Sm: vec3f=2.0*evalSensitivity( f32(m)*opd, f32(m)*phi);I+=Cm*Sm;}\nreturn max(I, vec3f(0.0));}\n#endif\nfn normalDistributionFunction_TrowbridgeReitzGGX(NdotH: f32,alphaG: f32)->f32\n{var a2: f32=alphaG*alphaG;var d: f32=NdotH*NdotH*(a2-1.0)+1.0;return a2/(PI*d*d);}\n#ifdef SHEEN\nfn normalDistributionFunction_CharlieSheen(NdotH: f32,alphaG: f32)->f32\n{var invR: f32=1./alphaG;var cos2h: f32=NdotH*NdotH;var sin2h: f32=1.-cos2h;return (2.+invR)*pow(sin2h,invR*.5)/(2.*PI);}\n#endif\n#ifdef ANISOTROPIC\nfn normalDistributionFunction_BurleyGGX_Anisotropic(NdotH: f32,TdotH: f32,BdotH: f32,alphaTB: vec2f)->f32 {var a2: f32=alphaTB.x*alphaTB.y;var v: vec3f= vec3f(alphaTB.y*TdotH,alphaTB.x *BdotH,a2*NdotH);var v2: f32=dot(v,v);var w2: f32=a2/v2;return a2*w2*w2*RECIPROCAL_PI;}\n#endif\n#ifdef BRDF_V_HEIGHT_CORRELATED\nfn smithVisibility_GGXCorrelated(NdotL: f32,NdotV: f32,alphaG: f32)->f32 {\n#ifdef MOBILE\nvar GGXV: f32=NdotL*(NdotV*(1.0-alphaG)+alphaG);var GGXL: f32=NdotV*(NdotL*(1.0-alphaG)+alphaG);return 0.5/(GGXV+GGXL);\n#else\nvar a2: f32=alphaG*alphaG;var GGXV: f32=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2);var GGXL: f32=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2);return 0.5/(GGXV+GGXL);\n#endif\n}\n#else\nfn smithVisibilityG1_TrowbridgeReitzGGXFast(dot: f32,alphaG: f32)->f32\n{\n#ifdef MOBILE\nreturn 1.0/(dot+alphaG+(1.0-alphaG)*dot ));\n#else\nvar alphaSquared: f32=alphaG*alphaG;return 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot));\n#endif\n}\nfn smithVisibility_TrowbridgeReitzGGXFast(NdotL: f32,NdotV: f32,alphaG: f32)->f32\n{var visibility: f32=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG);return visibility;}\n#endif\n#ifdef ANISOTROPIC\nfn smithVisibility_GGXCorrelated_Anisotropic(NdotL: f32,NdotV: f32,TdotV: f32,BdotV: f32,TdotL: f32,BdotL: f32,alphaTB: vec2f)->f32 {var lambdaV: f32=NdotL*length( vec3f(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV));var lambdaL: f32=NdotV*length( vec3f(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL));var v: f32=0.5/(lambdaV+lambdaL);return v;}\n#endif\n#ifdef CLEARCOAT\nfn visibility_Kelemen(VdotH: f32)->f32 {return 0.25/(VdotH*VdotH); }\n#endif\n#ifdef SHEEN\nfn visibility_Ashikhmin(NdotL: f32,NdotV: f32)->f32\n{return 1./(4.*(NdotL+NdotV-NdotL*NdotV));}\n/* NOT USED\n#ifdef SHEEN_SOFTER\nfn l(x: f32,alphaG: f32)->f32\n{var oneMinusAlphaSq: f32=(1.0-alphaG)*(1.0-alphaG);var a: f32=mix(21.5473,25.3245,oneMinusAlphaSq);var b: f32=mix(3.82987,3.32435,oneMinusAlphaSq);var c: f32=mix(0.19823,0.16801,oneMinusAlphaSq);var d: f32=mix(-1.97760,-1.27393,oneMinusAlphaSq);var e: f32=mix(-4.32054,-4.85967,oneMinusAlphaSq);return a/(1.0+b*pow(x,c))+d*x+e;}\nfn lambdaSheen(cosTheta: f32,alphaG: f32)->f32\n{return abs(cosTheta)<0.5 ? exp(l(cosTheta,alphaG)) : exp(2.0*l(0.5,alphaG)-l(1.0-cosTheta,alphaG));}\nfn visibility_CharlieSheen(NdotL: f32,NdotV: f32,alphaG: f32)->f32\n{var G: f32=1.0/(1.0+lambdaSheen(NdotV,alphaG)+lambdaSheen(NdotL,alphaG));return G/(4.0*NdotV*NdotL);}\n#endif\n*/\n#endif\nconst constant1_FON: f32=0.5f-2.0f/(3.0f*PI);const constant2_FON: f32=2.0f/3.0f-28.0f/(15.0f*PI);fn E_FON_approx(mu: f32,roughness: f32)->f32\n{var sigma: f32=roughness; \nvar mucomp: f32=1.0f-mu;var mucomp2: f32=mucomp*mucomp;const Gcoeffs: mat2x2f=mat2x2f(0.0571085289f,-0.332181442f,\n0.491881867f,0.0714429953f);var GoverPi: f32=dot(Gcoeffs*vec2f(mucomp,mucomp2),vec2f(1.0f,mucomp2));return (1.0f+sigma*GoverPi)/(1.0f+constant1_FON*sigma);}\nfn diffuseBRDF_EON(albedo: vec3f,roughness: f32,NdotL: f32,NdotV: f32,LdotV: f32)->vec3f\n{var rho: vec3f=albedo;var sigma: f32=roughness; \nvar mu_i: f32=NdotL; \nvar mu_o: f32=NdotV; \nvar s: f32=LdotV-mu_i*mu_o; \nvar sovertF: f32=select(s,s/max(mu_i,mu_o),s>0.0f); \nvar AF: f32=1.0f/(1.0f+constant1_FON*sigma); \nvar f_ss: vec3f=(rho*RECIPROCAL_PI)*AF*(1.0f+sigma*sovertF); \nvar EFo: f32=E_FON_approx(mu_o,sigma); \nvar EFi: f32=E_FON_approx(mu_i,sigma); \nvar avgEF: f32=AF*(1.0f+constant2_FON*sigma); \nvar rho_ms: vec3f=(rho*rho)*avgEF/(vec3f(1.0f)-rho*(1.0f-avgEF));const eps: f32=1.0e-7f;var f_ms: vec3f=(rho_ms*RECIPROCAL_PI)*max(eps,1.0f-EFo) \n* max(eps,1.0f-EFi)\n/ max(eps,1.0f-avgEF);return (f_ss+f_ms);}\nfn diffuseBRDF_Burley(NdotL: f32,NdotV: f32,VdotH: f32,roughness: f32)->f32 {var diffuseFresnelNV: f32=pow5(saturateEps(1.0-NdotL));var diffuseFresnelNL: f32=pow5(saturateEps(1.0-NdotV));var diffuseFresnel90: f32=0.5+2.0*VdotH*VdotH*roughness;var fresnel: f32 =\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) *\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV);return fresnel/PI;}\n#ifdef SS_TRANSLUCENCY\nfn transmittanceBRDF_Burley(tintColor: vec3f,diffusionDistance: vec3f,thickness: f32)->vec3f {var S: vec3f=1./maxEpsVec3(diffusionDistance);var temp: vec3f=exp((-0.333333333*thickness)*S);return tintColor.rgb*0.25*(temp*temp*temp+3.0*temp);}\nfn computeWrappedDiffuseNdotL(NdotL: f32,w: f32)->f32 {var t: f32=1.0+w;var invt2: f32=1.0/(t*t);return saturate((NdotL+w)*invt2);}\n#endif\n#endif \n";r.v.IncludesShadersStoreWGSL[a]||(r.v.IncludesShadersStoreWGSL[a]=t)},34486:(e,n,f)=>{f.r(n),f.d(n,{hdrIrradianceFilteringPixelShaderWGSL:()=>i});var r=f(17416);f(22842),f(5442),f(34366),f(58632);const a="hdrIrradianceFilteringPixelShader",t="#include<helperFunctions>\n#include<importanceSampling>\n#include<pbrBRDFFunctions>\n#include<hdrFilteringFunctions>\nvar inputTextureSampler: sampler;var inputTexture: texture_cube<f32>;\n#ifdef IBL_CDF_FILTERING\nvar icdfTextureSampler: sampler;var icdfTexture: texture_2d<f32>;\n#endif\nuniform vFilteringInfo: vec2f;uniform hdrScale: f32;varying direction: vec3f;@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var color: vec3f=irradiance(inputTexture,inputTextureSampler,input.direction,uniforms.vFilteringInfo,0.0,vec3f(1.0),input.direction\n#ifdef IBL_CDF_FILTERING\n,icdfTexture,icdfTextureSampler\n#endif\n);fragmentOutputs.color= vec4f(color*uniforms.hdrScale,1.0);}";r.v.ShadersStoreWGSL[a]||(r.v.ShadersStoreWGSL[a]=t);const i={name:a,shader:t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4486 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4555.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4555],{44555:(t,e,i)=>{i.r(e),i.d(e,{FlowGraphMultiGateBlock:()=>FlowGraphMultiGateBlock});var s=i(20538),n=i(17693),a=i(39426),l=i(234);class FlowGraphMultiGateBlock extends n.Q{constructor(t){super(t),this.config=t,this.outputSignals=[],this.reset=this._registerSignalInput("reset"),this.lastIndex=this.registerDataOutput("lastIndex",a.fj,new l.K(-1)),this.setNumberOfOutputSignals(t?.outputSignalCount)}_getNextIndex(t){if(t.includes(!1)||this.config.isLoop&&t.fill(!1),this.config.isRandom){const e=t.map(((t,e)=>t?-1:e)).filter((t=>-1!==t));return e.length?e[Math.floor(Math.random()*e.length)]:-1}return t.indexOf(!1)}setNumberOfOutputSignals(t=1){for(;this.outputSignals.length>t;){const t=this.outputSignals.pop();t&&(t.disconnectFromAll(),this._unregisterSignalOutput(t.name))}for(;this.outputSignals.length<t;)this.outputSignals.push(this._registerSignalOutput(`out_${this.outputSignals.length}`))}_execute(t,e){if(t._hasExecutionVariable(this,"indexesUsed")||t._setExecutionVariable(this,"indexesUsed",this.outputSignals.map((()=>!1))),e===this.reset)return t._deleteExecutionVariable(this,"indexesUsed"),void this.lastIndex.setValue(new l.K(-1),t);const i=t._getExecutionVariable(this,"indexesUsed",[]),s=this._getNextIndex(i);s>-1&&(this.lastIndex.setValue(new l.K(s),t),i[s]=!0,t._setExecutionVariable(this,"indexesUsed",i),this.outputSignals[s]._activateSignal(t))}getClassName(){return"FlowGraphMultiGateBlock"}serialize(t){super.serialize(t),t.config.outputSignalCount=this.config.outputSignalCount,t.config.isRandom=this.config.isRandom,t.config.loop=this.config.isLoop,t.config.startIndex=this.config.startIndex}}(0,s.H7)("FlowGraphMultiGateBlock",FlowGraphMultiGateBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4555 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4560.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4560],{94560:(a,e,r)=>{r.r(e),r.d(e,{FlowGraphSetVariableBlock:()=>FlowGraphSetVariableBlock});var i=r(20538),t=r(36442),l=r(39426);class FlowGraphSetVariableBlock extends t.F{constructor(a){if(super(a),!a.variable&&!a.variables)throw new Error("FlowGraphSetVariableBlock: variable/variables is not defined");if(a.variables&&a.variable)throw new Error("FlowGraphSetVariableBlock: variable and variables are both defined");if(a.variables)for(const e of a.variables)this.registerDataInput(e,l.s8);else this.registerDataInput("value",l.s8)}_execute(a,e){if(this.config?.variables)for(const e of this.config.variables)this._saveVariable(a,e);else this._saveVariable(a,this.config?.variable,"value");this.out._activateSignal(a)}_saveVariable(a,e,r){const i=a._getGlobalContextVariable("currentlyRunningAnimationGroups",[]);for(const r of i){const t=a.assetsContext.animationGroups[r];for(const l of t.targetedAnimations)if(l.target===a&&l.target===a&&l.animation.targetProperty===e){t.stop();const e=i.indexOf(r);e>-1&&i.splice(e,1),a._setGlobalContextVariable("currentlyRunningAnimationGroups",i);break}}const t=this.getDataInput(r||e)?.getValue(a);a.setVariable(e,t)}getClassName(){return"FlowGraphSetVariableBlock"}serialize(a){super.serialize(a),a.config.variable=this.config?.variable}}(0,i.H7)("FlowGraphSetVariableBlock",FlowGraphSetVariableBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4560 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4667.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4667],{64667:(t,e,a)=>{a.r(e),a.d(e,{FlowGraphDeterminantBlock:()=>FlowGraphDeterminantBlock,FlowGraphInvertMatrixBlock:()=>FlowGraphInvertMatrixBlock,FlowGraphMatrixComposeBlock:()=>FlowGraphMatrixComposeBlock,FlowGraphMatrixDecomposeBlock:()=>FlowGraphMatrixDecomposeBlock,FlowGraphMatrixMultiplicationBlock:()=>FlowGraphMatrixMultiplicationBlock,FlowGraphTransposeBlock:()=>FlowGraphTransposeBlock});var i=a(43890),s=a(39426),o=a(49486),r=a(20538),l=a(86562),n=a(41554);class FlowGraphTransposeBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(t=>t.transpose?t.transpose():o.y3.Transpose(t)),"FlowGraphTransposeBlock",t)}}(0,r.H7)("FlowGraphTransposeBlock",FlowGraphTransposeBlock);class FlowGraphDeterminantBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),s.ab,(t=>t.determinant()),"FlowGraphDeterminantBlock",t)}}(0,r.H7)("FlowGraphDeterminantBlock",FlowGraphDeterminantBlock);class FlowGraphInvertMatrixBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(t=>t.inverse?t.inverse():o.y3.Invert(t)),"FlowGraphInvertMatrixBlock",t)}}(0,r.H7)("FlowGraphInvertMatrixBlock",FlowGraphInvertMatrixBlock);class FlowGraphMatrixMultiplicationBlock extends n.V{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),((t,e)=>e.multiply(t)),"FlowGraphMatrixMultiplicationBlock",t)}}(0,r.H7)("FlowGraphMatrixMultiplicationBlock",FlowGraphMatrixMultiplicationBlock);class FlowGraphMatrixDecomposeBlock extends i.A{constructor(t){super(t),this.input=this.registerDataInput("input",s.WT),this.position=this.registerDataOutput("position",s.FO),this.rotationQuaternion=this.registerDataOutput("rotationQuaternion",s.N3),this.scaling=this.registerDataOutput("scaling",s.FO),this.isValid=this.registerDataOutput("isValid",s.PE,!1)}_updateOutputs(t){const e=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedPosition",null),i=t._getExecutionVariable(this,"cachedRotation",null),s=t._getExecutionVariable(this,"cachedScaling",null);if(e===t.executionId&&a&&i&&s)this.position.setValue(a,t),this.rotationQuaternion.setValue(i,t),this.scaling.setValue(s,t);else{const e=this.input.getValue(t),r=a||new o.P,l=i||new o._f,n=s||new o.P,c=Math.round(1e4*e.m[3])/1e4,u=Math.round(1e4*e.m[7])/1e4,h=Math.round(1e4*e.m[11])/1e4,p=Math.round(1e4*e.m[15])/1e4;if(0!==c||0!==u||0!==h||1!==p)return this.isValid.setValue(!1,t),this.position.setValue(o.P.Zero(),t),this.rotationQuaternion.setValue(o._f.Identity(),t),void this.scaling.setValue(o.P.One(),t);const x=e.decompose(n,l,r);this.isValid.setValue(x,t),this.position.setValue(r,t),this.rotationQuaternion.setValue(l,t),this.scaling.setValue(n,t),t._setExecutionVariable(this,"cachedPosition",r),t._setExecutionVariable(this,"cachedRotation",l),t._setExecutionVariable(this,"cachedScaling",n),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixDecompose"}}(0,r.H7)("FlowGraphMatrixDecompose",FlowGraphMatrixDecomposeBlock);class FlowGraphMatrixComposeBlock extends i.A{constructor(t){super(t),this.position=this.registerDataInput("position",s.FO),this.rotationQuaternion=this.registerDataInput("rotationQuaternion",s.N3),this.scaling=this.registerDataInput("scaling",s.FO),this.value=this.registerDataOutput("value",s.WT)}_updateOutputs(t){const e=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedMatrix",null);if(e===t.executionId&&a)this.value.setValue(a,t);else{const e=o.y3.Compose(this.scaling.getValue(t),this.rotationQuaternion.getValue(t),this.position.getValue(t));this.value.setValue(e,t),t._setExecutionVariable(this,"cachedMatrix",e),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixCompose"}}(0,r.H7)("FlowGraphMatrixCompose",FlowGraphMatrixComposeBlock)},41554:(t,e,a)=>{a.d(e,{V:()=>FlowGraphBinaryOperationBlock});var i=a(49492);class FlowGraphBinaryOperationBlock extends i.D{constructor(t,e,a,i,s,o){super(a,o),this._operation=i,this._className=s,this.a=this.registerDataInput("a",t),this.b=this.registerDataInput("b",e)}_doOperation(t){const e=this.a.getValue(t),a=this.b.getValue(t);return this._operation(e,a)}getClassName(){return this._className}}},49492:(t,e,a)=>{a.d(e,{D:()=>FlowGraphCachedOperationBlock});var i=a(43890),s=a(39426);const o="cachedOperationValue",r="cachedExecutionId";class FlowGraphCachedOperationBlock extends i.A{constructor(t,e){super(e),this.value=this.registerDataOutput("value",t),this.isValid=this.registerDataOutput("isValid",s.PE)}_updateOutputs(t){const e=t._getExecutionVariable(this,r,-1),a=t._getExecutionVariable(this,o,null);if(null!=a&&e===t.executionId)this.isValid.setValue(!0,t),this.value.setValue(a,t);else try{const e=this._doOperation(t);if(null==e)return void this.isValid.setValue(!1,t);t._setExecutionVariable(this,o,e),t._setExecutionVariable(this,r,t.executionId),this.value.setValue(e,t),this.isValid.setValue(!0,t)}catch(e){this.isValid.setValue(!1,t)}}}},86562:(t,e,a)=>{a.d(e,{p:()=>FlowGraphUnaryOperationBlock});var i=a(49492);class FlowGraphUnaryOperationBlock extends i.D{constructor(t,e,a,i,s){super(e,s),this._operation=a,this._className=i,this.a=this.registerDataInput("a",t)}_doOperation(t){return this._operation(this.a.getValue(t))}getClassName(){return this._className}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4667 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4806.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4806],{44806:(t,e,l)=>{l.r(e),l.d(e,{FlowGraphCallCounterBlock:()=>FlowGraphCallCounterBlock});var a=l(39426),s=l(36442),r=l(20538);class FlowGraphCallCounterBlock extends s.F{constructor(t){super(t),this.count=this.registerDataOutput("count",a.ab),this.reset=this._registerSignalInput("reset")}_execute(t,e){if(e===this.reset)return t._setExecutionVariable(this,"count",0),void this.count.setValue(0,t);const l=t._getExecutionVariable(this,"count",0)+1;t._setExecutionVariable(this,"count",l),this.count.setValue(l,t),this.out._activateSignal(t)}getClassName(){return"FlowGraphCallCounterBlock"}}(0,r.H7)("FlowGraphCallCounterBlock",FlowGraphCallCounterBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4806 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4953.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4953],{64953:(e,i,r)=>{r.r(i),r.d(i,{hdrIrradianceFilteringVertexShader:()=>o});var n=r(17416);const t="hdrIrradianceFilteringVertexShader",a="attribute vec2 position;varying vec3 direction;uniform vec3 up;uniform vec3 right;uniform vec3 front;\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nmat3 view=mat3(up,right,front);direction=view*vec3(position,1.0);gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";n.v.ShadersStore[t]||(n.v.ShadersStore[t]=a);const o={name:t,shader:a}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:4953 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5197.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5197],{95197:(e,s,t)=>{t.r(s),t.d(s,{FlowGraphConsoleLogBlock:()=>FlowGraphConsoleLogBlock});var o=t(36442),a=t(39426),l=t(20538),r=t(3146);class FlowGraphConsoleLogBlock extends o.F{constructor(e){if(super(e),this.message=this.registerDataInput("message",a.s8),this.logType=this.registerDataInput("logType",a.s8,"log"),e?.messageTemplate){const s=this._getTemplateMatches(e.messageTemplate);for(const e of s)this.registerDataInput(e,a.s8)}}_execute(e){const s=this.logType.getValue(e),t=this._getMessageValue(e);"warn"===s?r.Y.Warn(t):"error"===s?r.Y.Error(t):r.Y.Log(t),this.out._activateSignal(e)}getClassName(){return"FlowGraphConsoleLogBlock"}_getMessageValue(e){if(this.config?.messageTemplate){let s=this.config.messageTemplate;const t=this._getTemplateMatches(s);for(const o of t){const t=this.getDataInput(o)?.getValue(e);void 0!==t&&(s=s.replace(new RegExp(`\\{${o}\\}`,"g"),t.toString()))}return s}return this.message.getValue(e)}_getTemplateMatches(e){const s=/\{([^}]+)\}/g,t=[];let o;for(;null!==(o=s.exec(e));)t.push(o[1]);return t}}(0,l.H7)("FlowGraphConsoleLogBlock",FlowGraphConsoleLogBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5197 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 539.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[539],{10539:(e,t,i)=>{i.r(t),i.d(t,{FlowGraphBezierCurveEasingBlock:()=>FlowGraphBezierCurveEasingBlock});var s=i(48309),n=i(43890),r=i(39426),o=i(20538);class FlowGraphBezierCurveEasingBlock extends n.A{constructor(e){super(e),this.config=e,this._easingFunctions={},this.mode=this.registerDataInput("mode",r.ab,0),this.controlPoint1=this.registerDataInput("controlPoint1",r.rh),this.controlPoint2=this.registerDataInput("controlPoint2",r.rh),this.easingFunction=this.registerDataOutput("easingFunction",r.s8)}_updateOutputs(e){const t=this.mode.getValue(e),i=this.controlPoint1.getValue(e),n=this.controlPoint2.getValue(e);if(void 0===t)return;const r=`${t}-${i.x}-${i.y}-${n.x}-${n.y}`;if(!this._easingFunctions[r]){const e=new s.sj(i.x,i.y,n.x,n.y);e.setEasingMode(t),this._easingFunctions[r]=e}this.easingFunction.setValue(this._easingFunctions[r],e)}getClassName(){return"FlowGraphBezierCurveEasing"}}(0,o.H7)("FlowGraphBezierCurveEasing",FlowGraphBezierCurveEasingBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:539 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5477.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5477],{55477:(e,r,i)=>{i.r(r),i.d(r,{iblCdfDebugPixelShader:()=>f});var c=i(17416);const t="iblCdfDebugPixelShader",o="precision highp samplerCube;\n#define PI 3.1415927\nvarying vec2 vUV;uniform sampler2D cdfy;uniform sampler2D cdfx;uniform sampler2D icdf;uniform sampler2D pdf;\n#ifdef IBL_USE_CUBE_MAP\nuniform samplerCube iblSource;\n#else\nuniform sampler2D iblSource;\n#endif\nuniform sampler2D textureSampler;\n#define cdfyVSize (0.8/3.0)\n#define cdfxVSize 0.1\n#define cdfyHSize 0.5\nuniform vec4 sizeParams;\n#define offsetX sizeParams.x\n#define offsetY sizeParams.y\n#define widthScale sizeParams.z\n#define heightScale sizeParams.w\n#ifdef IBL_USE_CUBE_MAP\nvec3 equirectangularToCubemapDirection(vec2 uv) {float longitude=uv.x*2.0*PI-PI;float latitude=PI*0.5-uv.y*PI;vec3 direction;direction.x=cos(latitude)*sin(longitude);direction.y=sin(latitude);direction.z=cos(latitude)*cos(longitude);return direction;}\n#endif\nvoid main(void) {vec3 colour=vec3(0.0);vec2 uv =\nvec2((offsetX+vUV.x)*widthScale,(offsetY+vUV.y)*heightScale);vec3 backgroundColour=texture2D(textureSampler,vUV).rgb;int cdfxWidth=textureSize(cdfx,0).x;int cdfyHeight=textureSize(cdfy,0).y;const float iblStart=1.0-cdfyVSize;const float pdfStart=1.0-2.0*cdfyVSize;const float cdfyStart=1.0-3.0*cdfyVSize;const float cdfxStart=1.0-3.0*cdfyVSize-cdfxVSize;const float icdfxStart=1.0-3.0*cdfyVSize-2.0*cdfxVSize;\n#ifdef IBL_USE_CUBE_MAP\nvec3 direction=equirectangularToCubemapDirection(\n(uv-vec2(0.0,iblStart))*vec2(1.0,1.0/cdfyVSize));vec3 iblColour=textureCubeLodEXT(iblSource,direction,0.0).rgb;\n#else\nvec3 iblColour=texture2D(iblSource,(uv-vec2(0.0,iblStart)) *\nvec2(1.0,1.0/cdfyVSize))\n.rgb;\n#endif\nvec3 pdfColour=texture(icdf,(uv-vec2(0.0,pdfStart)) *\nvec2(1.0,1.0/cdfyVSize)).zzz;float cdfyColour =\ntexture2D(cdfy,(uv-vec2(0.0,cdfyStart))*vec2(2.0,1.0/cdfyVSize))\n.r;float icdfyColour =\ntexture2D(icdf,(uv-vec2(0.5,cdfyStart))*vec2(2.0,1.0/cdfyVSize))\n.g;float cdfxColour =\ntexture2D(cdfx,(uv-vec2(0.0,cdfxStart))*vec2(1.0,1.0/cdfxVSize))\n.r;float icdfxColour=texture2D(icdf,(uv-vec2(0.0,icdfxStart)) *\nvec2(1.0,1.0/cdfxVSize))\n.r;if (uv.x<0.0 || uv.x>1.0 || uv.y<0.0 || uv.y>1.0) {colour=backgroundColour;} else if (uv.y>iblStart) {colour+=iblColour;} else if (uv.y>pdfStart) {colour+=pdfColour;} else if (uv.y>cdfyStart && uv.x<0.5) {colour.r+=cdfyColour/float(cdfyHeight);} else if (uv.y>cdfyStart && uv.x>0.5) {colour.r+=icdfyColour;} else if (uv.y>cdfxStart) {colour.r+=cdfxColour/float(cdfxWidth);} else if (uv.y>icdfxStart) {colour.r+=icdfxColour;}\ngl_FragColor=vec4(colour,1.0);glFragColor.rgb=mix(gl_FragColor.rgb,backgroundColour,0.5);}\n";c.v.ShadersStore[t]||(c.v.ShadersStore[t]=o);const f={name:t,shader:o}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5477 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5645.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5645],{55645:(e,r,t)=>{t.r(r),t.d(r,{iblCdfxPixelShaderWGSL:()=>s});var n=t(17416);const a="iblCdfxPixelShader",f="#define PI 3.1415927\nvarying vUV: vec2f;var cdfy: texture_2d<f32>;@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var cdfyRes=textureDimensions(cdfy,0);var currentPixel=vec2u(fragmentInputs.position.xy);var cdfx: f32=0.0;for (var x: u32=1; x<=currentPixel.x; x++) {cdfx+=textureLoad(cdfy, vec2u(x-1,cdfyRes.y-1),0).x;}\nfragmentOutputs.color= vec4f( vec3f(cdfx),1.0);}";n.v.ShadersStoreWGSL[a]||(n.v.ShadersStoreWGSL[a]=f);const s={name:a,shader:f}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5645 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5650.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5650],{85650:(e,a,l)=>{l.r(a),l.d(a,{FlowGraphCancelDelayBlock:()=>FlowGraphCancelDelayBlock});var t=l(20538),s=l(36442),r=l(39426),n=l(7181);class FlowGraphCancelDelayBlock extends s.F{constructor(e){super(e),this.delayIndex=this.registerDataInput("delayIndex",r.fj)}_execute(e,a){const l=(0,n.J0)(this.delayIndex.getValue(e));if(l<=0||isNaN(l)||!isFinite(l))return this._reportError(e,"Invalid delay index");const t=e._getGlobalContextVariable("pendingDelays",[])[l];t&&t.dispose(),this.out._activateSignal(e)}getClassName(){return"FlowGraphCancelDelayBlock"}}(0,t.H7)("FlowGraphCancelDelayBlock",FlowGraphCancelDelayBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5650 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5746.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5746],{6216:(e,n,o)=>{var f=o(17416);const r="fogFragment",a="#ifdef FOG\nfloat fog=CalcFogFactor();\n#ifdef PBR\nfog=toLinearSpace(fog);\n#endif\ncolor.rgb=mix(vFogColor,color.rgb,fog);\n#endif\n";f.v.IncludesShadersStore[r]||(f.v.IncludesShadersStore[r]=a)},2302:(e,n,o)=>{var f=o(17416);const r="fogFragmentDeclaration",a="#ifdef FOG\n#define FOGMODE_NONE 0.\n#define FOGMODE_EXP 1.\n#define FOGMODE_EXP2 2.\n#define FOGMODE_LINEAR 3.\n#define E 2.71828\nuniform vec4 vFogInfos;uniform vec3 vFogColor;varying vec3 vFogDistance;float CalcFogFactor()\n{float fogCoeff=1.0;float fogStart=vFogInfos.y;float fogEnd=vFogInfos.z;float fogDensity=vFogInfos.w;float fogDistance=length(vFogDistance);if (FOGMODE_LINEAR==vFogInfos.x)\n{fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart);}\nelse if (FOGMODE_EXP==vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDensity);}\nelse if (FOGMODE_EXP2==vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);}\nreturn clamp(fogCoeff,0.0,1.0);}\n#endif\n";f.v.IncludesShadersStore[r]||(f.v.IncludesShadersStore[r]=a)},89481:(e,n,o)=>{var f=o(17416);const r="logDepthDeclaration",a="#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;varying float vFragmentDepth;\n#endif\n";f.v.IncludesShadersStore[r]||(f.v.IncludesShadersStore[r]=a)},66564:(e,n,o)=>{var f=o(17416);const r="logDepthFragment",a="#ifdef LOGARITHMICDEPTH\ngl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;\n#endif\n";f.v.IncludesShadersStore[r]||(f.v.IncludesShadersStore[r]=a)},75746:(e,n,o)=>{o.r(n),o.d(n,{spritesPixelShader:()=>t});var f=o(17416);o(2302),o(89481),o(66564),o(6216);const r="#ifdef IMAGEPROCESSINGPOSTPROCESS\ngl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(2.2));\n#endif\n";f.v.IncludesShadersStore.imageProcessingCompatibility||(f.v.IncludesShadersStore.imageProcessingCompatibility=r);const a="spritesPixelShader",i="#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\nuniform bool alphaTest;varying vec4 vColor;varying vec2 vUV;uniform sampler2D diffuseSampler;\n#include<fogFragmentDeclaration>\n#include<logDepthDeclaration>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n#ifdef PIXEL_PERFECT\nvec2 uvPixelPerfect(vec2 uv) {vec2 res=vec2(textureSize(diffuseSampler,0));uv=uv*res;vec2 seam=floor(uv+0.5);uv=seam+clamp((uv-seam)/fwidth(uv),-0.5,0.5);return uv/res;}\n#endif\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#ifdef PIXEL_PERFECT\nvec2 uv=uvPixelPerfect(vUV);\n#else\nvec2 uv=vUV;\n#endif\nvec4 color=texture2D(diffuseSampler,uv);float fAlphaTest=float(alphaTest);if (fAlphaTest != 0.)\n{if (color.a<0.95)\ndiscard;}\ncolor*=vColor;\n#include<logDepthFragment>\n#include<fogFragment>\ngl_FragColor=color;\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}";f.v.ShadersStore.spritesPixelShader||(f.v.ShadersStore.spritesPixelShader=i);const t={name:a,shader:i}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5746 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5779.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5779],{65779:(e,n,r)=>{r.r(n),r.d(n,{iblCdfyPixelShaderWGSL:()=>c});var i=r(17416);const t="iblCdfyPixelShader",a="varying vUV : vec2f;\n#include <helperFunctions>\n#ifdef IBL_USE_CUBE_MAP\nvar iblSourceSampler: sampler;var iblSource: texture_cube<f32>;\n#else\nvar iblSourceSampler: sampler;var iblSource: texture_2d<f32>;\n#endif\nuniform iblHeight: i32;\n#ifdef IBL_USE_CUBE_MAP\nfn fetchCube(uv: vec2f)->f32 {var direction: vec3f=equirectangularToCubemapDirection(uv);return sin(PI*uv.y) *\ndot(textureSampleLevel(iblSource,iblSourceSampler,direction,0.0)\n.rgb,\nLuminanceEncodeApprox);}\n#else\nfn fetchPanoramic(Coords: vec2i,envmapHeight: f32)->f32 {return sin(PI*(f32(Coords.y)+0.5)/envmapHeight) *\ndot(textureLoad(iblSource,Coords,0).rgb,LuminanceEncodeApprox);}\n#endif\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var coords: vec2i= vec2i(fragmentInputs.position.xy);var cdfy: f32=0.0;for (var y: i32=1; y<=coords.y; y++) {\n#ifdef IBL_USE_CUBE_MAP\nvar uv: vec2f= vec2f(input.vUV.x,( f32(y-1)+0.5)/ f32(uniforms.iblHeight));cdfy+=fetchCube(uv);\n#else\ncdfy+=fetchPanoramic( vec2i(coords.x,y-1), f32(uniforms.iblHeight));\n#endif\n}\nfragmentOutputs.color= vec4f(cdfy,0.0,0.0,1.0);}";i.v.ShadersStoreWGSL[t]||(i.v.ShadersStoreWGSL[t]=a);const c={name:t,shader:a}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5779 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5880.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5880],{55880:(e,t,n)=>{n.r(t),n.d(t,{FlowGraphFunctionReferenceBlock:()=>FlowGraphFunctionReferenceBlock});var s=n(43890),u=n(39426),i=n(20538);class FlowGraphFunctionReferenceBlock extends s.A{constructor(e){super(e),this.functionName=this.registerDataInput("functionName",u.w9),this.object=this.registerDataInput("object",u.s8),this.context=this.registerDataInput("context",u.s8,null),this.output=this.registerDataOutput("output",u.s8)}_updateOutputs(e){const t=this.functionName.getValue(e),n=this.object.getValue(e),s=this.context.getValue(e);if(n&&t){const u=n[t];u&&"function"==typeof u&&this.output.setValue(u.bind(s),e)}}getClassName(){return"FlowGraphFunctionReference"}}(0,i.H7)("FlowGraphFunctionReference",FlowGraphFunctionReferenceBlock)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5880 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 5925.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5925],{97555:(e,t,r)=>{var o=r(17416);const n="fogFragment",i="#ifdef FOG\nvar fog: f32=CalcFogFactor();\n#ifdef PBR\nfog=toLinearSpace(fog);\n#endif\ncolor= vec4f(mix(uniforms.vFogColor,color.rgb,fog),color.a);\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},80750:(e,t,r)=>{var o=r(17416);const n="fogFragmentDeclaration",i="#ifdef FOG\n#define FOGMODE_NONE 0.\n#define FOGMODE_EXP 1.\n#define FOGMODE_EXP2 2.\n#define FOGMODE_LINEAR 3.\nconst E=2.71828;uniform vFogInfos: vec4f;uniform vFogColor: vec3f;varying vFogDistance: vec3f;fn CalcFogFactor()->f32\n{var fogCoeff: f32=1.0;var fogStart: f32=uniforms.vFogInfos.y;var fogEnd: f32=uniforms.vFogInfos.z;var fogDensity: f32=uniforms.vFogInfos.w;var fogDistance: f32=length(fragmentInputs.vFogDistance);if (FOGMODE_LINEAR==uniforms.vFogInfos.x)\n{fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart);}\nelse if (FOGMODE_EXP==uniforms.vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDensity);}\nelse if (FOGMODE_EXP2==uniforms.vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);}\nreturn clamp(fogCoeff,0.0,1.0);}\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},31596:(e,t,r)=>{var o=r(17416);const n="imageProcessingDeclaration",i="#ifdef EXPOSURE\nuniform exposureLinear: f32;\n#endif\n#ifdef CONTRAST\nuniform contrast: f32;\n#endif\n#if defined(VIGNETTE) || defined(DITHER)\nuniform vInverseScreenSize: vec2f;\n#endif\n#ifdef VIGNETTE\nuniform vignetteSettings1: vec4f;uniform vignetteSettings2: vec4f;\n#endif\n#ifdef COLORCURVES\nuniform vCameraColorCurveNegative: vec4f;uniform vCameraColorCurveNeutral: vec4f;uniform vCameraColorCurvePositive: vec4f;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nvar txColorTransformSampler: sampler;var txColorTransform: texture_3d<f32>;\n#else\nvar txColorTransformSampler: sampler;var txColorTransform: texture_2d<f32>;\n#endif\nuniform colorTransformSettings: vec4f;\n#endif\n#ifdef DITHER\nuniform ditherIntensity: f32;\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},81916:(e,t,r)=>{var o=r(17416);const n="imageProcessingFunctions",i="#if TONEMAPPING==3\nconst PBRNeutralStartCompression: f32=0.8-0.04;const PBRNeutralDesaturation: f32=0.15;fn PBRNeutralToneMapping( color: vec3f )->vec3f {var x: f32=min(color.r,min(color.g,color.b));var offset: f32=select(0.04,x-6.25*x*x,x<0.08);var result=color;result-=offset;var peak: f32=max(result.r,max(result.g,result.b));if (peak<PBRNeutralStartCompression) {return result;}\nvar d: f32=1.-PBRNeutralStartCompression;var newPeak: f32=1.-d*d/(peak+d-PBRNeutralStartCompression);result*=newPeak/peak;var g: f32=1.-1./(PBRNeutralDesaturation*(peak-newPeak)+1.);return mix(result,newPeak* vec3f(1,1,1),g);}\n#endif\n#if TONEMAPPING==2\nconst ACESInputMat: mat3x3f= mat3x3f(\nvec3f(0.59719,0.07600,0.02840),\nvec3f(0.35458,0.90834,0.13383),\nvec3f(0.04823,0.01566,0.83777)\n);const ACESOutputMat: mat3x3f= mat3x3f(\nvec3f( 1.60475,-0.10208,-0.00327),\nvec3f(-0.53108, 1.10813,-0.07276),\nvec3f(-0.07367,-0.00605, 1.07602)\n);fn RRTAndODTFit(v: vec3f)->vec3f\n{var a: vec3f=v*(v+0.0245786)-0.000090537;var b: vec3f=v*(0.983729*v+0.4329510)+0.238081;return a/b;}\nfn ACESFitted(color: vec3f)->vec3f\n{var output=ACESInputMat*color;output=RRTAndODTFit(output);output=ACESOutputMat*output;output=saturateVec3(output);return output;}\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_DEFINITIONS\nfn applyImageProcessing(result: vec4f)->vec4f {\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATSTART\nvar rgb=result.rgb;;\n#ifdef EXPOSURE\nrgb*=uniforms.exposureLinear;\n#endif\n#ifdef VIGNETTE\nvar viewportXY: vec2f=fragmentInputs.position.xy*uniforms.vInverseScreenSize;viewportXY=viewportXY*2.0-1.0;var vignetteXY1: vec3f= vec3f(viewportXY*uniforms.vignetteSettings1.xy+uniforms.vignetteSettings1.zw,1.0);var vignetteTerm: f32=dot(vignetteXY1,vignetteXY1);var vignette: f32=pow(vignetteTerm,uniforms.vignetteSettings2.w);var vignetteColor: vec3f=uniforms.vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvar vignetteColorMultiplier: vec3f=mix(vignetteColor, vec3f(1,1,1),vignette);rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nrgb=mix(vignetteColor,rgb,vignette);\n#endif\n#endif\n#if TONEMAPPING==3\nrgb=PBRNeutralToneMapping(rgb);\n#elif TONEMAPPING==2\nrgb=ACESFitted(rgb);\n#elif TONEMAPPING==1\nconst tonemappingCalibration: f32=1.590579;rgb=1.0-exp2(-tonemappingCalibration*rgb);\n#endif\nrgb=toGammaSpaceVec3(rgb);rgb=saturateVec3(rgb);\n#ifdef CONTRAST\nvar resultHighContrast: vec3f=rgb*rgb*(3.0-2.0*rgb);if (uniforms.contrast<1.0) {rgb=mix( vec3f(0.5,0.5,0.5),rgb,uniforms.contrast);} else {rgb=mix(rgb,resultHighContrast,uniforms.contrast-1.0);}\n#endif\n#ifdef COLORGRADING\nvar colorTransformInput: vec3f=rgb*uniforms.colorTransformSettings.xxx+uniforms.colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput).rgb;\n#else\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput,uniforms.colorTransformSettings.yz).rgb;\n#endif\nrgb=mix(rgb,colorTransformOutput,uniforms.colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\nvar luma: f32=getLuminance(rgb);var curveMix: vec2f=clamp( vec2f(luma*3.0-1.5,luma*-3.0+1.5), vec2f(0.0), vec2f(1.0));var colorCurve: vec4f=uniforms.vCameraColorCurveNeutral+curveMix.x*uniforms.vCameraColorCurvePositive-curveMix.y*uniforms.vCameraColorCurveNegative;rgb*=colorCurve.rgb;rgb=mix( vec3f(luma),rgb,colorCurve.a);\n#endif\n#ifdef DITHER\nvar rand: f32=getRand(fragmentInputs.position.xy*uniforms.vInverseScreenSize);var dither: f32=mix(-uniforms.ditherIntensity,uniforms.ditherIntensity,rand);rgb=saturateVec3(rgb+ vec3f(dither));\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATEND\nreturn vec4f(rgb,result.a);}";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},82796:(e,t,r)=>{var o=r(17416);const n="lightFragment",i="#ifdef LIGHT{X}\n#if defined(SHADOWONLY) || defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X})\n#else\nvar diffuse{X}: vec4f=light{X}.vLightDiffuse;\n#define CUSTOM_LIGHT{X}_COLOR \n#ifdef PBR\n#ifdef SPOTLIGHT{X}\npreInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW,fragmentInputs.vPositionW);\n#elif defined(POINTLIGHT{X})\npreInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW,fragmentInputs.vPositionW);\n#elif defined(HEMILIGHT{X})\npreInfo=computeHemisphericPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#elif defined(DIRLIGHT{X})\npreInfo=computeDirectionalPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#elif defined(AREALIGHT{X}) && defined(AREALIGHTSUPPORTED)\npreInfo=computeAreaPreLightingInfo(areaLightsLTC1Sampler,areaLightsLTC1SamplerSampler,areaLightsLTC2Sampler,areaLightsLTC2SamplerSampler,viewDirectionW,normalW,fragmentInputs.vPositionW,light{X}.vLightData.xyz,light{X}.vLightWidth.xyz,light{X}.vLightHeight.xyz,roughness);\n#endif\npreInfo.NdotV=NdotV;\n#ifdef SPOTLIGHT{X}\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);\n#ifdef IESLIGHTTEXTURE{X}\npreInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);\n#else\npreInfo.attenuation*=computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\n#endif\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\n#ifdef IESLIGHTTEXTURE{X}\npreInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);\n#else\npreInfo.attenuation*=computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w);\n#endif\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);\n#ifdef IESLIGHTTEXTURE{X}\npreInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);\n#else\npreInfo.attenuation*=computeDirectionalLightFalloff_Standard(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w);\n#endif\n#else\npreInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);\n#ifdef IESLIGHTTEXTURE{X}\npreInfo.attenuation*=computeDirectionalLightFalloff_IES(light{X}.vLightDirection.xyz,preInfo.L,iesLightTexture{X},iesLightTexture{X}Sampler);\n#else\npreInfo.attenuation*=computeDirectionalLightFalloff(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\n#endif\n#endif\n#elif defined(POINTLIGHT{X})\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);\n#else\npreInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);\n#endif\n#else\npreInfo.attenuation=1.0;\n#endif\n#if defined(HEMILIGHT{X}) || defined(AREALIGHT{X})\npreInfo.roughness=roughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(roughness,light{X}.vLightSpecular.a,preInfo.lightDistance);\n#endif\npreInfo.diffuseRoughness=diffuseRoughness;preInfo.surfaceAlbedo=surfaceAlbedo;\n#ifdef IRIDESCENCE\npreInfo.iridescenceIntensity=iridescenceIntensity;\n#endif\n#ifdef SS_TRANSLUCENCY\ninfo.diffuseTransmission=vec3f(0.0);\n#endif\n#ifdef HEMILIGHT{X}\ninfo.diffuse=computeHemisphericDiffuseLighting(preInfo,diffuse{X}.rgb,light{X}.vLightGround);\n#elif defined(AREALIGHT{X})\ninfo.diffuse=computeAreaDiffuseLighting(preInfo,diffuse{X}.rgb);\n#elif defined(SS_TRANSLUCENCY)\n#ifndef SS_TRANSLUCENCY_LEGACY\ninfo.diffuse=computeDiffuseLighting(preInfo,diffuse{X}.rgb)*(1.0-subSurfaceOut.translucencyIntensity);info.diffuseTransmission=computeDiffuseTransmittedLighting(preInfo,diffuse{X}.rgb,subSurfaceOut.transmittance); \n#else\ninfo.diffuse=computeDiffuseTransmittedLighting(preInfo,diffuse{X}.rgb,subSurfaceOut.transmittance);\n#endif\n#else\ninfo.diffuse=computeDiffuseLighting(preInfo,diffuse{X}.rgb);\n#endif\n#ifdef SPECULARTERM\n#if AREALIGHT{X}\ninfo.specular=computeAreaSpecularLighting(preInfo,light{X}.vLightSpecular.rgb,clearcoatOut.specularEnvironmentR0,reflectivityOut.colorReflectanceF90);\n#else\n#if (CONDUCTOR_SPECULAR_MODEL==CONDUCTOR_SPECULAR_MODEL_OPENPBR)\n{let metalFresnel: vec3f=vec3f(reflectivityOut.specularWeight)*getF82Specular(preInfo.VdotH,clearcoatOut.specularEnvironmentR0,reflectivityOut.colorReflectanceF90,reflectivityOut.roughness);let dielectricFresnel: vec3f=fresnelSchlickGGXVec3(preInfo.VdotH,reflectivityOut.dielectricColorF0,reflectivityOut.colorReflectanceF90);coloredFresnel=mix(dielectricFresnel,metalFresnel,reflectivityOut.metallic);}\n#else\ncoloredFresnel=fresnelSchlickGGXVec3(preInfo.VdotH,clearcoatOut.specularEnvironmentR0,reflectivityOut.colorReflectanceF90);\n#endif\n#ifndef LEGACY_SPECULAR_ENERGY_CONSERVATION\n{let NdotH: f32=dot(normalW,preInfo.H);let fresnel: vec3f=fresnelSchlickGGXVec3(NdotH,vec3f(reflectanceF0),specularEnvironmentR90);info.diffuse*=(vec3f(1.0)-fresnel);}\n#endif\n#ifdef ANISOTROPIC\ninfo.specular=computeAnisotropicSpecularLighting(preInfo,viewDirectionW,normalW,anisotropicOut.anisotropicTangent,anisotropicOut.anisotropicBitangent,anisotropicOut.anisotropy,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,diffuse{X}.rgb);\n#else\ninfo.specular=computeSpecularLighting(preInfo,normalW,clearcoatOut.specularEnvironmentR0,coloredFresnel,AARoughnessFactors.x,diffuse{X}.rgb);\n#endif\n#endif\n#endif\n#ifndef AREALIGHT{X}\n#ifdef SHEEN\n#ifdef SHEEN_LINKWITHALBEDO\npreInfo.roughness=sheenOut.sheenIntensity;\n#else\n#ifdef HEMILIGHT{X}\npreInfo.roughness=sheenOut.sheenRoughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(sheenOut.sheenRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance);\n#endif\n#endif\ninfo.sheen=computeSheenLighting(preInfo,normalW,sheenOut.sheenColor,specularEnvironmentR90,AARoughnessFactors.x,diffuse{X}.rgb);\n#endif\n#ifdef CLEARCOAT\n#ifdef HEMILIGHT{X}\npreInfo.roughness=clearcoatOut.clearCoatRoughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(clearcoatOut.clearCoatRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance);\n#endif\ninfo.clearCoat=computeClearCoatLighting(preInfo,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatAARoughnessFactors.x,clearcoatOut.clearCoatIntensity,diffuse{X}.rgb);\n#ifdef CLEARCOAT_TINT\nabsorption=computeClearCoatLightingAbsorption(clearcoatOut.clearCoatNdotVRefract,preInfo.L,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatColor,clearcoatOut.clearCoatThickness,clearcoatOut.clearCoatIntensity);info.diffuse*=absorption;\n#ifdef SS_TRANSLUCENCY\ninfo.diffuseTransmission*=absorption;\n#endif\n#ifdef SPECULARTERM\ninfo.specular*=absorption;\n#endif\n#endif\ninfo.diffuse*=info.clearCoat.w;\n#ifdef SS_TRANSLUCENCY\ninfo.diffuseTransmission*=info.clearCoat.w;\n#endif\n#ifdef SPECULARTERM\ninfo.specular*=info.clearCoat.w;\n#endif\n#ifdef SHEEN\ninfo.sheen*=info.clearCoat.w;\n#endif\n#endif\n#endif\n#else\n#ifdef SPOTLIGHT{X}\n#ifdef IESLIGHTTEXTURE{X}\ninfo=computeIESSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness,iesLightTexture{X},iesLightTexture{X}Sampler);\n#else\ninfo=computeSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness);\n#endif\n#elif defined(HEMILIGHT{X})\ninfo=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightGround,glossiness);\n#elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X})\ninfo=computeLighting(viewDirectionW,normalW,light{X}.vLightData,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness);\n#elif define(AREALIGHT{X}) && defined(AREALIGHTSUPPORTED)\ninfo=computeAreaLighting(areaLightsLTC1Sampler,areaLightsLTC1SamplerSampler,areaLightsLTC2Sampler,areaLightsLTC2SamplerSampler,viewDirectionW,normalW,fragmentInputs.vPositionW,light{X}.vLightData.xyz,light{X}.vLightWidth.xyz,light{X}.vLightHeight.xyz,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,\n#ifdef AREALIGHTNOROUGHTNESS\n0.5\n#else\nuniforms.vReflectionInfos.y\n#endif\n);\n#endif\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\ninfo.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightTexture{X},projectionLightTexture{X}Sampler,uniforms.textureProjectionMatrix{X},fragmentInputs.vPositionW);\n#endif\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSMDEBUG{X}\nvar shadowDebug{X}: vec3f;\n#endif\n#ifdef SHADOWCSM{X}\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nvar index{X}: i32=-1;\n#else\nvar index{X}: i32=SHADOWCSMNUM_CASCADES{X}-1;\n#endif\nvar diff{X}: f32=0.;vPositionFromLight{X}[0]=fragmentInputs.vPositionFromLight{X}_0;vPositionFromLight{X}[1]=fragmentInputs.vPositionFromLight{X}_1;vPositionFromLight{X}[2]=fragmentInputs.vPositionFromLight{X}_2;vPositionFromLight{X}[3]=fragmentInputs.vPositionFromLight{X}_3;vDepthMetric{X}[0]=fragmentInputs.vDepthMetric{X}_0;vDepthMetric{X}[1]=fragmentInputs.vDepthMetric{X}_1;vDepthMetric{X}[2]=fragmentInputs.vDepthMetric{X}_2;vDepthMetric{X}[3]=fragmentInputs.vDepthMetric{X}_3;for (var i:i32=0; i<SHADOWCSMNUM_CASCADES{X}; i++)\n{\n#ifdef SHADOWCSM_RIGHTHANDED{X}\ndiff{X}=uniforms.viewFrustumZ{X}[i]+fragmentInputs.vPositionFromCamera{X}.z;\n#else\ndiff{X}=uniforms.viewFrustumZ{X}[i]-fragmentInputs.vPositionFromCamera{X}.z;\n#endif\nif (diff{X}>=0.) {index{X}=i;break;}}\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nif (index{X}>=0)\n#endif\n{\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCF1(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCF3(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithCSMPCF5(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCSS16(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCSS32(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});\n#else\nshadow=computeShadowWithCSMPCSS64(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});\n#endif\n#else\nshadow=computeShadowCSM(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=vec3f(shadow)*vCascadeColorsMultiplier{X}[index{X}];\n#endif\n#ifndef SHADOWCSMNOBLEND{X}\nvar frustumLength:f32=uniforms.frustumLengths{X}[index{X}];var diffRatio:f32=clamp(diff{X}/frustumLength,0.,1.)*uniforms.cascadeBlendFactor{X};if (index{X}<(SHADOWCSMNUM_CASCADES{X}-1) && diffRatio<1.)\n{index{X}+=1;var nextShadow: f32=0.;\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCF1(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],,shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCF3(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nnextShadow=computeShadowWithCSMPCF5(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS16(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS32(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});\n#else\nnextShadow=computeShadowWithCSMPCSS64(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,uniforms.lightSizeUVCorrection{X}[index{X}],uniforms.depthCorrection{X}[index{X}],uniforms.penumbraDarkness{X});\n#endif\n#else\nnextShadow=computeShadowCSM(index{X},vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\nshadow=mix(nextShadow,shadow,diffRatio);\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=mix(vec3(nextShadow)*vCascadeColorsMultiplier{X}[index{X}],shadowDebug{X},diffRatio);\n#endif\n}\n#endif\n}\n#elif defined(SHADOWCLOSEESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithCloseESMCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithCloseESM(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithESMCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithESM(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPOISSON{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithPoissonSamplingCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadowWithPoissonSampling(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCF1(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCF3(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCF5(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCSS16(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCSS32(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCSS64(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},depthTexture{X},depthTexture{X}Sampler,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#else\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowCube(fragmentInputs.vPositionW,light{X}.vLightData.xyz,shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadow(fragmentInputs.vPositionFromLight{X},fragmentInputs.vDepthMetric{X},shadowTexture{X},shadowTexture{X}Sampler,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#endif\n#ifdef SHADOWONLY\n#ifndef SHADOWINUSE\n#define SHADOWINUSE\n#endif\nglobalShadow+=shadow;shadowLightCount+=1.0;\n#endif\n#else\nshadow=1.;\n#endif\naggShadow+=shadow;numLights+=1.0;\n#ifndef SHADOWONLY\n#ifdef CUSTOMUSERLIGHTING\ndiffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow);\n#ifdef SPECULARTERM\nspecularBase+=computeCustomSpecularLighting(info,specularBase,shadow);\n#endif\n#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})\ndiffuseBase+=lightmapColor.rgb*shadow;\n#ifdef SPECULARTERM\n#ifndef LIGHTMAPNOSPECULAR{X}\nspecularBase+=info.specular*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef CLEARCOAT\n#ifndef LIGHTMAPNOSPECULAR{X}\nclearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef SHEEN\n#ifndef LIGHTMAPNOSPECULAR{X}\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#else\n#ifdef SHADOWCSMDEBUG{X}\ndiffuseBase+=info.diffuse*shadowDebug{X};\n#else\ndiffuseBase+=info.diffuse*shadow;\n#endif\n#ifdef SS_TRANSLUCENCY\ndiffuseTransmissionBase+=info.diffuseTransmission*shadow;\n#endif\n#ifdef SPECULARTERM\nspecularBase+=info.specular*shadow;\n#endif\n#ifdef CLEARCOAT\nclearCoatBase+=info.clearCoat.rgb*shadow;\n#endif\n#ifdef SHEEN\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},80876:(e,t,r)=>{var o=r(17416);const n="lightUboDeclaration",i="#ifdef LIGHT{X}\nstruct Light{X}\n{vLightData: vec4f,\nvLightDiffuse: vec4f,\nvLightSpecular: vec4f,\n#ifdef SPOTLIGHT{X}\nvLightDirection: vec4f,\nvLightFalloff: vec4f,\n#elif defined(POINTLIGHT{X})\nvLightFalloff: vec4f,\n#elif defined(HEMILIGHT{X})\nvLightGround: vec3f,\n#endif\n#if defined(AREALIGHT{X})\nvLightWidth: vec4f,\nvLightHeight: vec4f,\n#endif\nshadowsInfo: vec4f,\ndepthValues: vec2f} ;var<uniform> light{X} : Light{X};\n#ifdef IESLIGHTTEXTURE{X}\nvar iesLightTexture{X}Sampler: sampler;var iesLightTexture{X}: texture_2d<f32>;\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform textureProjectionMatrix{X}: mat4x4f;var projectionLightTexture{X}Sampler: sampler;var projectionLightTexture{X}: texture_2d<f32>;\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform lightMatrix{X}: array<mat4x4f,SHADOWCSMNUM_CASCADES{X}>;uniform viewFrustumZ{X}: array<f32,SHADOWCSMNUM_CASCADES{X}>;uniform frustumLengths{X}: array<f32,SHADOWCSMNUM_CASCADES{X}>;uniform cascadeBlendFactor{X}: f32;varying vPositionFromLight{X}_0: vec4f;varying vDepthMetric{X}_0: f32;varying vPositionFromLight{X}_1: vec4f;varying vDepthMetric{X}_1: f32;varying vPositionFromLight{X}_2: vec4f;varying vDepthMetric{X}_2: f32;varying vPositionFromLight{X}_3: vec4f;varying vDepthMetric{X}_3: f32;varying vPositionFromCamera{X}: vec4f;var<private> vPositionFromLight{X}: array<vec4f,4>;var<private> vDepthMetric{X} : array<f32,4>;\n#if defined(SHADOWPCSS{X})\nvar shadowTexture{X}Sampler: sampler_comparison; \nvar shadowTexture{X}: texture_depth_2d_array;var depthTexture{X}Sampler: sampler;var depthTexture{X}: texture_2d_array<f32>;uniform lightSizeUVCorrection{X}: array<vec2f,SHADOWCSMNUM_CASCADES{X}>;uniform depthCorrection{X}: array<f32,SHADOWCSMNUM_CASCADES{X}>;uniform penumbraDarkness{X}: f32;\n#elif defined(SHADOWPCF{X})\nvar shadowTexture{X}Sampler: sampler_comparison;var shadowTexture{X}: texture_depth_2d_array;\n#else \nvar shadowTexture{X}Sampler: sampler; \nvar shadowTexture{X}: texture_2d_array<f32>;\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vCascadeColorsMultiplier{X}: array<vec3f,8>=array<vec3f,8>\n(\nvec3f ( 1.5,0.0,0.0 ),\nvec3f ( 0.0,1.5,0.0 ),\nvec3f ( 0.0,0.0,5.5 ),\nvec3f ( 1.5,0.0,5.5 ),\nvec3f ( 1.5,1.5,0.0 ),\nvec3f ( 1.0,1.0,1.0 ),\nvec3f ( 0.0,1.0,5.5 ),\nvec3f ( 0.5,3.5,0.75 )\n);\n#endif\n#elif defined(SHADOWCUBE{X})\nvar shadowTexture{X}Sampler: sampler;var shadowTexture{X}: texture_cube<f32>;\n#else\nvarying vPositionFromLight{X}: vec4f;varying vDepthMetric{X}: f32;\n#if defined(SHADOWPCSS{X})\nvar shadowTexture{X}Sampler: sampler_comparison; \nvar shadowTexture{X}: texture_depth_2d;var depthTexture{X}Sampler: sampler; \nvar depthTexture{X}: texture_2d<f32>;\n#elif defined(SHADOWPCF{X})\nvar shadowTexture{X}Sampler: sampler_comparison;var shadowTexture{X}: texture_depth_2d;\n#else\nvar shadowTexture{X}Sampler: sampler; \nvar shadowTexture{X}: texture_2d<f32>;\n#endif\nuniform lightMatrix{X}: mat4x4f;\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},37470:(e,t,r)=>{var o=r(17416);const n="logDepthDeclaration",i="#ifdef LOGARITHMICDEPTH\nuniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},954:(e,t,r)=>{var o=r(17416);const n="logDepthFragment",i="#ifdef LOGARITHMICDEPTH\nfragmentOutputs.fragDepth=log2(fragmentInputs.vFragmentDepth)*uniforms.logarithmicDepthConstant*0.5;\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},10043:(e,t,r)=>{var o=r(17416);const n="ltcHelperFunctions",i="fn LTCUv(N: vec3f,V: vec3f,roughness: f32)->vec2f {var LUTSIZE: f32=64.0;var LUTSCALE: f32=( LUTSIZE-1.0 )/LUTSIZE;var LUTBIAS:f32=0.5/LUTSIZE;var dotNV:f32=saturate( dot( N,V ) );var uv:vec2f=vec2f( roughness,sqrt( 1.0-dotNV ) );uv=uv*LUTSCALE+LUTBIAS;return uv;}\nfn LTCClippedSphereFormFactor( f:vec3f )->f32 {var l: f32=length( f );return max( ( l*l+f.z )/( l+1.0 ),0.0 );}\nfn LTCEdgeVectorFormFactor( v1:vec3f,v2:vec3f )->vec3f {var x:f32=dot( v1,v2 );var y:f32=abs( x );var a:f32=0.8543985+( 0.4965155+0.0145206*y )*y;var b:f32=3.4175940+( 4.1616724+y )*y;var v:f32=a/b;var thetaSintheta:f32=0.0;if( x>0.0 )\n{thetaSintheta=v;}\nelse\n{thetaSintheta=0.5*inverseSqrt( max( 1.0-x*x,0.00000001 ) )-v;}\nreturn cross( v1,v2 )*thetaSintheta;}\nfn LTCEvaluate( N:vec3f,V:vec3f,P:vec3f,mInv: mat3x3<f32>,rectCoords0:vec3f,rectCoords1:vec3f,rectCoords2:vec3f,rectCoords3:vec3f )->vec3f {var v1:vec3f=rectCoords1-rectCoords0;var v2:vec3f=rectCoords3-rectCoords0;var lightNormal:vec3f=cross( v1,v2 );if( dot( lightNormal,P-rectCoords0 )<0.0 ){return vec3f( 0.0 );}\nvar T1:vec3f=normalize( V-N*dot( V,N ) );var T2:vec3f=- cross( N,T1 ); \nvar mat: mat3x3<f32>=mInv*transposeMat3( mat3x3<f32>( T1,T2,N ) );var coords0: vec3f=mat*( rectCoords0-P );var coords1: vec3f=mat*( rectCoords1-P );var coords2: vec3f=mat*( rectCoords2-P );var coords3: vec3f=mat*( rectCoords3-P );coords0=normalize( coords0 );coords1=normalize( coords1 );coords2=normalize( coords2 );coords3=normalize( coords3 );var vectorFormFactor:vec3f=vec3( 0.0 );vectorFormFactor+=LTCEdgeVectorFormFactor( coords0,coords1 );vectorFormFactor+=LTCEdgeVectorFormFactor( coords1,coords2 );vectorFormFactor+=LTCEdgeVectorFormFactor( coords2,coords3 );vectorFormFactor+=LTCEdgeVectorFormFactor( coords3,coords0 );var result:f32=LTCClippedSphereFormFactor( vectorFormFactor );return vec3f( result );}\nstruct areaLightData\n{Diffuse: vec3f,\nSpecular: vec3f,\nFresnel: vec4f};fn computeAreaLightSpecularDiffuseFresnel(ltc1: texture_2d<f32>,ltc1Sampler:sampler,ltc2:texture_2d<f32>,ltc2Sampler:sampler,viewDir: vec3f,normal:vec3f,position:vec3f,lightPos:vec3f,halfWidth:vec3f, halfHeight:vec3f,roughness:f32)->areaLightData {var result: areaLightData;var rectCoords0:vec3f=lightPos+halfWidth-halfHeight; \nvar rectCoords1:vec3f=lightPos-halfWidth-halfHeight;var rectCoords2:vec3f=lightPos-halfWidth+halfHeight;var rectCoords3:vec3f=lightPos+halfWidth+halfHeight;\n#ifdef SPECULARTERM\nvar uv:vec2f=LTCUv( normal,viewDir,roughness );var t1:vec4f=textureSample( ltc1,ltc1Sampler,uv );var t2:vec4f=textureSample( ltc2,ltc2Sampler,uv );var mInv:mat3x3<f32>=mat3x3<f32>(\nvec3f( t1.x,0,t1.y ),\nvec3f( 0,1, 0 ),\nvec3f( t1.z,0,t1.w )\n);result.Fresnel=t2;result.Specular=LTCEvaluate( normal,viewDir,position,mInv,rectCoords0,rectCoords1,rectCoords2,rectCoords3 );\n#endif\nvar mInvEmpty:mat3x3<f32>=mat3x3<f32>(\nvec3f( 1,0,0 ),\nvec3f( 0,1,0 ),\nvec3f( 0,0,1 )\n);result.Diffuse+=LTCEvaluate( normal,viewDir,position,mInvEmpty,rectCoords0,rectCoords1,rectCoords2,rectCoords3 );return result;}";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},67662:(e,t,r)=>{var o=r(17416);const n="reflectionFunction",i="fn computeFixedEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,direction: vec3f)->vec3f\n{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); }\nfn computeMirroredFixedEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,direction: vec3f)->vec3f\n{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); }\nfn computeEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f)->vec3f\n{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);}\nfn computeSphericalCoords(worldPos: vec4f,worldNormal: vec3f,view: mat4x4f,reflectionMatrix: mat4x4f)->vec3f\n{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);}\nfn computePlanarCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f)->vec3f\n{var viewDir: vec3f=worldPos.xyz-eyePosition;var coords: vec3f=normalize(reflect(viewDir,worldNormal));return (reflectionMatrix* vec4f(coords,1)).xyz;}\nfn computeCubicCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f)->vec3f\n{var viewDir: vec3f=normalize(worldPos.xyz-eyePosition);var coords: vec3f=reflect(viewDir,worldNormal);coords= (reflectionMatrix* vec4f(coords,0)).xyz;\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;}\nfn computeCubicLocalCoords(worldPos: vec4f,worldNormal: vec3f,eyePosition: vec3f,reflectionMatrix: mat4x4f,reflectionSize: vec3f,reflectionPosition: vec3f)->vec3f\n{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;\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;}\nfn computeProjectionCoords(worldPos: vec4f,view: mat4x4f,reflectionMatrix: mat4x4f)->vec3f\n{return (reflectionMatrix*(view*worldPos)).xyz;}\nfn computeSkyBoxCoords(positionW: vec3f,reflectionMatrix: mat4x4f)->vec3f\n{return (reflectionMatrix* vec4f(positionW,1.)).xyz;}\n#ifdef REFLECTION\nfn computeReflectionCoords(worldPos: vec4f,worldNormal: vec3f)->vec3f\n{\n#ifdef REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\nvar direction: vec3f=normalize(fragmentInputs.vDirectionW);return computeMirroredFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR_FIXED\nvar direction: vec3f=normalize(fragmentInputs.vDirectionW);return computeFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR\nreturn computeEquirectangularCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_SPHERICAL\nreturn computeSphericalCoords(worldPos,worldNormal,scene.view,uniforms.reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_PLANAR\nreturn computePlanarCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_CUBIC\n#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\nreturn computeCubicLocalCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix,uniforms.vReflectionSize,uniforms.vReflectionPosition);\n#else\nreturn computeCubicCoords(worldPos,worldNormal,scene.vEyePosition.xyz,uniforms.reflectionMatrix);\n#endif\n#endif\n#ifdef REFLECTIONMAP_PROJECTION\nreturn computeProjectionCoords(worldPos,scene.view,uniforms.reflectionMatrix);\n#endif\n#ifndef REFLECTIONMAP_CUBIC\n#ifdef REFLECTIONMAP_SKYBOX\nreturn computeSkyBoxCoords(fragmentInputs.vPositionUVW,uniforms.reflectionMatrix);\n#endif\n#endif\n#ifdef REFLECTIONMAP_EXPLICIT\nreturn vec3f(0,0,0);\n#endif\n}\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)},73030:(e,t,r)=>{var o=r(17416);const n="shadowsFragmentFunctions",i="#ifdef SHADOWS\n#ifndef SHADOWFLOAT\nfn unpack(color: vec4f)->f32\n{const bit_shift: vec4f= vec4f(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}\n#endif\nfn computeFallOff(value: f32,clipSpace: vec2f,frustumEdgeFalloff: f32)->f32\n{var mask: f32=smoothstep(1.0-frustumEdgeFalloff,1.00000012,clamp(dot(clipSpace,clipSpace),0.,1.));return mix(value,1.0,mask);}\nfn computeShadowCube(worldPos: vec3f,lightPosition: vec3f,shadowTexture: texture_cube<f32>,shadowSampler: sampler,darkness: f32,depthValues: vec2f)->f32\n{var directionToLight: vec3f=worldPos-lightPosition;var depth: f32=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);depth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nvar shadow: f32=unpack(textureSample(shadowTexture,shadowSampler,directionToLight));\n#else\nvar shadow: f32=textureSample(shadowTexture,shadowSampler,directionToLight).x;\n#endif\nreturn select(1.0,darkness,depth>shadow);}\nfn computeShadowWithPoissonSamplingCube(worldPos: vec3f,lightPosition: vec3f,shadowTexture: texture_cube<f32>,shadowSampler: sampler,mapSize: f32,darkness: f32,depthValues: vec2f)->f32\n{var directionToLight: vec3f=worldPos-lightPosition;var depth: f32=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);depth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;var visibility: f32=1.;var poissonDisk: array<vec3f,4>;poissonDisk[0]= vec3f(-1.0,1.0,-1.0);poissonDisk[1]= vec3f(1.0,-1.0,-1.0);poissonDisk[2]= vec3f(-1.0,-1.0,-1.0);poissonDisk[3]= vec3f(1.0,-1.0,1.0);\n#ifndef SHADOWFLOAT\nif (unpack(textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[0]*mapSize))<depth) {visibility-=0.25;};if (unpack(textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[1]*mapSize))<depth) {visibility-=0.25;};if (unpack(textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[2]*mapSize))<depth) {visibility-=0.25;};if (unpack(textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[3]*mapSize))<depth) {visibility-=0.25;};\n#else\nif (textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[0]*mapSize).x<depth) {visibility-=0.25;};if (textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[1]*mapSize).x<depth) {visibility-=0.25;};if (textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[2]*mapSize).x<depth) {visibility-=0.25;};if (textureSample(shadowTexture,shadowSampler,directionToLight+poissonDisk[3]*mapSize).x<depth) {visibility-=0.25;};\n#endif\nreturn min(1.0,visibility+darkness);}\nfn computeShadowWithESMCube(worldPos: vec3f,lightPosition: vec3f,shadowTexture: texture_cube<f32>,shadowSampler: sampler,darkness: f32,depthScale: f32,depthValues: vec2f)->f32\n{var directionToLight: vec3f=worldPos-lightPosition;var depth: f32=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);var shadowPixelDepth: f32=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nvar shadowMapSample: f32=unpack(textureSample(shadowTexture,shadowSampler,directionToLight));\n#else\nvar shadowMapSample: f32=textureSample(shadowTexture,shadowSampler,directionToLight).x;\n#endif\nvar esm: f32=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);return esm;}\nfn computeShadowWithCloseESMCube(worldPos: vec3f,lightPosition: vec3f,shadowTexture: texture_cube<f32>,shadowSampler: sampler,darkness: f32,depthScale: f32,depthValues: vec2f)->f32\n{var directionToLight: vec3f=worldPos-lightPosition;var depth: f32=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);var shadowPixelDepth: f32=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nvar shadowMapSample: f32=unpack(textureSample(shadowTexture,shadowSampler,directionToLight));\n#else\nvar shadowMapSample: f32=textureSample(shadowTexture,shadowSampler,directionToLight).x;\n#endif\nvar esm: f32=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);return esm;}\nfn computeShadowCSM(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_2d_array<f32>,shadowSampler: sampler,darkness: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uv: vec2f=0.5*clipSpace.xy+ vec2f(0.5);var shadowPixelDepth: f32=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nvar shadow: f32=unpack(textureSample(shadowTexture,shadowSampler,uv,layer));\n#else\nvar shadow: f32=textureSample(shadowTexture,shadowSampler,uv,layer).x;\n#endif\nreturn select(1.,computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff),shadowPixelDepth>shadow );}\nfn computeShadow(vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_2d<f32>,shadowSampler: sampler,darkness: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uv: vec2f=0.5*clipSpace.xy+ vec2f(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{var shadowPixelDepth: f32=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nvar shadow: f32=unpack(textureSampleLevel(shadowTexture,shadowSampler,uv,0.));\n#else\nvar shadow: f32=textureSampleLevel(shadowTexture,shadowSampler,uv,0.).x;\n#endif\nreturn select(1.,computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff),shadowPixelDepth>shadow );}}\nfn computeShadowWithPoissonSampling(vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_2d<f32>,shadowSampler: sampler,mapSize: f32,darkness: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uv: vec2f=0.5*clipSpace.xy+ vec2f(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{var shadowPixelDepth: f32=clamp(depthMetric,0.,1.0);var visibility: f32=1.;var poissonDisk: array<vec2f,4>;poissonDisk[0]= vec2f(-0.94201624,-0.39906216);poissonDisk[1]= vec2f(0.94558609,-0.76890725);poissonDisk[2]= vec2f(-0.094184101,-0.92938870);poissonDisk[3]= vec2f(0.34495938,0.29387760);\n#ifndef SHADOWFLOAT\nif (unpack(textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[0]*mapSize,0.))<shadowPixelDepth) {visibility-=0.25;}\nif (unpack(textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[1]*mapSize,0.))<shadowPixelDepth) {visibility-=0.25;}\nif (unpack(textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[2]*mapSize,0.))<shadowPixelDepth) {visibility-=0.25;}\nif (unpack(textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[3]*mapSize,0.))<shadowPixelDepth) {visibility-=0.25;}\n#else\nif (textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[0]*mapSize,0.).x<shadowPixelDepth) {visibility-=0.25;}\nif (textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[1]*mapSize,0.).x<shadowPixelDepth) {visibility-=0.25;}\nif (textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[2]*mapSize,0.).x<shadowPixelDepth) {visibility-=0.25;}\nif (textureSampleLevel(shadowTexture,shadowSampler,uv+poissonDisk[3]*mapSize,0.).x<shadowPixelDepth) {visibility-=0.25;}\n#endif\nreturn computeFallOff(min(1.0,visibility+darkness),clipSpace.xy,frustumEdgeFalloff);}}\nfn computeShadowWithESM(vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_2d<f32>,shadowSampler: sampler,darkness: f32,depthScale: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uv: vec2f=0.5*clipSpace.xy+ vec2f(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{var shadowPixelDepth: f32=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nvar shadowMapSample: f32=unpack(textureSampleLevel(shadowTexture,shadowSampler,uv,0.));\n#else\nvar shadowMapSample: f32=textureSampleLevel(shadowTexture,shadowSampler,uv,0.).x;\n#endif\nvar esm: f32=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);}}\nfn computeShadowWithCloseESM(vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_2d<f32>,shadowSampler: sampler,darkness: f32,depthScale: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uv: vec2f=0.5*clipSpace.xy+ vec2f(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{var shadowPixelDepth: f32=clamp(depthMetric,0.,1.0); \n#ifndef SHADOWFLOAT\nvar shadowMapSample: f32=unpack(textureSampleLevel(shadowTexture,shadowSampler,uv,0.));\n#else\nvar shadowMapSample: f32=textureSampleLevel(shadowTexture,shadowSampler,uv,0.).x;\n#endif\nvar esm: f32=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);}}\nfn getZInClip(clipSpace: vec3f,uvDepth: vec3f)->f32\n{\n#ifdef IS_NDC_HALF_ZRANGE\nreturn clipSpace.z;\n#else\nreturn uvDepth.z;\n#endif\n}\nconst GREATEST_LESS_THAN_ONE: f32=0.99999994;\n#define DISABLE_UNIFORMITY_ANALYSIS\nfn computeShadowWithCSMPCF1(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_depth_2d_array,shadowSampler: sampler_comparison,darkness: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=clamp(getZInClip(clipSpace,uvDepth),0.,GREATEST_LESS_THAN_ONE);var shadow: f32=textureSampleCompare(shadowTexture,shadowSampler,uvDepth.xy,layer,uvDepth.z);shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\nfn computeShadowWithCSMPCF3(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_depth_2d_array,shadowSampler: sampler_comparison,shadowMapSizeAndInverse: vec2f,darkness: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=clamp(getZInClip(clipSpace,uvDepth),0.,GREATEST_LESS_THAN_ONE);var uv: vec2f=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvar st: vec2f=fract(uv); \nvar base_uv: vec2f=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvar uvw0: vec2f=3.-2.*st;var uvw1: vec2f=1.+2.*st;var u: vec2f= vec2f((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;var v: vec2f= vec2f((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;var shadow: f32=0.;shadow+=uvw0.x*uvw0.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[0]),layer,uvDepth.z);shadow+=uvw1.x*uvw0.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[0]),layer,uvDepth.z);shadow+=uvw0.x*uvw1.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[1]),layer,uvDepth.z);shadow+=uvw1.x*uvw1.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[1]),layer,uvDepth.z);shadow=shadow/16.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\nfn computeShadowWithCSMPCF5(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_depth_2d_array,shadowSampler: sampler_comparison,shadowMapSizeAndInverse: vec2f,darkness: f32,frustumEdgeFalloff: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=clamp(getZInClip(clipSpace,uvDepth),0.,GREATEST_LESS_THAN_ONE);var uv: vec2f=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvar st: vec2f=fract(uv); \nvar base_uv: vec2f=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvar uvw0: vec2f=4.-3.*st;var uvw1: vec2f= vec2f(7.);var uvw2: vec2f=1.+3.*st;var u: vec3f= vec3f((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;var v: vec3f= vec3f((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;var shadow: f32=0.;shadow+=uvw0.x*uvw0.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[0]),layer,uvDepth.z);shadow+=uvw1.x*uvw0.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[0]),layer,uvDepth.z);shadow+=uvw2.x*uvw0.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[2],v[0]),layer,uvDepth.z);shadow+=uvw0.x*uvw1.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[1]),layer,uvDepth.z);shadow+=uvw1.x*uvw1.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[1]),layer,uvDepth.z);shadow+=uvw2.x*uvw1.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[2],v[1]),layer,uvDepth.z);shadow+=uvw0.x*uvw2.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[2]),layer,uvDepth.z);shadow+=uvw1.x*uvw2.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[2]),layer,uvDepth.z);shadow+=uvw2.x*uvw2.y*textureSampleCompare(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[2],v[2]),layer,uvDepth.z);shadow=shadow/144.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\nfn computeShadowWithPCF1(vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_depth_2d,shadowSampler: sampler_comparison,darkness: f32,frustumEdgeFalloff: f32)->f32\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=getZInClip(clipSpace,uvDepth);var shadow: f32=textureSampleCompareLevel(shadowTexture,shadowSampler,uvDepth.xy,uvDepth.z);shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\nfn computeShadowWithPCF3(vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_depth_2d,shadowSampler: sampler_comparison,shadowMapSizeAndInverse: vec2f,darkness: f32,frustumEdgeFalloff: f32)->f32\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=getZInClip(clipSpace,uvDepth);var uv: vec2f=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvar st: vec2f=fract(uv); \nvar base_uv: vec2f=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvar uvw0: vec2f=3.-2.*st;var uvw1: vec2f=1.+2.*st;var u: vec2f= vec2f((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;var v: vec2f= vec2f((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;var shadow: f32=0.;shadow+=uvw0.x*uvw0.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[0]),uvDepth.z);shadow+=uvw1.x*uvw0.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[0]),uvDepth.z);shadow+=uvw0.x*uvw1.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[1]),uvDepth.z);shadow+=uvw1.x*uvw1.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[1]),uvDepth.z);shadow=shadow/16.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\nfn computeShadowWithPCF5(vPositionFromLight: vec4f,depthMetric: f32,shadowTexture: texture_depth_2d,shadowSampler: sampler_comparison,shadowMapSizeAndInverse: vec2f,darkness: f32,frustumEdgeFalloff: f32)->f32\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=getZInClip(clipSpace,uvDepth);var uv: vec2f=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvar st: vec2f=fract(uv); \nvar base_uv: vec2f=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvar uvw0: vec2f=4.-3.*st;var uvw1: vec2f= vec2f(7.);var uvw2: vec2f=1.+3.*st;var u: vec3f= vec3f((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;var v: vec3f= vec3f((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;var shadow: f32=0.;shadow+=uvw0.x*uvw0.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[0]),uvDepth.z);shadow+=uvw1.x*uvw0.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[0]),uvDepth.z);shadow+=uvw2.x*uvw0.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[2],v[0]),uvDepth.z);shadow+=uvw0.x*uvw1.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[1]),uvDepth.z);shadow+=uvw1.x*uvw1.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[1]),uvDepth.z);shadow+=uvw2.x*uvw1.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[2],v[1]),uvDepth.z);shadow+=uvw0.x*uvw2.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[0],v[2]),uvDepth.z);shadow+=uvw1.x*uvw2.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[1],v[2]),uvDepth.z);shadow+=uvw2.x*uvw2.y*textureSampleCompareLevel(shadowTexture,shadowSampler, base_uv.xy+ vec2f(u[2],v[2]),uvDepth.z);shadow=shadow/144.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\nconst PoissonSamplers32: array<vec3f,64>=array<vec3f,64> (\nvec3f(0.06407013,0.05409927,0.),\nvec3f(0.7366577,0.5789394,0.),\nvec3f(-0.6270542,-0.5320278,0.),\nvec3f(-0.4096107,0.8411095,0.),\nvec3f(0.6849564,-0.4990818,0.),\nvec3f(-0.874181,-0.04579735,0.),\nvec3f(0.9989998,0.0009880066,0.),\nvec3f(-0.004920578,-0.9151649,0.),\nvec3f(0.1805763,0.9747483,0.),\nvec3f(-0.2138451,0.2635818,0.),\nvec3f(0.109845,0.3884785,0.),\nvec3f(0.06876755,-0.3581074,0.),\nvec3f(0.374073,-0.7661266,0.),\nvec3f(0.3079132,-0.1216763,0.),\nvec3f(-0.3794335,-0.8271583,0.),\nvec3f(-0.203878,-0.07715034,0.),\nvec3f(0.5912697,0.1469799,0.),\nvec3f(-0.88069,0.3031784,0.),\nvec3f(0.5040108,0.8283722,0.),\nvec3f(-0.5844124,0.5494877,0.),\nvec3f(0.6017799,-0.1726654,0.),\nvec3f(-0.5554981,0.1559997,0.),\nvec3f(-0.3016369,-0.3900928,0.),\nvec3f(-0.5550632,-0.1723762,0.),\nvec3f(0.925029,0.2995041,0.),\nvec3f(-0.2473137,0.5538505,0.),\nvec3f(0.9183037,-0.2862392,0.),\nvec3f(0.2469421,0.6718712,0.),\nvec3f(0.3916397,-0.4328209,0.),\nvec3f(-0.03576927,-0.6220032,0.),\nvec3f(-0.04661255,0.7995201,0.),\nvec3f(0.4402924,0.3640312,0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.),\nvec3f(0.)\n);const PoissonSamplers64: array<vec3f,64>=array<vec3f,64> (\nvec3f(-0.613392,0.617481,0.),\nvec3f(0.170019,-0.040254,0.),\nvec3f(-0.299417,0.791925,0.),\nvec3f(0.645680,0.493210,0.),\nvec3f(-0.651784,0.717887,0.),\nvec3f(0.421003,0.027070,0.),\nvec3f(-0.817194,-0.271096,0.),\nvec3f(-0.705374,-0.668203,0.),\nvec3f(0.977050,-0.108615,0.),\nvec3f(0.063326,0.142369,0.),\nvec3f(0.203528,0.214331,0.),\nvec3f(-0.667531,0.326090,0.),\nvec3f(-0.098422,-0.295755,0.),\nvec3f(-0.885922,0.215369,0.),\nvec3f(0.566637,0.605213,0.),\nvec3f(0.039766,-0.396100,0.),\nvec3f(0.751946,0.453352,0.),\nvec3f(0.078707,-0.715323,0.),\nvec3f(-0.075838,-0.529344,0.),\nvec3f(0.724479,-0.580798,0.),\nvec3f(0.222999,-0.215125,0.),\nvec3f(-0.467574,-0.405438,0.),\nvec3f(-0.248268,-0.814753,0.),\nvec3f(0.354411,-0.887570,0.),\nvec3f(0.175817,0.382366,0.),\nvec3f(0.487472,-0.063082,0.),\nvec3f(-0.084078,0.898312,0.),\nvec3f(0.488876,-0.783441,0.),\nvec3f(0.470016,0.217933,0.),\nvec3f(-0.696890,-0.549791,0.),\nvec3f(-0.149693,0.605762,0.),\nvec3f(0.034211,0.979980,0.),\nvec3f(0.503098,-0.308878,0.),\nvec3f(-0.016205,-0.872921,0.),\nvec3f(0.385784,-0.393902,0.),\nvec3f(-0.146886,-0.859249,0.),\nvec3f(0.643361,0.164098,0.),\nvec3f(0.634388,-0.049471,0.),\nvec3f(-0.688894,0.007843,0.),\nvec3f(0.464034,-0.188818,0.),\nvec3f(-0.440840,0.137486,0.),\nvec3f(0.364483,0.511704,0.),\nvec3f(0.034028,0.325968,0.),\nvec3f(0.099094,-0.308023,0.),\nvec3f(0.693960,-0.366253,0.),\nvec3f(0.678884,-0.204688,0.),\nvec3f(0.001801,0.780328,0.),\nvec3f(0.145177,-0.898984,0.),\nvec3f(0.062655,-0.611866,0.),\nvec3f(0.315226,-0.604297,0.),\nvec3f(-0.780145,0.486251,0.),\nvec3f(-0.371868,0.882138,0.),\nvec3f(0.200476,0.494430,0.),\nvec3f(-0.494552,-0.711051,0.),\nvec3f(0.612476,0.705252,0.),\nvec3f(-0.578845,-0.768792,0.),\nvec3f(-0.772454,-0.090976,0.),\nvec3f(0.504440,0.372295,0.),\nvec3f(0.155736,0.065157,0.),\nvec3f(0.391522,0.849605,0.),\nvec3f(-0.620106,-0.328104,0.),\nvec3f(0.789239,-0.419965,0.),\nvec3f(-0.545396,0.538133,0.),\nvec3f(-0.178564,-0.596057,0.)\n);fn computeShadowWithCSMPCSS(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d_array<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d_array,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32,searchTapCount: i32,pcfTapCount: i32,poissonSamplers: array<vec3f,64>,lightSizeUVCorrection: vec2f,depthCorrection: f32,penumbraDarkness: f32)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=clamp(getZInClip(clipSpace,uvDepth),0.,GREATEST_LESS_THAN_ONE);var uvDepthLayer: vec4f= vec4f(uvDepth.x,uvDepth.y,f32(layer),uvDepth.z);var blockerDepth: f32=0.0;var sumBlockerDepth: f32=0.0;var numBlocker: f32=0.0;for (var i: i32=0; i<searchTapCount; i ++) {blockerDepth=textureSample(depthTexture,depthSampler, uvDepth.xy+(lightSizeUV*lightSizeUVCorrection*shadowMapSizeInverse*PoissonSamplers32[i].xy),layer).r;numBlocker+=select(0.,1.,blockerDepth<depthMetric);sumBlockerDepth+=select(0.,blockerDepth,blockerDepth<depthMetric);}\nvar avgBlockerDepth: f32=sumBlockerDepth/numBlocker;var AAOffset: f32=shadowMapSizeInverse*10.;var penumbraRatio: f32=((depthMetric-avgBlockerDepth)*depthCorrection+AAOffset);var filterRadius: vec4f= vec4f(penumbraRatio*lightSizeUV*lightSizeUVCorrection*shadowMapSizeInverse,0.,0.);var random: f32=getRand(vPositionFromLight.xy);var rotationAngle: f32=random*3.1415926;var rotationVector: vec2f= vec2f(cos(rotationAngle),sin(rotationAngle));var shadow: f32=0.;for (var i: i32=0; i<pcfTapCount; i++) {var offset: vec4f= vec4f(poissonSamplers[i],0.);offset= vec4f(offset.x*rotationVector.x-offset.y*rotationVector.y,offset.y*rotationVector.x+offset.x*rotationVector.y,0.,0.);let coords=uvDepthLayer+offset*filterRadius;shadow+=textureSampleCompare(shadowTexture,shadowSampler,coords.xy,i32(coords.z),coords.w);}\nshadow/= f32(pcfTapCount);shadow=mix(shadow,1.,min((depthMetric-avgBlockerDepth)*depthCorrection*penumbraDarkness,1.));shadow=mix(darkness,1.,shadow);return select(computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff),1.0,numBlocker<1.0);}\nfn computeShadowWithPCSS(vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32,searchTapCount: i32,pcfTapCount: i32,poissonSamplers: array<vec3f,64>)->f32\n{var clipSpace: vec3f=vPositionFromLight.xyz/vPositionFromLight.w;var uvDepth: vec3f= vec3f(0.5*clipSpace.xyz+ vec3f(0.5));uvDepth.z=getZInClip(clipSpace,uvDepth);var blockerDepth: f32=0.0;var sumBlockerDepth: f32=0.0;var numBlocker: f32=0.0;var exitCondition: bool=depthMetric>1.0 || depthMetric<0.0;for (var i: i32=0; i<searchTapCount; i ++) {if (exitCondition) {break;}\nblockerDepth=textureSampleLevel(depthTexture,depthSampler,uvDepth.xy+(lightSizeUV*shadowMapSizeInverse*PoissonSamplers32[i].xy),0).r;numBlocker+=select(0.,1.,blockerDepth<depthMetric);sumBlockerDepth+=select(0.,blockerDepth,blockerDepth<depthMetric);}\nexitCondition=exitCondition || numBlocker<1.0;var avgBlockerDepth: f32=sumBlockerDepth/numBlocker;var AAOffset: f32=shadowMapSizeInverse*10.;var penumbraRatio: f32=((depthMetric-avgBlockerDepth)+AAOffset);var filterRadius: f32=penumbraRatio*lightSizeUV*shadowMapSizeInverse;var random: f32=getRand(vPositionFromLight.xy);var rotationAngle: f32=random*3.1415926;var rotationVector: vec2f= vec2f(cos(rotationAngle),sin(rotationAngle));var shadow: f32=0.;for (var i: i32=0; i<pcfTapCount; i++) {if (exitCondition) {break;}\nvar offset: vec3f=poissonSamplers[i];offset= vec3f(offset.x*rotationVector.x-offset.y*rotationVector.y,offset.y*rotationVector.x+offset.x*rotationVector.y,0.);let coords=uvDepth+offset*filterRadius;shadow+=textureSampleCompareLevel(shadowTexture,shadowSampler,coords.xy,coords.z);}\nshadow/= f32(pcfTapCount);shadow=mix(shadow,1.,depthMetric-avgBlockerDepth);shadow=mix(darkness,1.,shadow);return select(computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff),1.0,exitCondition);}\nfn computeShadowWithPCSS16(vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32)->f32\n{return computeShadowWithPCSS(vPositionFromLight,depthMetric,depthTexture,depthSampler,shadowTexture,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,16,PoissonSamplers32);}\nfn computeShadowWithPCSS32(vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32)->f32\n{return computeShadowWithPCSS(vPositionFromLight,depthMetric,depthTexture,depthSampler,shadowTexture,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,32,PoissonSamplers32);}\nfn computeShadowWithPCSS64(vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32)->f32\n{return computeShadowWithPCSS(vPositionFromLight,depthMetric,depthTexture,depthSampler,shadowTexture,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,32,64,PoissonSamplers64);}\nfn computeShadowWithCSMPCSS16(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d_array<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d_array,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32,lightSizeUVCorrection: vec2f,depthCorrection: f32,penumbraDarkness: f32)->f32\n{return computeShadowWithCSMPCSS(layer,vPositionFromLight,depthMetric,depthTexture,depthSampler,shadowTexture,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,16,PoissonSamplers32,lightSizeUVCorrection,depthCorrection,penumbraDarkness);}\nfn computeShadowWithCSMPCSS32(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d_array<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d_array,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32,lightSizeUVCorrection: vec2f,depthCorrection: f32,penumbraDarkness: f32)->f32\n{return computeShadowWithCSMPCSS(layer,vPositionFromLight,depthMetric,depthTexture,depthSampler,shadowTexture,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,32,PoissonSamplers32,lightSizeUVCorrection,depthCorrection,penumbraDarkness);}\nfn computeShadowWithCSMPCSS64(layer: i32,vPositionFromLight: vec4f,depthMetric: f32,depthTexture: texture_2d_array<f32>,depthSampler: sampler,shadowTexture: texture_depth_2d_array,shadowSampler: sampler_comparison,shadowMapSizeInverse: f32,lightSizeUV: f32,darkness: f32,frustumEdgeFalloff: f32,lightSizeUVCorrection: vec2f,depthCorrection: f32,penumbraDarkness: f32)->f32\n{return computeShadowWithCSMPCSS(layer,vPositionFromLight,depthMetric,depthTexture,depthSampler,shadowTexture,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,32,64,PoissonSamplers64,lightSizeUVCorrection,depthCorrection,penumbraDarkness);}\n#endif\n";o.v.IncludesShadersStoreWGSL[n]||(o.v.IncludesShadersStoreWGSL[n]=i)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:5925 */
|