@babylonjs/lite 0.1.1 → 1.0.0
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/_mat4-storage-f64-CjDoht2w.js +11 -0
- package/_mat4-storage-f64-CjDoht2w.js.map +1 -0
- package/{alpha-test-fragment-CUiHCw7W.js → alpha-test-fragment-B7DjSnF7.js} +2 -2
- package/{alpha-test-fragment-CUiHCw7W.js.map → alpha-test-fragment-B7DjSnF7.js.map} +1 -1
- package/assets/splat-sort-worker-DT3eybMZ.js.map +1 -0
- package/{background-dds-skybox-yHTqabU3.js → background-dds-skybox-BEX309u3.js} +14 -14
- package/background-dds-skybox-BEX309u3.js.map +1 -0
- package/{background-ground-DIw6D3qf.js → background-ground-BU0HOcM4.js} +20 -20
- package/background-ground-BU0HOcM4.js.map +1 -0
- package/{background-hdr-skybox-c4uuTmkP.js → background-hdr-skybox--RRRic_K.js} +10 -10
- package/background-hdr-skybox--RRRic_K.js.map +1 -0
- package/{background-solid-skybox-DPGBpPbm.js → background-solid-skybox-BrH2fXSu.js} +12 -13
- package/background-solid-skybox-BrH2fXSu.js.map +1 -0
- package/{billboard-renderable-D8mlVGCd.js → billboard-renderable-BHWryAeC.js} +46 -10
- package/billboard-renderable-BHWryAeC.js.map +1 -0
- package/{clamp-block-BdII67hT.js → clamp-block-DqbwnQGW.js} +2 -2
- package/{clamp-block-BdII67hT.js.map → clamp-block-DqbwnQGW.js.map} +1 -1
- package/{clearcoat-fragment-LCiG98Rf.js → clearcoat-fragment-D6FSCie1.js} +2 -2
- package/{clearcoat-fragment-LCiG98Rf.js.map → clearcoat-fragment-D6FSCie1.js.map} +1 -1
- package/{create-skeleton-C9JdIJnb.js → create-skeleton-D_uplboC.js} +9 -9
- package/create-skeleton-D_uplboC.js.map +1 -0
- package/{cubemap-skybox-material-DvXMVc4k.js → cubemap-skybox-material-DQcMMdf-.js} +6 -7
- package/cubemap-skybox-material-DQcMMdf-.js.map +1 -0
- package/{curve-block-BlJpXVYv.js → curve-block-21rT0JjG.js} +2 -2
- package/{curve-block-BlJpXVYv.js.map → curve-block-21rT0JjG.js.map} +1 -1
- package/{emissive-fragment-BnNvbBCw.js → emissive-fragment-C5FtBs3y.js} +3 -3
- package/emissive-fragment-C5FtBs3y.js.map +1 -0
- package/{esm-shadow-view-DN9HIaM4.js → esm-shadow-view-Cl3rPGof.js} +2 -2
- package/{esm-shadow-view-DN9HIaM4.js.map → esm-shadow-view-Cl3rPGof.js.map} +1 -1
- package/{esm-shadow-view-Dk9NFtLq.js → esm-shadow-view-Gtd1LWRP.js} +2 -2
- package/{esm-shadow-view-Dk9NFtLq.js.map → esm-shadow-view-Gtd1LWRP.js.map} +1 -1
- package/{esm-shadow-view-DGKdF1NI.js → esm-shadow-view-c5YV4Eg9.js} +2 -2
- package/{esm-shadow-view-DGKdF1NI.js.map → esm-shadow-view-c5YV4Eg9.js.map} +1 -1
- package/{gaussian-splatting-pipeline-sh-DgJl7l56.js → gaussian-splatting-pipeline-sh-7J31V23x.js} +19 -19
- package/gaussian-splatting-pipeline-sh-7J31V23x.js.map +1 -0
- package/geometry-texture-output-dXk4E9uu.js +41 -0
- package/geometry-texture-output-dXk4E9uu.js.map +1 -0
- package/geometry-view-BsFJpBJa.js +404 -0
- package/geometry-view-BsFJpBJa.js.map +1 -0
- package/{gltf-animation-D7uyTyO3.js → gltf-animation-K_zZxj_d.js} +7 -7
- package/gltf-animation-K_zZxj_d.js.map +1 -0
- package/gltf-color-normalize-Qxl-9C48.js +29 -0
- package/gltf-color-normalize-Qxl-9C48.js.map +1 -0
- package/{gltf-ext-basisu-CPg5kPrx.js → gltf-ext-basisu-CDbPclzZ.js} +53 -18
- package/gltf-ext-basisu-CDbPclzZ.js.map +1 -0
- package/{gltf-ext-node-visibility-MafA9ot2.js → gltf-ext-node-visibility-DXCJEYr6.js} +2 -2
- package/{gltf-ext-node-visibility-MafA9ot2.js.map → gltf-ext-node-visibility-DXCJEYr6.js.map} +1 -1
- package/{gltf-ext-quantization-CpZyLDIz.js → gltf-ext-quantization-CvHI_0Vg.js} +4 -3
- package/gltf-ext-quantization-CvHI_0Vg.js.map +1 -0
- package/{gltf-ext-uv-transform-CE_-T1Tr.js → gltf-ext-uv-transform-DgYazJBs.js} +2 -2
- package/{gltf-ext-uv-transform-CE_-T1Tr.js.map → gltf-ext-uv-transform-DgYazJBs.js.map} +1 -1
- package/{gltf-feature-animation-pointer-BjpwOOqo.js → gltf-feature-animation-pointer-D1RJRFBw.js} +9 -9
- package/gltf-feature-animation-pointer-D1RJRFBw.js.map +1 -0
- package/{gltf-feature-animations-CCizegp8.js → gltf-feature-animations-Cmc1uoIu.js} +2 -2
- package/{gltf-feature-animations-CCizegp8.js.map → gltf-feature-animations-Cmc1uoIu.js.map} +1 -1
- package/{gltf-feature-draco-yGSMGTE3.js → gltf-feature-draco-CKKzT5E3.js} +6 -5
- package/gltf-feature-draco-CKKzT5E3.js.map +1 -0
- package/{gltf-feature-gpu-instancing-2e_CFQnl.js → gltf-feature-gpu-instancing-n87SO6Vh.js} +7 -6
- package/gltf-feature-gpu-instancing-n87SO6Vh.js.map +1 -0
- package/{gltf-feature-lights-punctual-DDDg4j0U.js → gltf-feature-lights-punctual-Ckm3ciL8.js} +5 -5
- package/{gltf-feature-lights-punctual-DDDg4j0U.js.map → gltf-feature-lights-punctual-Ckm3ciL8.js.map} +1 -1
- package/{gltf-feature-meshopt-Des96YFI.js → gltf-feature-meshopt-DLC4SF1E.js} +7 -6
- package/gltf-feature-meshopt-DLC4SF1E.js.map +1 -0
- package/{gltf-feature-morph-CKCw6tkX.js → gltf-feature-morph-Cjtu7hYa.js} +4 -4
- package/gltf-feature-morph-Cjtu7hYa.js.map +1 -0
- package/gltf-feature-registry-C63Hjp9w.js +59 -0
- package/gltf-feature-registry-C63Hjp9w.js.map +1 -0
- package/{gltf-feature-skeleton-D8hWLqi2.js → gltf-feature-skeleton-DKbOGidp.js} +3 -3
- package/{gltf-feature-skeleton-D8hWLqi2.js.map → gltf-feature-skeleton-DKbOGidp.js.map} +1 -1
- package/{gltf-feature-variants-Ds6v9byg.js → gltf-feature-variants-Cmzu0O0e.js} +2 -2
- package/{gltf-feature-variants-Ds6v9byg.js.map → gltf-feature-variants-Cmzu0O0e.js.map} +1 -1
- package/{gltf-glb-parser-D6UZWFuC.js → gltf-glb-parser-Cj5MHS-v.js} +5 -4
- package/gltf-glb-parser-Cj5MHS-v.js.map +1 -0
- package/{gltf-interleave-DGnUlz28.js → gltf-interleave-gHf9_t0i.js} +14 -14
- package/gltf-interleave-gHf9_t0i.js.map +1 -0
- package/gltf-normals-b2h74380.js +37 -0
- package/gltf-normals-b2h74380.js.map +1 -0
- package/{gltf-pbr-builder-ext-BFOxOCnQ.js → gltf-pbr-builder-ext-edNcjwPf.js} +5 -5
- package/gltf-pbr-builder-ext-edNcjwPf.js.map +1 -0
- package/{gltf-variants-DFbr8EES.js → gltf-variants-CPxNdtP4.js} +4 -4
- package/{gltf-variants-DFbr8EES.js.map → gltf-variants-CPxNdtP4.js.map} +1 -1
- package/{gs-picking-pipeline-DzfMASL9.js → gs-picking-pipeline-DYaW_Lg3.js} +14 -14
- package/gs-picking-pipeline-DYaW_Lg3.js.map +1 -0
- package/havok-floating-origin-Dr-18Nds.js +198 -0
- package/havok-floating-origin-Dr-18Nds.js.map +1 -0
- package/index-CLElg2Bo.js +39209 -0
- package/index-CLElg2Bo.js.map +1 -0
- package/index-CYZDclhF.js +918 -0
- package/index-CYZDclhF.js.map +1 -0
- package/index-SMJ67XwT.js +3330 -0
- package/index-SMJ67XwT.js.map +1 -0
- package/index.d.ts +2508 -119
- package/index.js +444 -302
- package/{input-block-DgAJBzN_.js → input-block-DqEedWF2.js} +2 -2
- package/{input-block-DgAJBzN_.js.map → input-block-DqEedWF2.js.map} +1 -1
- package/{iridescence-fragment-Gymp7or5.js → iridescence-fragment-BHU59-gQ.js} +2 -2
- package/{iridescence-fragment-Gymp7or5.js.map → iridescence-fragment-BHU59-gQ.js.map} +1 -1
- package/{light-block-B11ew7FA.js → light-block-Bv37V8vl.js} +2 -2
- package/{light-block-B11ew7FA.js.map → light-block-Bv37V8vl.js.map} +1 -1
- package/{loop-block-Bb23EOMb.js → loop-block-qTg8vb99.js} +2 -2
- package/{loop-block-Bb23EOMb.js.map → loop-block-qTg8vb99.js.map} +1 -1
- package/{morph-fragment-DOVo70gP.js → morph-fragment-BRCUr2wQ.js} +2 -2
- package/{morph-fragment-DOVo70gP.js.map → morph-fragment-BRCUr2wQ.js.map} +1 -1
- package/{multilight-wgsl-BGyiIOp3.js → multilight-wgsl-DMeppAdZ.js} +4 -4
- package/{multilight-wgsl-BGyiIOp3.js.map → multilight-wgsl-DMeppAdZ.js.map} +1 -1
- package/{node-env-BPZXZzBf.js → node-env-Bc559GmY.js} +6 -5
- package/node-env-Bc559GmY.js.map +1 -0
- package/node-geometry-view-COmWsRXK.js +291 -0
- package/node-geometry-view-COmWsRXK.js.map +1 -0
- package/{node-registry-extra-compat-Dhrw8fDQ.js → node-registry-extra-compat-dWrv7gpS.js} +2 -2
- package/{node-registry-extra-compat-Dhrw8fDQ.js.map → node-registry-extra-compat-dWrv7gpS.js.map} +1 -1
- package/{node-registry-extra-math-CsAHvIZo.js → node-registry-extra-math-Bn854sX9.js} +2 -2
- package/{node-registry-extra-math-CsAHvIZo.js.map → node-registry-extra-math-Bn854sX9.js.map} +1 -1
- package/{node-renderable-DlLIdBmd.js → node-renderable-B5G8WcdH.js} +41 -22
- package/node-renderable-B5G8WcdH.js.map +1 -0
- package/{node-shadow-DKrcqmNg.js → node-shadow-CVIUlNf0.js} +7 -7
- package/node-shadow-CVIUlNf0.js.map +1 -0
- package/{normal-map-fragment-DpsIXrJf.js → normal-map-fragment-CQSxhjCy.js} +3 -3
- package/{normal-map-fragment-DpsIXrJf.js.map → normal-map-fragment-CQSxhjCy.js.map} +1 -1
- package/pack-mat4-with-offset-BqB8Jqo7.js +37 -0
- package/pack-mat4-with-offset-BqB8Jqo7.js.map +1 -0
- package/package.json +3 -10
- package/{parse-camera-DM3oJJeT.js → parse-camera-pBRT_6i5.js} +2 -2
- package/{parse-camera-DM3oJJeT.js.map → parse-camera-pBRT_6i5.js.map} +1 -1
- package/pbr-fog-wgsl-BqdCid6r.js +8 -0
- package/pbr-fog-wgsl-BqdCid6r.js.map +1 -0
- package/pbr-geometry-view-NiZY_juX.js +491 -0
- package/pbr-geometry-view-NiZY_juX.js.map +1 -0
- package/{pbr-metallic-roughness-block-h_KAOZrW.js → pbr-metallic-roughness-block-JBSi-tQN.js} +2 -2
- package/{pbr-metallic-roughness-block-h_KAOZrW.js.map → pbr-metallic-roughness-block-JBSi-tQN.js.map} +1 -1
- package/{pbr-metallic-roughness-block-full-6vMm1Jk6.js → pbr-metallic-roughness-block-full-Ta9lR2cz.js} +2 -2
- package/{pbr-metallic-roughness-block-full-6vMm1Jk6.js.map → pbr-metallic-roughness-block-full-Ta9lR2cz.js.map} +1 -1
- package/{pbr-mr-helper-core-CIwm-T1G.js → pbr-mr-helper-core-BVWNR08D.js} +2 -2
- package/{pbr-mr-helper-core-CIwm-T1G.js.map → pbr-mr-helper-core-BVWNR08D.js.map} +1 -1
- package/{pbr-refraction-DGmMSa2v.js → pbr-refraction-C9FvFmAp.js} +2 -2
- package/{pbr-refraction-DGmMSa2v.js.map → pbr-refraction-C9FvFmAp.js.map} +1 -1
- package/{pbr-renderable-BJxUtPBb.js → pbr-renderable-DzUF2QIk.js} +118 -58
- package/pbr-renderable-DzUF2QIk.js.map +1 -0
- package/{pbr-shadow-fragment-LO9SlbJj.js → pbr-shadow-fragment-CnqnbGYS.js} +6 -1
- package/pbr-shadow-fragment-CnqnbGYS.js.map +1 -0
- package/{pbr-template-ext-8q7BcTDf.js → pbr-template-ext-CGgB2n2y.js} +3 -2
- package/{pbr-template-ext-8q7BcTDf.js.map → pbr-template-ext-CGgB2n2y.js.map} +1 -1
- package/{pbr-tracking-B3alzn91.js → pbr-tracking-3tU1kqea.js} +2 -2
- package/{pbr-tracking-B3alzn91.js.map → pbr-tracking-3tU1kqea.js.map} +1 -1
- package/pbr-transmission-ext-BcLjRxfB.js +190 -0
- package/pbr-transmission-ext-BcLjRxfB.js.map +1 -0
- package/recast-navigation.wasm-DG_0AFuk.js +8706 -0
- package/recast-navigation.wasm-DG_0AFuk.js.map +1 -0
- package/recast-navigation.wasm-compat-C-Bf2ylB.js +8692 -0
- package/recast-navigation.wasm-compat-C-Bf2ylB.js.map +1 -0
- package/{reflectance-fragment-BCrgPmrt.js → reflectance-fragment-Dbpgw3Jt.js} +2 -2
- package/{reflectance-fragment-BCrgPmrt.js.map → reflectance-fragment-Dbpgw3Jt.js.map} +1 -1
- package/{rgbd-decode-DCvzUYeI.js → rgbd-decode-DoyUquy3.js} +7 -6
- package/rgbd-decode-DoyUquy3.js.map +1 -0
- package/{scene-material-swap-C2ykv55W.js → scene-material-swap-nNUH4nGn.js} +11 -4
- package/scene-material-swap-nNUH4nGn.js.map +1 -0
- package/screenshot-readback-D0Sj9qq3.js +92 -0
- package/screenshot-readback-D0Sj9qq3.js.map +1 -0
- package/{mesh-features-BLENkYVt.js → shader-composer-BUD_pSX4.js} +7 -55
- package/shader-composer-BUD_pSX4.js.map +1 -0
- package/{shader-renderable-D-6796KR.js → shader-renderable-D7-RyVxa.js} +62 -27
- package/shader-renderable-D7-RyVxa.js.map +1 -0
- package/shader-thin-instance-DuBotxDO.js +150 -0
- package/shader-thin-instance-DuBotxDO.js.map +1 -0
- package/shadow-fragment-core-DHN2G6FI.js.map +1 -1
- package/{sheen-fragment-Dze2f7XJ.js → sheen-fragment-1MkEMcbc.js} +2 -2
- package/{sheen-fragment-Dze2f7XJ.js.map → sheen-fragment-1MkEMcbc.js.map} +1 -1
- package/{singlelight-directional-wgsl-CmUDZxwz.js → singlelight-directional-wgsl-BsV8G456.js} +2 -2
- package/{singlelight-directional-wgsl-CmUDZxwz.js.map → singlelight-directional-wgsl-BsV8G456.js.map} +1 -1
- package/{singlelight-hemispheric-wgsl-t-83IP_s.js → singlelight-hemispheric-wgsl-Bo0jKlW5.js} +2 -2
- package/{singlelight-hemispheric-wgsl-t-83IP_s.js.map → singlelight-hemispheric-wgsl-Bo0jKlW5.js.map} +1 -1
- package/{singlelight-point-wgsl-CLzULIYV.js → singlelight-point-wgsl-DV39UP5Y.js} +2 -2
- package/{singlelight-point-wgsl-CLzULIYV.js.map → singlelight-point-wgsl-DV39UP5Y.js.map} +1 -1
- package/{singlelight-spot-wgsl-DEEUrfVM.js → singlelight-spot-wgsl-yg3od6vL.js} +2 -2
- package/{singlelight-spot-wgsl-DEEUrfVM.js.map → singlelight-spot-wgsl-yg3od6vL.js.map} +1 -1
- package/{skeleton-fragment-B_XlFbtx.js → skeleton-fragment-DdxYG6kv.js} +2 -2
- package/{skeleton-fragment-B_XlFbtx.js.map → skeleton-fragment-DdxYG6kv.js.map} +1 -1
- package/{skybox-renderable-DDwzu-PT.js → skybox-renderable-CJD4XmX5.js} +8 -9
- package/skybox-renderable-CJD4XmX5.js.map +1 -0
- package/{splat-ply-compressed-BahdBG1r.js → splat-ply-compressed-DHjyiVmI.js} +9 -8
- package/splat-ply-compressed-DHjyiVmI.js.map +1 -0
- package/{standard-renderable-GjxL9xSf.js → standard-pipeline-XTbHL7MY.js} +12 -257
- package/standard-pipeline-XTbHL7MY.js.map +1 -0
- package/standard-renderable-CREWLNHI.js +191 -0
- package/standard-renderable-CREWLNHI.js.map +1 -0
- package/{std-ambient-fragment-BoUsD06w.js → std-ambient-fragment-Bjx3VFrr.js} +2 -2
- package/{std-ambient-fragment-BoUsD06w.js.map → std-ambient-fragment-Bjx3VFrr.js.map} +1 -1
- package/{std-cube-reflection-fragment-ulqc3bsP.js → std-cube-reflection-fragment-y9WWdXUt.js} +2 -2
- package/{std-cube-reflection-fragment-ulqc3bsP.js.map → std-cube-reflection-fragment-y9WWdXUt.js.map} +1 -1
- package/{std-emissive-fragment-DNGj1HdQ.js → std-emissive-fragment-C8Lnmojh.js} +2 -2
- package/{std-emissive-fragment-DNGj1HdQ.js.map → std-emissive-fragment-C8Lnmojh.js.map} +1 -1
- package/{std-lightmap-fragment-Bqj89aIe.js → std-lightmap-fragment-DFxGcoA5.js} +2 -2
- package/{std-lightmap-fragment-Bqj89aIe.js.map → std-lightmap-fragment-DFxGcoA5.js.map} +1 -1
- package/{std-opacity-fragment-KuPh5N2Z.js → std-opacity-fragment-EXzFWiSp.js} +2 -2
- package/{std-opacity-fragment-KuPh5N2Z.js.map → std-opacity-fragment-EXzFWiSp.js.map} +1 -1
- package/{std-reflection-fragment-BA5Ghn_M.js → std-reflection-fragment-BoJORqpG.js} +2 -2
- package/{std-reflection-fragment-BA5Ghn_M.js.map → std-reflection-fragment-BoJORqpG.js.map} +1 -1
- package/std-shadow-fragment-Bq-Wc8UJ.js +13 -0
- package/std-shadow-fragment-Bq-Wc8UJ.js.map +1 -0
- package/{std-specular-fragment-CE-6scqd.js → std-specular-fragment-CM5R5j2g.js} +2 -2
- package/{std-specular-fragment-CE-6scqd.js.map → std-specular-fragment-CM5R5j2g.js.map} +1 -1
- package/{std-tracking-CNKZ-hJN.js → std-tracking-Cif_wXeT.js} +2 -2
- package/{std-tracking-CNKZ-hJN.js.map → std-tracking-Cif_wXeT.js.map} +1 -1
- package/{subsurface-fragment-liM3y2-P.js → subsurface-fragment-BEaAXYXz.js} +2 -2
- package/{subsurface-fragment-liM3y2-P.js.map → subsurface-fragment-BEaAXYXz.js.map} +1 -1
- package/swapchain-overlay-UCLilhbq.js +37 -0
- package/swapchain-overlay-UCLilhbq.js.map +1 -0
- package/thin-instance-cull-binding-DWKUt5ZN.js +310 -0
- package/thin-instance-cull-binding-DWKUt5ZN.js.map +1 -0
- package/{thin-instance-gpu-C9Gv_Z1w.js → thin-instance-gpu-BDdRcNAh.js} +30 -5
- package/thin-instance-gpu-BDdRcNAh.js.map +1 -0
- package/{tracking-primitives-wgdBY85t.js → tracking-primitives-CglRNTlX.js} +2 -2
- package/{tracking-primitives-wgdBY85t.js.map → tracking-primitives-CglRNTlX.js.map} +1 -1
- package/{unlit-fragment-BIlhJpz6.js → unlit-fragment-kxfZWlnp.js} +2 -2
- package/{unlit-fragment-BIlhJpz6.js.map → unlit-fragment-kxfZWlnp.js.map} +1 -1
- package/{wgsl-helpers-DyzNzCeE.js → wgsl-helpers-D8sl1VVA.js} +4 -4
- package/{wgsl-helpers-DyzNzCeE.js.map → wgsl-helpers-D8sl1VVA.js.map} +1 -1
- package/assets/splat-sort-worker-Crg3CaCc.js.map +0 -1
- package/background-dds-skybox-yHTqabU3.js.map +0 -1
- package/background-ground-DIw6D3qf.js.map +0 -1
- package/background-hdr-skybox-c4uuTmkP.js.map +0 -1
- package/background-solid-skybox-DPGBpPbm.js.map +0 -1
- package/billboard-renderable-D8mlVGCd.js.map +0 -1
- package/create-skeleton-C9JdIJnb.js.map +0 -1
- package/cubemap-skybox-material-DvXMVc4k.js.map +0 -1
- package/emissive-fragment-BnNvbBCw.js.map +0 -1
- package/gaussian-splatting-pipeline-sh-DgJl7l56.js.map +0 -1
- package/gltf-animation-D7uyTyO3.js.map +0 -1
- package/gltf-ext-basisu-CPg5kPrx.js.map +0 -1
- package/gltf-ext-quantization-CpZyLDIz.js.map +0 -1
- package/gltf-feature-animation-pointer-BjpwOOqo.js.map +0 -1
- package/gltf-feature-draco-yGSMGTE3.js.map +0 -1
- package/gltf-feature-gpu-instancing-2e_CFQnl.js.map +0 -1
- package/gltf-feature-meshopt-Des96YFI.js.map +0 -1
- package/gltf-feature-morph-CKCw6tkX.js.map +0 -1
- package/gltf-glb-parser-D6UZWFuC.js.map +0 -1
- package/gltf-interleave-DGnUlz28.js.map +0 -1
- package/gltf-pbr-builder-ext-BFOxOCnQ.js.map +0 -1
- package/gs-picking-pipeline-DzfMASL9.js.map +0 -1
- package/index-C8HOR2sB.js +0 -19222
- package/index-C8HOR2sB.js.map +0 -1
- package/mesh-features-BLENkYVt.js.map +0 -1
- package/node-env-BPZXZzBf.js.map +0 -1
- package/node-registry-DwgC4yth.js +0 -190
- package/node-registry-DwgC4yth.js.map +0 -1
- package/node-renderable-DlLIdBmd.js.map +0 -1
- package/node-shadow-DKrcqmNg.js.map +0 -1
- package/pbr-renderable-BJxUtPBb.js.map +0 -1
- package/pbr-shadow-fragment-LO9SlbJj.js.map +0 -1
- package/pbr-transmission-ext-BxW4CEGu.js +0 -581
- package/pbr-transmission-ext-BxW4CEGu.js.map +0 -1
- package/rgbd-decode-DCvzUYeI.js.map +0 -1
- package/scene-material-swap-C2ykv55W.js.map +0 -1
- package/shader-renderable-D-6796KR.js.map +0 -1
- package/skybox-renderable-DDwzu-PT.js.map +0 -1
- package/splat-ply-compressed-BahdBG1r.js.map +0 -1
- package/standard-renderable-GjxL9xSf.js.map +0 -1
- package/std-shadow-fragment-FNQfrJuC.js +0 -8
- package/std-shadow-fragment-FNQfrJuC.js.map +0 -1
- package/swapchain-overlay-DcCSFDp7.js +0 -35
- package/swapchain-overlay-DcCSFDp7.js.map +0 -1
- package/thin-instance-gpu-C9Gv_Z1w.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
1
|
+
import { cc as _getPbrExtsSorted, aM as PBR2_HAS_UV2, c8 as MSH_HAS_UV2, b2 as PBR_HAS_EMISSIVE, cd as PBR_HAS_SPEC_GLOSS, R as PBR2_ESM_SHADOW_OUTPUT, x as targetSignatureKey, z as getSceneBindGroupLayout, E as CW, bI as REVERSE_DEPTH_COMPARE, c6 as PBR_HAS_NORMAL_MAP, c7 as MSH_HAS_TANGENTS, ce as PBR2_NO_COLOR_OUTPUT, V as PBR_HAS_ALPHA_BLEND, ca as PBR_HAS_DOUBLE_SIDED, bC as appendMeshLightUboFields, bD as meshLightIndexWGSL, cf as _getPbrExts, cg as PBR2_HAS_UV_TRANSFORM, ch as PBR_HAS_ANISOTROPY, ci as PBR_HAS_SKYBOX, cj as PBR_HAS_SPECULAR_AA, c3 as PBR_HAS_ENV, aE as MSH_RECEIVE_SHADOWS, aD as MSH_HAS_THIN_INSTANCES, c9 as MSH_HAS_VERTEX_COLOR, ck as PBR_HAS_FOG, aB as MSH_HAS_INSTANCE_COLOR, cl as PBR_HAS_OCCLUSION, cm as PBR2_HAS_BASE_COLOR_FACTOR, cn as PBR_HAS_GAMMA_ALBEDO, co as PBR_HAS_TONEMAP, b6 as MSH_HAS_MORPH_TARGETS, b1 as PBR_HAS_EMISSIVE_COLOR, aJ as PBR_HAS_METALLIC_REFLECTANCE_MAP, aK as PBR_HAS_REFLECTANCE_MAP, aL as PBR2_HAS_REFLECTANCE_FACTORS, b as writeMeshLightSelection, c1 as _registerPbrExt, ar as clearSamplerCache, c4 as _computePbrMaterialFeatures, at as _computeMeshFeatures, a as F32, p as packMat4IntoF32, av as createUniformBuffer, bV as PBR2_HAS_REFRACTION, c5 as collectPbrBoundTextures, ax as acquireTexture, ay as releaseTexture } from "./index-CLElg2Bo.js";
|
|
2
|
+
import { c as composeShader } from "./shader-composer-BUD_pSX4.js";
|
|
3
3
|
const _bindingsCache = /* @__PURE__ */ new Map();
|
|
4
4
|
let _cachedDevice = null;
|
|
5
5
|
function ensureDevice(engine) {
|
|
@@ -54,7 +54,7 @@ function getOrCreatePbrPipeline(engine, sig, bindings) {
|
|
|
54
54
|
const vertModule = device.createShaderModule({ code: composed._vertexWGSL });
|
|
55
55
|
const noColorOutput = (features2 & PBR2_NO_COLOR_OUTPUT) !== 0;
|
|
56
56
|
const fragModule = !sig._colorFormat && !noColorOutput ? null : device.createShaderModule({ code: composed._fragmentWGSL });
|
|
57
|
-
const fragTarget = noColorOutput ? null : { format: sig._colorFormat, writeMask:
|
|
57
|
+
const fragTarget = noColorOutput ? null : { format: sig._colorFormat, writeMask: CW.ALL };
|
|
58
58
|
if (hasAlpha && fragTarget) {
|
|
59
59
|
fragTarget.blend = {
|
|
60
60
|
color: { srcFactor: "src-alpha", dstFactor: "one-minus-src-alpha", operation: "add" },
|
|
@@ -73,7 +73,7 @@ function getOrCreatePbrPipeline(engine, sig, bindings) {
|
|
|
73
73
|
}
|
|
74
74
|
} : {},
|
|
75
75
|
multisample: { count: sig._sampleCount },
|
|
76
|
-
primitive: { topology: "triangle-list", cullMode: hasDoubleSided ? "none" : "back", frontFace:
|
|
76
|
+
primitive: { topology: "triangle-list", cullMode: hasDoubleSided ? "none" : "back", frontFace: "ccw" }
|
|
77
77
|
});
|
|
78
78
|
bindings._pipelines.set(key, pipeline);
|
|
79
79
|
return pipeline;
|
|
@@ -179,6 +179,8 @@ function createPbrTemplate(config) {
|
|
|
179
179
|
_hasSpecGloss = false,
|
|
180
180
|
_hasDoubleSided = false,
|
|
181
181
|
_hasTonemap = false,
|
|
182
|
+
_fogHelper = "",
|
|
183
|
+
_fogBlock = "",
|
|
182
184
|
_acesHelpers = "",
|
|
183
185
|
_acesTonemapCall = "",
|
|
184
186
|
_hasAlphaBlend = false,
|
|
@@ -337,7 +339,7 @@ let roughness=clamp(1.0-specGloss.a,0.0,1.0);
|
|
|
337
339
|
let metallic=0.0;` : `let roughness=clamp(orm.g*material.roughnessFactor,0.0,1.0);
|
|
338
340
|
let metallic=orm.b*material.metallicFactor;`;
|
|
339
341
|
const emissiveUV = (_ext == null ? void 0 : _ext.uvForEmissive) ?? "input.uv";
|
|
340
|
-
const emissiveDefault = _hasEmissiveColor ?
|
|
342
|
+
const emissiveDefault = _hasEmissiveColor || !_hasEmissiveTexture ? `var emissive:vec3f;` : `let emissive=textureSample(emissiveTexture,emissiveSampler,${emissiveUV}).rgb;`;
|
|
341
343
|
const occlusionDefault = _hasReflectanceExt ? `` : (_ext == null ? void 0 : _ext.occlusionOverride) ? _ext.occlusionOverride : _hasOcclusion ? `let occlusion=orm.r;` : `let occlusion=1.0;`;
|
|
342
344
|
const f0Default = _hasReflectanceExt ? `` : _hasSpecGloss ? `var colorF0=specGloss.rgb;
|
|
343
345
|
let colorF90=vec3<f32>(1.0);
|
|
@@ -362,10 +364,12 @@ var directSpecular=vec3<f32>(0.0);
|
|
|
362
364
|
const acesBlock = useAces ? _acesHelpers : "";
|
|
363
365
|
const tonemapBlock = _hasTonemap ? useAces ? _acesTonemapCall : `color*=scene.vImageInfos.x;
|
|
364
366
|
color=1.0-exp2(-1.590579*color);` : `color*=scene.vImageInfos.x;`;
|
|
367
|
+
const fogHelper = _fogHelper;
|
|
368
|
+
const fogBlock = _fogBlock;
|
|
365
369
|
const alphaBlock = _noColorOutput ? "" : _hasAlphaBlend ? `var finalAlpha=alpha*material.materialAlpha;
|
|
366
370
|
var luminanceOverAlpha=0.0;
|
|
367
371
|
/*BA*/
|
|
368
|
-
luminanceOverAlpha+=dot(${_hasIbl ?
|
|
372
|
+
luminanceOverAlpha+=dot(${_hasIbl ? `finalSpecularScaled` : `directSpecular`},vec3<f32>(0.2126,0.7152,0.0722));
|
|
369
373
|
finalAlpha=saturate(finalAlpha+luminanceOverAlpha*luminanceOverAlpha);
|
|
370
374
|
return vec4<f32>(color,finalAlpha);` : `return vec4<f32>(color,alpha*material.materialAlpha);`;
|
|
371
375
|
const doubleSidedEntry = _hasDoubleSided ? `@fragment fn main(input: FragmentInput, @builtin(front_facing) frontFacing: bool)${_noColorOutput ? "" : " -> @location(0) vec4<f32>"} {` : `@fragment fn main(input: FragmentInput)${_noColorOutput ? "" : " -> @location(0) vec4<f32>"} {`;
|
|
@@ -387,6 +391,7 @@ ${_esmShadowOutput ? "struct shadowParamsUniforms { biasAndScale: vec4<f32>, dep
|
|
|
387
391
|
/*FI*/
|
|
388
392
|
${BRDF_FUNCTIONS}
|
|
389
393
|
${acesBlock}
|
|
394
|
+
${fogHelper}
|
|
390
395
|
${anisoBrdfBlock}
|
|
391
396
|
${lightDecls}
|
|
392
397
|
${lightBindingDecl}
|
|
@@ -401,8 +406,11 @@ ${occlusionDefault}
|
|
|
401
406
|
${roughnessMetallic}
|
|
402
407
|
${emissiveDefault}
|
|
403
408
|
/*AT*/
|
|
404
|
-
${
|
|
405
|
-
|
|
409
|
+
${// When the fragment terminates early (no color output, or ESM shadow
|
|
410
|
+
// depth output), emit only the terminating return. Appending the
|
|
411
|
+
// color-path body after the return would make it unreachable and
|
|
412
|
+
// trigger a "code is unreachable" shader compilation warning.
|
|
413
|
+
_noColorOutput ? "return;" : _esmShadowOutput ? _esmShadowDepthCode : `${normalBlock}
|
|
406
414
|
${doubleSidedFlip}
|
|
407
415
|
${anisotropyTBBlock}
|
|
408
416
|
/*AC*/
|
|
@@ -417,6 +425,7 @@ ${directLightBlock}
|
|
|
417
425
|
var color=directDiffuse+directSpecular+emissive;
|
|
418
426
|
/*AI*/
|
|
419
427
|
/*NI*/
|
|
428
|
+
${fogBlock}
|
|
420
429
|
${tonemapBlock}
|
|
421
430
|
color=pow(color,vec3<f32>(1.0/2.2));
|
|
422
431
|
color=clamp(color,vec3<f32>(0.0),vec3<f32>(1.0));
|
|
@@ -425,7 +434,7 @@ if(scene.vImageInfos.y<1.0){color=mix(vec3<f32>(0.5),color,scene.vImageInfos.y);
|
|
|
425
434
|
else{color=mix(color,highContrast,scene.vImageInfos.y-1.0);}
|
|
426
435
|
color=max(color,vec3<f32>(0.0));
|
|
427
436
|
/*BC*/
|
|
428
|
-
${alphaBlock}
|
|
437
|
+
${alphaBlock}`}
|
|
429
438
|
}`;
|
|
430
439
|
return {
|
|
431
440
|
_vertexTemplate,
|
|
@@ -446,6 +455,8 @@ function createPbrComposer(deps) {
|
|
|
446
455
|
_multiLightLoop,
|
|
447
456
|
_acesHelpers,
|
|
448
457
|
_acesTonemapCall,
|
|
458
|
+
_fogHelper,
|
|
459
|
+
_fogBlock,
|
|
449
460
|
_createPbrTemplateExt,
|
|
450
461
|
_anisoExt,
|
|
451
462
|
_iblSkyboxCalc,
|
|
@@ -499,6 +510,8 @@ function createPbrComposer(deps) {
|
|
|
499
510
|
_hasSpecGloss: has(PBR_HAS_SPEC_GLOSS),
|
|
500
511
|
_hasDoubleSided: has(PBR_HAS_DOUBLE_SIDED),
|
|
501
512
|
_hasTonemap: hasScene(PBR_HAS_TONEMAP),
|
|
513
|
+
_fogHelper: hasScene(PBR_HAS_FOG) ? _fogHelper : "",
|
|
514
|
+
_fogBlock: hasScene(PBR_HAS_FOG) ? _fogBlock : "",
|
|
502
515
|
_acesHelpers,
|
|
503
516
|
_acesTonemapCall,
|
|
504
517
|
_hasAlphaBlend: has(PBR_HAS_ALPHA_BLEND),
|
|
@@ -551,8 +564,8 @@ function createPbrComposer(deps) {
|
|
|
551
564
|
};
|
|
552
565
|
}
|
|
553
566
|
async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
554
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
555
|
-
const engine = scene.engine;
|
|
567
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
568
|
+
const engine = scene.surface.engine;
|
|
556
569
|
const device = engine._device;
|
|
557
570
|
const materialScratch = /* @__PURE__ */ new Map();
|
|
558
571
|
const hasEnv = !!envTextures;
|
|
@@ -595,6 +608,7 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
595
608
|
let hasSomeSkeletons = false;
|
|
596
609
|
let hasSomeMorphs = false;
|
|
597
610
|
let hasSomeThinInstances = false;
|
|
611
|
+
let hasCullingTI = false;
|
|
598
612
|
let hasAnyUnlit = false;
|
|
599
613
|
let hasAnyUvTransform = false;
|
|
600
614
|
let hasAnyUv2 = false;
|
|
@@ -616,6 +630,7 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
616
630
|
hasSomeSkeletons || (hasSomeSkeletons = !!m.skeleton);
|
|
617
631
|
hasSomeMorphs || (hasSomeMorphs = !!m.morphTargets);
|
|
618
632
|
hasSomeThinInstances || (hasSomeThinInstances = !!m.thinInstances);
|
|
633
|
+
hasCullingTI || (hasCullingTI = !!((_h = m.thinInstances) == null ? void 0 : _h._gpuCullingEnabled));
|
|
619
634
|
hasAnyUnlit || (hasAnyUnlit = !!mat.unlit);
|
|
620
635
|
hasAnyUvTransform || (hasAnyUvTransform = !!mat._hasUvTx);
|
|
621
636
|
hasAnyUv2 || (hasAnyUv2 = !!m._gpu.uv2Buffer && mat.occlusionTexCoord === 1);
|
|
@@ -648,12 +663,12 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
648
663
|
};
|
|
649
664
|
}
|
|
650
665
|
if (needsMultiLightPath) {
|
|
651
|
-
const wgslMod = await import("./multilight-wgsl-
|
|
666
|
+
const wgslMod = await import("./multilight-wgsl-DMeppAdZ.js");
|
|
652
667
|
_multiLightWGSL = wgslMod.MULTI_LIGHT_STRUCTS() + wgslMod.COMPUTE_PBR_LIGHT;
|
|
653
668
|
_multiLightLoop = wgslMod.getMultiLightLoop();
|
|
654
669
|
}
|
|
655
670
|
if (hasAnyAffectedLight && hasSomeShadows) {
|
|
656
|
-
const shadowMod = await import("./pbr-shadow-fragment-
|
|
671
|
+
const shadowMod = await import("./pbr-shadow-fragment-CnqnbGYS.js");
|
|
657
672
|
_createPbrShadowFragment = shadowMod.createPbrShadowFragment;
|
|
658
673
|
}
|
|
659
674
|
const _drainPbrExts = async (loaders) => {
|
|
@@ -664,22 +679,22 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
664
679
|
}
|
|
665
680
|
};
|
|
666
681
|
await _drainPbrExts([
|
|
667
|
-
[hasAlphaTest, () => import("./alpha-test-fragment-
|
|
668
|
-
[hasMetallicReflectance, () => import("./reflectance-fragment-
|
|
669
|
-
[hasClearcoat, () => import("./clearcoat-fragment-
|
|
670
|
-
[hasSheen, () => import("./sheen-fragment-
|
|
671
|
-
[hasIridescence, () => import("./iridescence-fragment-
|
|
672
|
-
[hasAnySubsurface, () => import("./subsurface-fragment-
|
|
682
|
+
[hasAlphaTest, () => import("./alpha-test-fragment-B7DjSnF7.js")],
|
|
683
|
+
[hasMetallicReflectance, () => import("./reflectance-fragment-Dbpgw3Jt.js")],
|
|
684
|
+
[hasClearcoat, () => import("./clearcoat-fragment-D6FSCie1.js")],
|
|
685
|
+
[hasSheen, () => import("./sheen-fragment-1MkEMcbc.js")],
|
|
686
|
+
[hasIridescence, () => import("./iridescence-fragment-BHU59-gQ.js")],
|
|
687
|
+
[hasAnySubsurface, () => import("./subsurface-fragment-BEaAXYXz.js")]
|
|
673
688
|
]);
|
|
674
689
|
if (hasTransmissionRefraction) {
|
|
675
|
-
const mod = await import("./pbr-refraction-
|
|
690
|
+
const mod = await import("./pbr-refraction-C9FvFmAp.js");
|
|
676
691
|
await mod.registerPbrRefraction(scene, engine, _registerPbrExt);
|
|
677
692
|
}
|
|
678
693
|
await _drainPbrExts([
|
|
679
|
-
[needsEmissiveColor, () => import("./emissive-fragment-
|
|
680
|
-
[hasAnyUnlit, () => import("./unlit-fragment-
|
|
681
|
-
[hasSomeSkeletons, () => import("./skeleton-fragment-
|
|
682
|
-
[hasSomeMorphs, () => import("./morph-fragment-
|
|
694
|
+
[needsEmissiveColor, () => import("./emissive-fragment-C5FtBs3y.js")],
|
|
695
|
+
[hasAnyUnlit, () => import("./unlit-fragment-kxfZWlnp.js")],
|
|
696
|
+
[hasSomeSkeletons, () => import("./skeleton-fragment-DdxYG6kv.js")],
|
|
697
|
+
[hasSomeMorphs, () => import("./morph-fragment-BRCUr2wQ.js")],
|
|
683
698
|
[hasAnyUvTransform, () => import("./uv-transform-fragment-hYujGpZg.js")]
|
|
684
699
|
]);
|
|
685
700
|
let _anisoExt = null;
|
|
@@ -689,16 +704,22 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
689
704
|
}
|
|
690
705
|
let _createPbrTemplateExt = null;
|
|
691
706
|
if (hasAnyUvTransform || hasAnyVertexColor || hasAnyUv2) {
|
|
692
|
-
const extMod = await import("./pbr-template-ext-
|
|
707
|
+
const extMod = await import("./pbr-template-ext-CGgB2n2y.js");
|
|
693
708
|
_createPbrTemplateExt = extMod.createPbrTemplateExt;
|
|
694
709
|
}
|
|
695
710
|
let _createThinInstanceFragment = null;
|
|
696
711
|
let _syncThinInstanceBuffers = null;
|
|
712
|
+
let _cull;
|
|
713
|
+
let _syncThinInstanceGpuData = null;
|
|
697
714
|
if (hasSomeThinInstances) {
|
|
698
715
|
const mod = await import("./thin-instance-fragment-hsv-RyDs.js");
|
|
699
716
|
_createThinInstanceFragment = mod.createThinInstanceFragment;
|
|
700
|
-
const gpuMod = await import("./thin-instance-gpu-
|
|
717
|
+
const gpuMod = await import("./thin-instance-gpu-BDdRcNAh.js");
|
|
701
718
|
_syncThinInstanceBuffers = gpuMod.syncThinInstanceBuffers;
|
|
719
|
+
if (hasCullingTI) {
|
|
720
|
+
_cull = await import("./thin-instance-cull-binding-DWKUt5ZN.js");
|
|
721
|
+
}
|
|
722
|
+
_syncThinInstanceGpuData = gpuMod.syncThinInstanceGpuData;
|
|
702
723
|
}
|
|
703
724
|
let _acesHelpers = "";
|
|
704
725
|
let _acesTonemapCall = "";
|
|
@@ -708,6 +729,13 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
708
729
|
_acesHelpers = acesMod.ACES_HELPERS_WGSL;
|
|
709
730
|
_acesTonemapCall = acesMod.ACES_TONEMAP_CALL_WGSL;
|
|
710
731
|
}
|
|
732
|
+
let _fogHelper = "";
|
|
733
|
+
let _fogBlock = "";
|
|
734
|
+
if (scene.fog) {
|
|
735
|
+
const fogMod = await import("./pbr-fog-wgsl-BqdCid6r.js");
|
|
736
|
+
_fogHelper = fogMod.PBR_FOG_HELPER;
|
|
737
|
+
_fogBlock = fogMod.PBR_FOG_BLOCK;
|
|
738
|
+
}
|
|
711
739
|
const composePbr = createPbrComposer({
|
|
712
740
|
_singleLightWGSL,
|
|
713
741
|
_getSingleLightBlock,
|
|
@@ -715,6 +743,8 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
715
743
|
_multiLightLoop,
|
|
716
744
|
_acesHelpers,
|
|
717
745
|
_acesTonemapCall,
|
|
746
|
+
_fogHelper,
|
|
747
|
+
_fogBlock,
|
|
718
748
|
_createPbrTemplateExt,
|
|
719
749
|
_anisoExt,
|
|
720
750
|
_iblSkyboxCalc,
|
|
@@ -722,10 +752,12 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
722
752
|
_shadowLights: shadowLights,
|
|
723
753
|
_createThinInstanceFragment
|
|
724
754
|
});
|
|
725
|
-
const sceneFeatures = (hasEnv ? PBR_HAS_ENV : 0) | (hasTonemap ? PBR_HAS_TONEMAP : 0);
|
|
755
|
+
const sceneFeatures = (hasEnv ? PBR_HAS_ENV : 0) | (hasTonemap ? PBR_HAS_TONEMAP : 0) | (scene.fog ? PBR_HAS_FOG : 0);
|
|
726
756
|
const shadowBGCache = /* @__PURE__ */ new Map();
|
|
727
757
|
const syncThinInstanceBuffers = _syncThinInstanceBuffers;
|
|
758
|
+
const syncThinInstanceGpuData = _syncThinInstanceGpuData;
|
|
728
759
|
const rebuildSingle = (s, mesh, materialOverride) => {
|
|
760
|
+
var _a2, _b2;
|
|
729
761
|
const materialInput = materialOverride ?? mesh.material;
|
|
730
762
|
const mat = materialInput;
|
|
731
763
|
const renderFeatures = mat._renderFeatures ?? (mat._renderFeatures = _computePbrMaterialFeatures(mat));
|
|
@@ -745,13 +777,14 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
745
777
|
const vbKey = mi._gpu._vbKey ?? "";
|
|
746
778
|
const composed = composePbr(features, features2, meshFeatures, sceneFeatures, lightMode, singleLightType, esmShadowDepthCode, vbLayout, vbKey);
|
|
747
779
|
const bindings = getOrCreatePbrBindings(engine, features, features2, meshFeatures, sceneFeatures, composed, `${lightMode}:${singleLightType}${vbKey}`);
|
|
748
|
-
const meshUboData = new
|
|
749
|
-
|
|
780
|
+
const meshUboData = new F32(composed._meshUboSpec._totalBytes / 4);
|
|
781
|
+
const _packMeshWorld = ((_a2 = engine._makePackMeshWorld) == null ? void 0 : _a2.call(engine, s)) ?? packMat4IntoF32;
|
|
782
|
+
_packMeshWorld(meshUboData, mesh.worldMatrix, 0, 0);
|
|
750
783
|
writeMeshLightSelection(mesh, s.lights, meshUboData);
|
|
751
784
|
const meshUBO = createUniformBuffer(engine, meshUboData);
|
|
752
785
|
const materialSpec = composed._materialUboSpec;
|
|
753
|
-
const matInitData = new
|
|
754
|
-
|
|
786
|
+
const matInitData = new F32(materialSpec._totalBytes / 4);
|
|
787
|
+
_writeMaterialData(matInitData, mat, materialSpec);
|
|
755
788
|
const materialUBO = createUniformBuffer(engine, matInitData);
|
|
756
789
|
const needsTaskRefraction = !!mat.transmissive && (features2 & PBR2_HAS_REFRACTION) !== 0;
|
|
757
790
|
const materialBindGroupStatic = needsTaskRefraction ? null : createPbrMeshBindGroup(engine, bindings, composed, meshUBO, materialUBO, mat, envTextures ?? null, mesh);
|
|
@@ -795,10 +828,10 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
795
828
|
const hasVertexColor = (meshFeatures & MSH_HAS_VERTEX_COLOR) !== 0;
|
|
796
829
|
const hasTI = (meshFeatures & MSH_HAS_THIN_INSTANCES) !== 0;
|
|
797
830
|
const hasTIColor = (meshFeatures & MSH_HAS_INSTANCE_COLOR) !== 0;
|
|
798
|
-
let _lastWorldVersion =
|
|
831
|
+
let _lastWorldVersion = mesh.worldMatrixVersion;
|
|
799
832
|
let _lastLightsCount = s.lights.length;
|
|
800
833
|
const sortCenter = isTransparent || needsTaskRefraction ? [mesh.worldMatrix[12], mesh.worldMatrix[13], mesh.worldMatrix[14]] : null;
|
|
801
|
-
const
|
|
834
|
+
const _baseUpdate = () => {
|
|
802
835
|
const worldVersion = mesh.worldMatrixVersion;
|
|
803
836
|
if (worldVersion !== _lastWorldVersion || s.lights.length !== _lastLightsCount) {
|
|
804
837
|
if (sortCenter) {
|
|
@@ -806,7 +839,7 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
806
839
|
sortCenter[1] = mesh.worldMatrix[13];
|
|
807
840
|
sortCenter[2] = mesh.worldMatrix[14];
|
|
808
841
|
}
|
|
809
|
-
meshUboData
|
|
842
|
+
_packMeshWorld(meshUboData, mesh.worldMatrix, 0, 0);
|
|
810
843
|
writeMeshLightSelection(mesh, s.lights, meshUboData);
|
|
811
844
|
device.queue.writeBuffer(meshUBO, 0, meshUboData);
|
|
812
845
|
_lastWorldVersion = worldVersion;
|
|
@@ -817,17 +850,27 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
817
850
|
_lastUboVersion = uboVersion;
|
|
818
851
|
let data = materialScratch.get(materialSpec._totalBytes);
|
|
819
852
|
if (!data) {
|
|
820
|
-
data = new
|
|
853
|
+
data = new F32(materialSpec._totalBytes / 4);
|
|
821
854
|
materialScratch.set(materialSpec._totalBytes, data);
|
|
822
855
|
} else {
|
|
823
856
|
data.fill(0);
|
|
824
857
|
}
|
|
825
|
-
|
|
858
|
+
_writeMaterialData(data, mat, materialSpec);
|
|
826
859
|
device.queue.writeBuffer(materialUBO, 0, data.buffer, 0, data.byteLength);
|
|
827
860
|
}
|
|
861
|
+
if (hasTI && syncThinInstanceGpuData) {
|
|
862
|
+
const ti = mesh.thinInstances;
|
|
863
|
+
if (ti) {
|
|
864
|
+
syncThinInstanceGpuData(engine, ti, hasTIColor);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
};
|
|
868
|
+
const _invalidate = () => {
|
|
869
|
+
_lastWorldVersion = -1;
|
|
828
870
|
};
|
|
829
|
-
const
|
|
830
|
-
|
|
871
|
+
const update = ((_b2 = engine._wrapRenderableForFO) == null ? void 0 : _b2.call(engine, _baseUpdate, s, _invalidate)) ?? _baseUpdate;
|
|
872
|
+
const drawWith = (pass, materialBindGroup, cullBinding) => {
|
|
873
|
+
var _a3, _b3, _c2, _d2, _e2, _f2;
|
|
831
874
|
if (!isOverride && mesh.material !== materialInput) {
|
|
832
875
|
return 0;
|
|
833
876
|
}
|
|
@@ -838,8 +881,8 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
838
881
|
}
|
|
839
882
|
let slot = 0;
|
|
840
883
|
const vb = gpu._vbLayout;
|
|
841
|
-
pass.setVertexBuffer(slot++, gpu.positionBuffer, (
|
|
842
|
-
pass.setVertexBuffer(slot++, gpu.normalBuffer, (
|
|
884
|
+
pass.setVertexBuffer(slot++, gpu.positionBuffer, (_a3 = vb == null ? void 0 : vb._p) == null ? void 0 : _a3._offset);
|
|
885
|
+
pass.setVertexBuffer(slot++, gpu.normalBuffer, (_b3 = vb == null ? void 0 : vb._n) == null ? void 0 : _b3._offset);
|
|
843
886
|
if (hasNormalMap && gpu.tangentBuffer) {
|
|
844
887
|
pass.setVertexBuffer(slot++, gpu.tangentBuffer, (_c2 = vb == null ? void 0 : vb._t) == null ? void 0 : _c2._offset);
|
|
845
888
|
}
|
|
@@ -850,27 +893,29 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
850
893
|
if (hasVertexColor && gpu.colorBuffer) {
|
|
851
894
|
pass.setVertexBuffer(slot++, gpu.colorBuffer, (_f2 = vb == null ? void 0 : vb._c) == null ? void 0 : _f2._offset);
|
|
852
895
|
}
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
pass.setVertexBuffer(slot++,
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
pass.setVertexBuffer(slot++,
|
|
896
|
+
const skin = mesh.skeleton ?? mesh.vat;
|
|
897
|
+
if (skin) {
|
|
898
|
+
pass.setVertexBuffer(slot++, skin.jointsBuffer);
|
|
899
|
+
pass.setVertexBuffer(slot++, skin.weightsBuffer);
|
|
900
|
+
if (skin.joints1Buffer && skin.weights1Buffer) {
|
|
901
|
+
pass.setVertexBuffer(slot++, skin.joints1Buffer);
|
|
902
|
+
pass.setVertexBuffer(slot++, skin.weights1Buffer);
|
|
859
903
|
}
|
|
860
904
|
}
|
|
861
905
|
const ti = hasTI ? mesh.thinInstances : null;
|
|
862
906
|
if (ti && syncThinInstanceBuffers) {
|
|
863
|
-
slot = syncThinInstanceBuffers(engine, ti, pass, slot, hasTIColor);
|
|
907
|
+
slot = syncThinInstanceBuffers(engine, ti, pass, slot, hasTIColor, cullBinding == null ? void 0 : cullBinding.cullDrawBufs);
|
|
864
908
|
}
|
|
865
909
|
pass.setIndexBuffer(gpu.indexBuffer, gpu.indexFormat);
|
|
866
|
-
if (
|
|
910
|
+
if (cullBinding) {
|
|
911
|
+
cullBinding.draw(pass, gpu.indexCount, ti.count);
|
|
912
|
+
} else if (ti && ti.count > 0) {
|
|
867
913
|
pass.drawIndexed(gpu.indexCount, ti.count);
|
|
868
914
|
} else {
|
|
869
915
|
pass.drawIndexed(gpu.indexCount);
|
|
870
916
|
}
|
|
871
917
|
return 1;
|
|
872
918
|
};
|
|
873
|
-
const draw = (pass) => drawWith(pass, materialBindGroupStatic);
|
|
874
919
|
const r = {
|
|
875
920
|
order,
|
|
876
921
|
isTransparent,
|
|
@@ -879,11 +924,12 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
879
924
|
bind(eng, sig) {
|
|
880
925
|
const pipeline = getOrCreatePbrPipeline(eng, sig, bindings);
|
|
881
926
|
const materialBindGroup = needsTaskRefraction ? createPbrMeshBindGroup(engine, bindings, composed, meshUBO, materialUBO, mat, envTextures ?? null, mesh, sig._transmissionTexture) : materialBindGroupStatic;
|
|
927
|
+
const cb = _cull == null ? void 0 : _cull.tryBind(r, s, mesh, engine, hasTIColor, isTransparent || needsTaskRefraction, update);
|
|
882
928
|
return {
|
|
883
929
|
renderable: r,
|
|
884
930
|
pipeline,
|
|
885
|
-
update,
|
|
886
|
-
draw:
|
|
931
|
+
update: cb ? cb.update : update,
|
|
932
|
+
draw: (pass) => drawWith(pass, materialBindGroup, cb)
|
|
887
933
|
};
|
|
888
934
|
}
|
|
889
935
|
};
|
|
@@ -894,6 +940,13 @@ async function buildPbrRenderables(scene, meshes, envTextures) {
|
|
|
894
940
|
return r;
|
|
895
941
|
};
|
|
896
942
|
const renderables = meshes.map((m) => rebuildSingle(scene, m));
|
|
943
|
+
scene._pbrGeomContext = {
|
|
944
|
+
_composePbr: composePbr,
|
|
945
|
+
_sceneFeatures: sceneFeatures,
|
|
946
|
+
_envTextures: envTextures ?? null,
|
|
947
|
+
_shadowLights: shadowLights,
|
|
948
|
+
_syncThinInstanceBuffers
|
|
949
|
+
};
|
|
897
950
|
scene._disposables.push(
|
|
898
951
|
() => clearPbrPipelineCache(),
|
|
899
952
|
() => clearSamplerCache(engine)
|
|
@@ -918,17 +971,17 @@ function getPackedSingleLightType(lights, packedIndex) {
|
|
|
918
971
|
}
|
|
919
972
|
async function importSingleLightWgsl(type) {
|
|
920
973
|
if (type === "hemispheric") {
|
|
921
|
-
return import("./singlelight-hemispheric-wgsl-
|
|
974
|
+
return import("./singlelight-hemispheric-wgsl-Bo0jKlW5.js");
|
|
922
975
|
}
|
|
923
976
|
if (type === "directional") {
|
|
924
|
-
return import("./singlelight-directional-wgsl-
|
|
977
|
+
return import("./singlelight-directional-wgsl-BsV8G456.js");
|
|
925
978
|
}
|
|
926
979
|
if (type === "spot") {
|
|
927
|
-
return import("./singlelight-spot-wgsl-
|
|
980
|
+
return import("./singlelight-spot-wgsl-yg3od6vL.js");
|
|
928
981
|
}
|
|
929
|
-
return import("./singlelight-point-wgsl-
|
|
982
|
+
return import("./singlelight-point-wgsl-DV39UP5Y.js");
|
|
930
983
|
}
|
|
931
|
-
function
|
|
984
|
+
function _writeMaterialData(data, material, spec) {
|
|
932
985
|
data[0] = material.environmentIntensity ?? 1;
|
|
933
986
|
data[1] = material.directIntensity ?? 1;
|
|
934
987
|
data[2] = material.reflectance ?? 0.04;
|
|
@@ -955,7 +1008,14 @@ function writeMaterialData(data, material, spec) {
|
|
|
955
1008
|
}
|
|
956
1009
|
}
|
|
957
1010
|
}
|
|
958
|
-
|
|
1011
|
+
const pbrRenderable = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1012
|
+
__proto__: null,
|
|
1013
|
+
_writeMaterialData,
|
|
959
1014
|
buildPbrRenderables
|
|
1015
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1016
|
+
export {
|
|
1017
|
+
_writeMaterialData as _,
|
|
1018
|
+
createPbrMeshBindGroup as c,
|
|
1019
|
+
pbrRenderable as p
|
|
960
1020
|
};
|
|
961
|
-
//# sourceMappingURL=pbr-renderable-
|
|
1021
|
+
//# sourceMappingURL=pbr-renderable-DzUF2QIk.js.map
|