@babylonjs/lite 0.1.1
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/_math-factory-C-QqW-Wi.js +55 -0
- package/_math-factory-C-QqW-Wi.js.map +1 -0
- package/add-block-CikX5gWy.js +6 -0
- package/add-block-CikX5gWy.js.map +1 -0
- package/alpha-test-fragment-CUiHCw7W.js +22 -0
- package/alpha-test-fragment-CUiHCw7W.js.map +1 -0
- package/ambient-occlusion-block-DForhWL3.js +77 -0
- package/ambient-occlusion-block-DForhWL3.js.map +1 -0
- package/anisotropy-block-D5fXH_OY.js +12 -0
- package/anisotropy-block-D5fXH_OY.js.map +1 -0
- package/anisotropy-fragment-HgasXS7l.js +89 -0
- package/anisotropy-fragment-HgasXS7l.js.map +1 -0
- package/arc-tan2-block-d8sWt_x0.js +12 -0
- package/arc-tan2-block-d8sWt_x0.js.map +1 -0
- package/assets/splat-sort-worker-Crg3CaCc.js.map +1 -0
- package/background-dds-skybox-yHTqabU3.js +221 -0
- package/background-dds-skybox-yHTqabU3.js.map +1 -0
- package/background-ground-DIw6D3qf.js +235 -0
- package/background-ground-DIw6D3qf.js.map +1 -0
- package/background-hdr-skybox-c4uuTmkP.js +179 -0
- package/background-hdr-skybox-c4uuTmkP.js.map +1 -0
- package/background-solid-skybox-DPGBpPbm.js +235 -0
- package/background-solid-skybox-DPGBpPbm.js.map +1 -0
- package/bake-local-matrix-Dfpd3b06.js +28 -0
- package/bake-local-matrix-Dfpd3b06.js.map +1 -0
- package/billboard-renderable-D8mlVGCd.js +242 -0
- package/billboard-renderable-D8mlVGCd.js.map +1 -0
- package/biplanar-block-DZnKuV81.js +115 -0
- package/biplanar-block-DZnKuV81.js.map +1 -0
- package/bones-block-D6IhqUVV.js +31 -0
- package/bones-block-D6IhqUVV.js.map +1 -0
- package/clamp-block-BdII67hT.js +21 -0
- package/clamp-block-BdII67hT.js.map +1 -0
- package/clearcoat-block-BGML4npi.js +12 -0
- package/clearcoat-block-BGML4npi.js.map +1 -0
- package/clearcoat-fragment-LCiG98Rf.js +256 -0
- package/clearcoat-fragment-LCiG98Rf.js.map +1 -0
- package/clip-planes-block-BPfFJrbf.js +26 -0
- package/clip-planes-block-BPfFJrbf.js.map +1 -0
- package/cloud-block-BeVrangc.js +90 -0
- package/cloud-block-BeVrangc.js.map +1 -0
- package/color-converter-block-CvwKiW4k.js +123 -0
- package/color-converter-block-CvwKiW4k.js.map +1 -0
- package/color-merger-CCu21ZII.js +57 -0
- package/color-merger-CCu21ZII.js.map +1 -0
- package/color-splitter-CGn1G4ow.js +33 -0
- package/color-splitter-CGn1G4ow.js.map +1 -0
- package/conditional-block-Cd2pbejI.js +51 -0
- package/conditional-block-Cd2pbejI.js.map +1 -0
- package/create-skeleton-C9JdIJnb.js +44 -0
- package/create-skeleton-C9JdIJnb.js.map +1 -0
- package/cross-block-DCrLwCpt.js +12 -0
- package/cross-block-DCrLwCpt.js.map +1 -0
- package/cubemap-skybox-material-DvXMVc4k.js +79 -0
- package/cubemap-skybox-material-DvXMVc4k.js.map +1 -0
- package/curve-block-BlJpXVYv.js +89 -0
- package/curve-block-BlJpXVYv.js.map +1 -0
- package/debug-block-D2pg4Yf6.js +14 -0
- package/debug-block-D2pg4Yf6.js.map +1 -0
- package/derivative-block-B8KjtaWs.js +20 -0
- package/derivative-block-B8KjtaWs.js.map +1 -0
- package/desaturate-block-C1RghNSB.js +15 -0
- package/desaturate-block-C1RghNSB.js.map +1 -0
- package/discard-block-B2jKjaEL.js +21 -0
- package/discard-block-B2jKjaEL.js.map +1 -0
- package/distance-block-3NkgFZ3f.js +16 -0
- package/distance-block-3NkgFZ3f.js.map +1 -0
- package/divide-block-ZyepIg_-.js +6 -0
- package/divide-block-ZyepIg_-.js.map +1 -0
- package/dot-block-VlfAC6cD.js +16 -0
- package/dot-block-VlfAC6cD.js.map +1 -0
- package/elbow-block-NEOiIxzO.js +10 -0
- package/elbow-block-NEOiIxzO.js.map +1 -0
- package/emissive-fragment-BnNvbBCw.js +39 -0
- package/emissive-fragment-BnNvbBCw.js.map +1 -0
- package/esm-shadow-view-DGKdF1NI.js +18 -0
- package/esm-shadow-view-DGKdF1NI.js.map +1 -0
- package/esm-shadow-view-DN9HIaM4.js +15 -0
- package/esm-shadow-view-DN9HIaM4.js.map +1 -0
- package/esm-shadow-view-Dk9NFtLq.js +15 -0
- package/esm-shadow-view-Dk9NFtLq.js.map +1 -0
- package/fog-block-DJ9hEolm.js +41 -0
- package/fog-block-DJ9hEolm.js.map +1 -0
- package/frag-coord-block-DzXfFgfV.js +25 -0
- package/frag-coord-block-DzXfFgfV.js.map +1 -0
- package/frag-depth-block-UQbeKP2D.js +34 -0
- package/frag-depth-block-UQbeKP2D.js.map +1 -0
- package/fragment-output-BOphkIeh.js +26 -0
- package/fragment-output-BOphkIeh.js.map +1 -0
- package/fresnel-block-DefHWeO-.js +20 -0
- package/fresnel-block-DefHWeO-.js.map +1 -0
- package/front-facing-0d6aiyrv.js +11 -0
- package/front-facing-0d6aiyrv.js.map +1 -0
- package/gaussian-splatting-pipeline-sh-DgJl7l56.js +500 -0
- package/gaussian-splatting-pipeline-sh-DgJl7l56.js.map +1 -0
- package/gltf-animation-D7uyTyO3.js +245 -0
- package/gltf-animation-D7uyTyO3.js.map +1 -0
- package/gltf-ext-anisotropy-CknJiJK8.js +22 -0
- package/gltf-ext-anisotropy-CknJiJK8.js.map +1 -0
- package/gltf-ext-basisu-CPg5kPrx.js +452 -0
- package/gltf-ext-basisu-CPg5kPrx.js.map +1 -0
- package/gltf-ext-clearcoat-CLH2SVph.js +31 -0
- package/gltf-ext-clearcoat-CLH2SVph.js.map +1 -0
- package/gltf-ext-dielectric-qHzlnvdl.js +105 -0
- package/gltf-ext-dielectric-qHzlnvdl.js.map +1 -0
- package/gltf-ext-emissive-strength-nzGZXZVK.js +19 -0
- package/gltf-ext-emissive-strength-nzGZXZVK.js.map +1 -0
- package/gltf-ext-iridescence-C6bq7jiM.js +26 -0
- package/gltf-ext-iridescence-C6bq7jiM.js.map +1 -0
- package/gltf-ext-node-visibility-MafA9ot2.js +25 -0
- package/gltf-ext-node-visibility-MafA9ot2.js.map +1 -0
- package/gltf-ext-orm-CT18G_vQ.js +33 -0
- package/gltf-ext-orm-CT18G_vQ.js.map +1 -0
- package/gltf-ext-quantization-CpZyLDIz.js +94 -0
- package/gltf-ext-quantization-CpZyLDIz.js.map +1 -0
- package/gltf-ext-sheen-BgIxUzyZ.js +25 -0
- package/gltf-ext-sheen-BgIxUzyZ.js.map +1 -0
- package/gltf-ext-spec-gloss-D0LJLBUM.js +24 -0
- package/gltf-ext-spec-gloss-D0LJLBUM.js.map +1 -0
- package/gltf-ext-unlit-D2ANui0V.js +16 -0
- package/gltf-ext-unlit-D2ANui0V.js.map +1 -0
- package/gltf-ext-uv-transform-CE_-T1Tr.js +38 -0
- package/gltf-ext-uv-transform-CE_-T1Tr.js.map +1 -0
- package/gltf-feature-animation-pointer-BjpwOOqo.js +88 -0
- package/gltf-feature-animation-pointer-BjpwOOqo.js.map +1 -0
- package/gltf-feature-animations-CCizegp8.js +15 -0
- package/gltf-feature-animations-CCizegp8.js.map +1 -0
- package/gltf-feature-draco-yGSMGTE3.js +124 -0
- package/gltf-feature-draco-yGSMGTE3.js.map +1 -0
- package/gltf-feature-gpu-instancing-2e_CFQnl.js +151 -0
- package/gltf-feature-gpu-instancing-2e_CFQnl.js.map +1 -0
- package/gltf-feature-lights-punctual-DDDg4j0U.js +71 -0
- package/gltf-feature-lights-punctual-DDDg4j0U.js.map +1 -0
- package/gltf-feature-meshopt-Des96YFI.js +84 -0
- package/gltf-feature-meshopt-Des96YFI.js.map +1 -0
- package/gltf-feature-morph-CKCw6tkX.js +29 -0
- package/gltf-feature-morph-CKCw6tkX.js.map +1 -0
- package/gltf-feature-skeleton-D8hWLqi2.js +36 -0
- package/gltf-feature-skeleton-D8hWLqi2.js.map +1 -0
- package/gltf-feature-variants-Ds6v9byg.js +17 -0
- package/gltf-feature-variants-Ds6v9byg.js.map +1 -0
- package/gltf-feature-xmp-BUfq_IVG.js +15 -0
- package/gltf-feature-xmp-BUfq_IVG.js.map +1 -0
- package/gltf-glb-parser-D6UZWFuC.js +27 -0
- package/gltf-glb-parser-D6UZWFuC.js.map +1 -0
- package/gltf-interleave-DGnUlz28.js +241 -0
- package/gltf-interleave-DGnUlz28.js.map +1 -0
- package/gltf-pbr-builder-ext-BFOxOCnQ.js +85 -0
- package/gltf-pbr-builder-ext-BFOxOCnQ.js.map +1 -0
- package/gltf-variants-DFbr8EES.js +88 -0
- package/gltf-variants-DFbr8EES.js.map +1 -0
- package/gradient-block-DL_60sDc.js +50 -0
- package/gradient-block-DL_60sDc.js.map +1 -0
- package/gs-picking-pipeline-DzfMASL9.js +280 -0
- package/gs-picking-pipeline-DzfMASL9.js.map +1 -0
- package/height-to-normal-block-DhPHkDFg.js +65 -0
- package/height-to-normal-block-DhPHkDFg.js.map +1 -0
- package/ibl-fragment-DqQVi8k0.js +91 -0
- package/ibl-fragment-DqQVi8k0.js.map +1 -0
- package/ibl-skybox-wgsl-DCah0kWV.js +13 -0
- package/ibl-skybox-wgsl-DCah0kWV.js.map +1 -0
- package/image-processing-block-DwrhhmuF.js +40 -0
- package/image-processing-block-DwrhhmuF.js.map +1 -0
- package/image-source-BuMJgd9-.js +17 -0
- package/image-source-BuMJgd9-.js.map +1 -0
- package/index-C8HOR2sB.js +19222 -0
- package/index-C8HOR2sB.js.map +1 -0
- package/index.d.ts +4611 -0
- package/index.js +309 -0
- package/index.js.map +1 -0
- package/input-block-DgAJBzN_.js +109 -0
- package/input-block-DgAJBzN_.js.map +1 -0
- package/instances-block-BaSSiz8m.js +12 -0
- package/instances-block-BaSSiz8m.js.map +1 -0
- package/iridescence-block-B0pRFoOU.js +67 -0
- package/iridescence-block-B0pRFoOU.js.map +1 -0
- package/iridescence-fragment-Gymp7or5.js +243 -0
- package/iridescence-fragment-Gymp7or5.js.map +1 -0
- package/length-block-ChOkeiHR.js +11 -0
- package/length-block-ChOkeiHR.js.map +1 -0
- package/lerp-block-DjI2SfmI.js +18 -0
- package/lerp-block-DjI2SfmI.js.map +1 -0
- package/light-block-B11ew7FA.js +123 -0
- package/light-block-B11ew7FA.js.map +1 -0
- package/light-information-VJbW0jbs.js +19 -0
- package/light-information-VJbW0jbs.js.map +1 -0
- package/loop-block-Bb23EOMb.js +71 -0
- package/loop-block-Bb23EOMb.js.map +1 -0
- package/manifold-AS8POaOr.js +3022 -0
- package/manifold-AS8POaOr.js.map +1 -0
- package/manifold-RCa7RkKz.js +5 -0
- package/manifold-RCa7RkKz.js.map +1 -0
- package/matrix-blocks-acWn_V6g.js +51 -0
- package/matrix-blocks-acWn_V6g.js.map +1 -0
- package/max-block-CjFgljZ7.js +6 -0
- package/max-block-CjFgljZ7.js.map +1 -0
- package/mesh-attribute-exists-block-BfK8UiSL.js +44 -0
- package/mesh-attribute-exists-block-BfK8UiSL.js.map +1 -0
- package/mesh-features-BLENkYVt.js +341 -0
- package/mesh-features-BLENkYVt.js.map +1 -0
- package/min-block-CHtBngNl.js +6 -0
- package/min-block-CHtBngNl.js.map +1 -0
- package/mod-block-Ceizv8Y7.js +6 -0
- package/mod-block-Ceizv8Y7.js.map +1 -0
- package/morph-fragment-DOVo70gP.js +59 -0
- package/morph-fragment-DOVo70gP.js.map +1 -0
- package/morph-targets-55z342ZB.js +35 -0
- package/morph-targets-55z342ZB.js.map +1 -0
- package/multilight-wgsl-BGyiIOp3.js +112 -0
- package/multilight-wgsl-BGyiIOp3.js.map +1 -0
- package/multiply-block-DaXLJ7Ud.js +6 -0
- package/multiply-block-DaXLJ7Ud.js.map +1 -0
- package/negate-block-9CSLc5pM.js +6 -0
- package/negate-block-9CSLc5pM.js.map +1 -0
- package/nlerp-block-BNK1adIb.js +21 -0
- package/nlerp-block-BNK1adIb.js.map +1 -0
- package/node-env-BPZXZzBf.js +39 -0
- package/node-env-BPZXZzBf.js.map +1 -0
- package/node-registry-DwgC4yth.js +190 -0
- package/node-registry-DwgC4yth.js.map +1 -0
- package/node-registry-extra-advanced-2DJVt67-.js +45 -0
- package/node-registry-extra-advanced-2DJVt67-.js.map +1 -0
- package/node-registry-extra-compat-Dhrw8fDQ.js +41 -0
- package/node-registry-extra-compat-Dhrw8fDQ.js.map +1 -0
- package/node-registry-extra-math-CsAHvIZo.js +49 -0
- package/node-registry-extra-math-CsAHvIZo.js.map +1 -0
- package/node-registry-extra-procedural-5pLQ3Bhz.js +45 -0
- package/node-registry-extra-procedural-5pLQ3Bhz.js.map +1 -0
- package/node-renderable-DlLIdBmd.js +269 -0
- package/node-renderable-DlLIdBmd.js.map +1 -0
- package/node-shadow-DKrcqmNg.js +122 -0
- package/node-shadow-DKrcqmNg.js.map +1 -0
- package/node-snippet-DUMm9qEO.js +22 -0
- package/node-snippet-DUMm9qEO.js.map +1 -0
- package/normal-blend-block-BfH_nBoj.js +29 -0
- package/normal-blend-block-BfH_nBoj.js.map +1 -0
- package/normal-map-fragment-DpsIXrJf.js +38 -0
- package/normal-map-fragment-DpsIXrJf.js.map +1 -0
- package/normalize-block-F2bLNj9K.js +6 -0
- package/normalize-block-F2bLNj9K.js.map +1 -0
- package/oneminus-block-BP9x4Dc3.js +6 -0
- package/oneminus-block-BP9x4Dc3.js.map +1 -0
- package/opposite-block-Cnqmm-lH.js +6 -0
- package/opposite-block-Cnqmm-lH.js.map +1 -0
- package/package.json +26 -0
- package/panner-block-BwMQq-6Y.js +13 -0
- package/panner-block-BwMQq-6Y.js.map +1 -0
- package/parse-camera-DM3oJJeT.js +23 -0
- package/parse-camera-DM3oJJeT.js.map +1 -0
- package/pbr-aces-wgsl-HpiQHGN_.js +13 -0
- package/pbr-aces-wgsl-HpiQHGN_.js.map +1 -0
- package/pbr-metallic-roughness-block-full-6vMm1Jk6.js +763 -0
- package/pbr-metallic-roughness-block-full-6vMm1Jk6.js.map +1 -0
- package/pbr-metallic-roughness-block-h_KAOZrW.js +104 -0
- package/pbr-metallic-roughness-block-h_KAOZrW.js.map +1 -0
- package/pbr-mr-helper-core-CIwm-T1G.js +237 -0
- package/pbr-mr-helper-core-CIwm-T1G.js.map +1 -0
- package/pbr-refraction-DGmMSa2v.js +17 -0
- package/pbr-refraction-DGmMSa2v.js.map +1 -0
- package/pbr-renderable-BJxUtPBb.js +961 -0
- package/pbr-renderable-BJxUtPBb.js.map +1 -0
- package/pbr-shadow-fragment-LO9SlbJj.js +14 -0
- package/pbr-shadow-fragment-LO9SlbJj.js.map +1 -0
- package/pbr-template-ext-8q7BcTDf.js +88 -0
- package/pbr-template-ext-8q7BcTDf.js.map +1 -0
- package/pbr-tracking-B3alzn91.js +31 -0
- package/pbr-tracking-B3alzn91.js.map +1 -0
- package/pbr-transmission-ext-BxW4CEGu.js +581 -0
- package/pbr-transmission-ext-BxW4CEGu.js.map +1 -0
- package/perturb-normal-0Q8EM9ig.js +39 -0
- package/perturb-normal-0Q8EM9ig.js.map +1 -0
- package/posterize-block-DfdKsbEf.js +28 -0
- package/posterize-block-DfdKsbEf.js.map +1 -0
- package/pow-block-DI5ICzhc.js +13 -0
- package/pow-block-DI5ICzhc.js.map +1 -0
- package/random-number-block-2OyRYljF.js +15 -0
- package/random-number-block-2OyRYljF.js.map +1 -0
- package/reciprocal-block-Ck3CW-j-.js +14 -0
- package/reciprocal-block-Ck3CW-j-.js.map +1 -0
- package/reflect-block-CizpzrX4.js +12 -0
- package/reflect-block-CizpzrX4.js.map +1 -0
- package/reflectance-fragment-BCrgPmrt.js +143 -0
- package/reflectance-fragment-BCrgPmrt.js.map +1 -0
- package/reflection-block-DqcwyYqr.js +12 -0
- package/reflection-block-DqcwyYqr.js.map +1 -0
- package/reflection-texture-base-block-1xmJ0HDj.js +10 -0
- package/reflection-texture-base-block-1xmJ0HDj.js.map +1 -0
- package/reflection-texture-block-C3QtzoV8.js +60 -0
- package/reflection-texture-block-C3QtzoV8.js.map +1 -0
- package/refract-block-HHiAk-7U.js +13 -0
- package/refract-block-HHiAk-7U.js.map +1 -0
- package/refraction-block-U8y6XiXs.js +11 -0
- package/refraction-block-U8y6XiXs.js.map +1 -0
- package/refraction-dispersion-wgsl-DdQCyyO1.js +16 -0
- package/refraction-dispersion-wgsl-DdQCyyO1.js.map +1 -0
- package/remap-block-DxK1W1vp.js +27 -0
- package/remap-block-DxK1W1vp.js.map +1 -0
- package/replace-color-block-1m--hiru.js +17 -0
- package/replace-color-block-1m--hiru.js.map +1 -0
- package/rgbd-decode-DCvzUYeI.js +110 -0
- package/rgbd-decode-DCvzUYeI.js.map +1 -0
- package/rotate2d-block-nEe1N2MJ.js +15 -0
- package/rotate2d-block-nEe1N2MJ.js.map +1 -0
- package/scale-block-C5Z8159G.js +13 -0
- package/scale-block-C5Z8159G.js.map +1 -0
- package/scene-material-swap-C2ykv55W.js +34 -0
- package/scene-material-swap-C2ykv55W.js.map +1 -0
- package/screen-size-block-BVNnOvE8.js +21 -0
- package/screen-size-block-BVNnOvE8.js.map +1 -0
- package/screen-space-block-CwaxdfSe.js +28 -0
- package/screen-space-block-CwaxdfSe.js.map +1 -0
- package/shader-renderable-D-6796KR.js +531 -0
- package/shader-renderable-D-6796KR.js.map +1 -0
- package/shadow-fragment-core-DHN2G6FI.js +110 -0
- package/shadow-fragment-core-DHN2G6FI.js.map +1 -0
- package/shadow-map-CQNQC-Fw.js +13 -0
- package/shadow-map-CQNQC-Fw.js.map +1 -0
- package/sheen-block-BugfJqK3.js +12 -0
- package/sheen-block-BugfJqK3.js.map +1 -0
- package/sheen-fragment-Dze2f7XJ.js +215 -0
- package/sheen-fragment-Dze2f7XJ.js.map +1 -0
- package/simplex-perlin-3d-block-CcMtofzV.js +58 -0
- package/simplex-perlin-3d-block-CcMtofzV.js.map +1 -0
- package/singlelight-directional-wgsl-CmUDZxwz.js +39 -0
- package/singlelight-directional-wgsl-CmUDZxwz.js.map +1 -0
- package/singlelight-hemispheric-wgsl-t-83IP_s.js +40 -0
- package/singlelight-hemispheric-wgsl-t-83IP_s.js.map +1 -0
- package/singlelight-point-wgsl-CLzULIYV.js +45 -0
- package/singlelight-point-wgsl-CLzULIYV.js.map +1 -0
- package/singlelight-spot-wgsl-DEEUrfVM.js +47 -0
- package/singlelight-spot-wgsl-DEEUrfVM.js.map +1 -0
- package/skeleton-fragment-B_XlFbtx.js +71 -0
- package/skeleton-fragment-B_XlFbtx.js.map +1 -0
- package/skybox-renderable-DDwzu-PT.js +92 -0
- package/skybox-renderable-DDwzu-PT.js.map +1 -0
- package/skybox.vertex-DJgi072W.js +5 -0
- package/skybox.vertex-DJgi072W.js.map +1 -0
- package/smoothstep-block-Di4t37x-.js +15 -0
- package/smoothstep-block-Di4t37x-.js.map +1 -0
- package/splat-ply-compressed-BahdBG1r.js +394 -0
- package/splat-ply-compressed-BahdBG1r.js.map +1 -0
- package/standard-renderable-GjxL9xSf.js +636 -0
- package/standard-renderable-GjxL9xSf.js.map +1 -0
- package/std-ambient-fragment-BoUsD06w.js +37 -0
- package/std-ambient-fragment-BoUsD06w.js.map +1 -0
- package/std-cube-reflection-fragment-ulqc3bsP.js +31 -0
- package/std-cube-reflection-fragment-ulqc3bsP.js.map +1 -0
- package/std-emissive-fragment-DNGj1HdQ.js +40 -0
- package/std-emissive-fragment-DNGj1HdQ.js.map +1 -0
- package/std-lightmap-fragment-Bqj89aIe.js +37 -0
- package/std-lightmap-fragment-Bqj89aIe.js.map +1 -0
- package/std-opacity-fragment-KuPh5N2Z.js +37 -0
- package/std-opacity-fragment-KuPh5N2Z.js.map +1 -0
- package/std-reflection-fragment-BA5Ghn_M.js +57 -0
- package/std-reflection-fragment-BA5Ghn_M.js.map +1 -0
- package/std-shadow-fragment-FNQfrJuC.js +8 -0
- package/std-shadow-fragment-FNQfrJuC.js.map +1 -0
- package/std-specular-fragment-CE-6scqd.js +37 -0
- package/std-specular-fragment-CE-6scqd.js.map +1 -0
- package/std-tracking-CNKZ-hJN.js +15 -0
- package/std-tracking-CNKZ-hJN.js.map +1 -0
- package/step-block-BkywzTYm.js +13 -0
- package/step-block-BkywzTYm.js.map +1 -0
- package/storage-read-block-BdzhJfln.js +25 -0
- package/storage-read-block-BdzhJfln.js.map +1 -0
- package/storage-write-block-DjLKZ0Ro.js +11 -0
- package/storage-write-block-DjLKZ0Ro.js.map +1 -0
- package/subsurface-block-CBhxT9ui.js +12 -0
- package/subsurface-block-CBhxT9ui.js.map +1 -0
- package/subsurface-fragment-liM3y2-P.js +158 -0
- package/subsurface-fragment-liM3y2-P.js.map +1 -0
- package/subtract-block-NPfKvzQP.js +6 -0
- package/subtract-block-NPfKvzQP.js.map +1 -0
- package/swapchain-overlay-DcCSFDp7.js +35 -0
- package/swapchain-overlay-DcCSFDp7.js.map +1 -0
- package/tbn-block-ByOI6Y43.js +43 -0
- package/tbn-block-ByOI6Y43.js.map +1 -0
- package/teleport-in-block-BMa17cqq.js +10 -0
- package/teleport-in-block-BMa17cqq.js.map +1 -0
- package/teleport-out-block-5AkB25H6.js +19 -0
- package/teleport-out-block-5AkB25H6.js.map +1 -0
- package/texture-block-rr21KIL_.js +70 -0
- package/texture-block-rr21KIL_.js.map +1 -0
- package/thin-instance-fragment-hsv-RyDs.js +69 -0
- package/thin-instance-fragment-hsv-RyDs.js.map +1 -0
- package/thin-instance-gpu-C9Gv_Z1w.js +62 -0
- package/thin-instance-gpu-C9Gv_Z1w.js.map +1 -0
- package/tracking-primitives-wgdBY85t.js +82 -0
- package/tracking-primitives-wgdBY85t.js.map +1 -0
- package/transform-block-DbRph9JI.js +32 -0
- package/transform-block-DbRph9JI.js.map +1 -0
- package/trigonometry-block-BYQcTHiD.js +36 -0
- package/trigonometry-block-BYQcTHiD.js.map +1 -0
- package/triplanar-block-BZHkD9hX.js +148 -0
- package/triplanar-block-BZHkD9hX.js.map +1 -0
- package/twirl-block-78WtdiBd.js +39 -0
- package/twirl-block-78WtdiBd.js.map +1 -0
- package/unlit-fragment-BIlhJpz6.js +43 -0
- package/unlit-fragment-BIlhJpz6.js.map +1 -0
- package/uv-transform-fragment-hYujGpZg.js +47 -0
- package/uv-transform-fragment-hYujGpZg.js.map +1 -0
- package/vector-merger-CrW-ONB0.js +43 -0
- package/vector-merger-CrW-ONB0.js.map +1 -0
- package/vector-splitter-BoJuHrAU.js +34 -0
- package/vector-splitter-BoJuHrAU.js.map +1 -0
- package/vertex-output-Cvft64y0.js +14 -0
- package/vertex-output-Cvft64y0.js.map +1 -0
- package/view-direction-CWVucfnT.js +12 -0
- package/view-direction-CWVucfnT.js.map +1 -0
- package/voronoi-noise-block-iNQxa_Ls.js +43 -0
- package/voronoi-noise-block-iNQxa_Ls.js.map +1 -0
- package/wave-block-CY_mk1ec.js +41 -0
- package/wave-block-CY_mk1ec.js.map +1 -0
- package/wgsl-helpers-DyzNzCeE.js +48 -0
- package/wgsl-helpers-DyzNzCeE.js.map +1 -0
- package/worley-noise-3d-block-CyR2-k4s.js +58 -0
- package/worley-noise-3d-block-CyR2-k4s.js.map +1 -0
package/index.js
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { bI, bJ, bK, bL, M, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI, cJ, cK, cL, cM, cN, cO, cP, cQ, cR, cS, cT, cU, cV, C, cW, cX, cY, cZ, c_, c$, d0, bq, d1, Q, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df, dg, dh, di, dj, dk, dl, dm, dn, dp, dq, dr, ds, dt, du, dv, dw, dx, dy, dz, dA, dB, dC, dD, dE, dF, dG, dH, dI, dJ, dK, dL, dM, dN, dO, dP, dQ, dR, dS, dT, dU, dV, dW, dX, dY, dZ, d_, d$, e0, e1, e2, e3, e4, e5, e6, e7, e8, W, e9, ea, eb, ec, ed, ee, ef, eg, O, eh, a$, ei, ej, ek, el, em, en, eo, L, ep, eq, K, b0, er, es, Y, et, eu, ev, ew, ex, ey, ez, eA, eB, eC, eD, eE, eF, eG, eH, eI, eJ, m, eK, k, eL, eM, eN, eO, eP, eQ, eR, eS, eT, eU, eV, eW, eX, eY, eZ, e_, e$, f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, fa, fb, fc, fd, fe, ff, fg, fh, fi, fj, fk, fl, fm, fn, fo, fp, fq, fr, fs, ft, s, h, fu, fv, fw, fx, fy, fz, fA, fB, fC, fD, fE, fF, fG, fH, fI, fJ, fK, fL, fM, h as h2, fN, fO, v, fP, fQ, fR, fS, fT, fU, fV, fW, fX, fY, fZ, f_, f$, g0, g1, g2, g3, g4, g5, g6, g7, g8, g9, ga, gb, gc } from "./index-C8HOR2sB.js";
|
|
2
|
+
export {
|
|
3
|
+
bI as CAP_ALL,
|
|
4
|
+
bJ as CAP_END,
|
|
5
|
+
bK as CAP_NONE,
|
|
6
|
+
bL as CAP_START,
|
|
7
|
+
M as MAX_LIGHTS,
|
|
8
|
+
bM as ObservableQuat,
|
|
9
|
+
bN as ObservableVec3,
|
|
10
|
+
bO as PhysicsMotionType,
|
|
11
|
+
bP as PhysicsShapeType,
|
|
12
|
+
bQ as VERSION,
|
|
13
|
+
bR as addAgent,
|
|
14
|
+
bS as addAnimationGroup,
|
|
15
|
+
bT as addAnimationGroups,
|
|
16
|
+
bU as addAnimationTask,
|
|
17
|
+
bV as addAxisLockedBillboardSystem,
|
|
18
|
+
bW as addBillboardSprite,
|
|
19
|
+
bX as addBillboardSpriteIndex,
|
|
20
|
+
bY as addBoxObstacle,
|
|
21
|
+
bZ as addCylinderObstacle,
|
|
22
|
+
b_ as addDepthHostedSpriteLayer,
|
|
23
|
+
b$ as addFacingBillboardSystem,
|
|
24
|
+
c0 as addPassDependencies,
|
|
25
|
+
c1 as addRenderPass,
|
|
26
|
+
c2 as addSprite2D,
|
|
27
|
+
c3 as addSprite2DIndex,
|
|
28
|
+
c4 as addSpriteAnimation,
|
|
29
|
+
c5 as addSpriteAnimationManager,
|
|
30
|
+
c6 as addSpriteRendererLayer,
|
|
31
|
+
c7 as addTask,
|
|
32
|
+
c8 as addTaskAtStart,
|
|
33
|
+
c9 as addTaskBefore,
|
|
34
|
+
ca as addThinInstance,
|
|
35
|
+
cb as addToScene,
|
|
36
|
+
cc as agentGoto,
|
|
37
|
+
cd as attachControl,
|
|
38
|
+
ce as attachFreeControl,
|
|
39
|
+
cf as attachSpriteAnimationsToRenderer,
|
|
40
|
+
cg as attachSpriteAnimationsToScene,
|
|
41
|
+
ch as bakeCurrentTransformIntoVertices,
|
|
42
|
+
ci as bakeTransformIntoVertices,
|
|
43
|
+
cj as billboardBlendAdditive,
|
|
44
|
+
ck as billboardBlendAlpha,
|
|
45
|
+
cl as billboardBlendCutout,
|
|
46
|
+
cm as billboardBlendPremultiplied,
|
|
47
|
+
cn as clearAnimationManager,
|
|
48
|
+
co as clearBillboardSprites,
|
|
49
|
+
cp as clearSprite2DLayer,
|
|
50
|
+
cq as clearSpriteAnimations,
|
|
51
|
+
cr as cloneTransformNode,
|
|
52
|
+
cs as computePath,
|
|
53
|
+
ct as createAnaglyphPostProcessTask,
|
|
54
|
+
cu as createAnimationController,
|
|
55
|
+
cv as createAnimationGroups,
|
|
56
|
+
cw as createAnimationManager,
|
|
57
|
+
cx as createAnimationTask,
|
|
58
|
+
cy as createArcRotateCamera,
|
|
59
|
+
cz as createAxisLockedBillboardSystem,
|
|
60
|
+
cA as createBillboardCustomShader,
|
|
61
|
+
cB as createBlackAndWhitePostProcessTask,
|
|
62
|
+
cC as createBloomPostProcessTask,
|
|
63
|
+
cD as createBlurPostProcessTask,
|
|
64
|
+
cE as createBox,
|
|
65
|
+
cF as createChromaticAberrationPostProcessTask,
|
|
66
|
+
cG as createCsg2FromMesh,
|
|
67
|
+
cH as createCsgFromMesh,
|
|
68
|
+
cI as createCylinder,
|
|
69
|
+
cJ as createDebugNavMeshGeometry,
|
|
70
|
+
cK as createDefaultCamera,
|
|
71
|
+
cL as createDirectionalLight,
|
|
72
|
+
cM as createDisc,
|
|
73
|
+
cN as createEffectRenderTask,
|
|
74
|
+
cO as createEffectRenderer,
|
|
75
|
+
cP as createEffectWrapper,
|
|
76
|
+
cQ as createEngine,
|
|
77
|
+
cR as createEsmDirectionalShadowGenerator,
|
|
78
|
+
cS as createExtractHighlightsPostProcessTask,
|
|
79
|
+
cT as createExtrudeShape,
|
|
80
|
+
cU as createFacingBillboardSystem,
|
|
81
|
+
cV as createFrameGraphContext,
|
|
82
|
+
C as createFreeCamera,
|
|
83
|
+
cW as createGpuPicker,
|
|
84
|
+
cX as createGridMaterial,
|
|
85
|
+
cY as createGridSpriteAtlas,
|
|
86
|
+
cZ as createGround,
|
|
87
|
+
c_ as createGroundFromHeightMap,
|
|
88
|
+
c$ as createHavokWorld,
|
|
89
|
+
d0 as createHemisphericLight,
|
|
90
|
+
bq as createImageProcessingTask,
|
|
91
|
+
d1 as createLinearDepthMaterial,
|
|
92
|
+
Q as createMaterialView,
|
|
93
|
+
d2 as createMeshFromCsg,
|
|
94
|
+
d3 as createMeshFromCsg2,
|
|
95
|
+
d4 as createMeshFromData,
|
|
96
|
+
d5 as createMeshesFromCsg2,
|
|
97
|
+
d6 as createMorphTargets,
|
|
98
|
+
d7 as createNavCrowd,
|
|
99
|
+
d8 as createNavMesh,
|
|
100
|
+
d9 as createNavigationPluginAsync,
|
|
101
|
+
da as createNodeNoColorMaterialView,
|
|
102
|
+
db as createPbrMaterial,
|
|
103
|
+
dc as createPbrNoColorMaterialView,
|
|
104
|
+
dd as createPcfDirectionalShadowGenerator,
|
|
105
|
+
de as createPcfSpotlightShadowGenerator,
|
|
106
|
+
df as createPhysicsAggregate,
|
|
107
|
+
dg as createPhysicsBody,
|
|
108
|
+
dh as createPhysicsShape,
|
|
109
|
+
di as createPlane,
|
|
110
|
+
dj as createPointLight,
|
|
111
|
+
dk as createPolyhedron,
|
|
112
|
+
dl as createProceduralGaussianSplattingMesh,
|
|
113
|
+
dm as createPropertyAnimationClip,
|
|
114
|
+
dn as createPropertyAnimationGroup,
|
|
115
|
+
dp as createRenderTarget,
|
|
116
|
+
dq as createRenderTargetTexture,
|
|
117
|
+
dr as createRenderTask,
|
|
118
|
+
ds as createRibbon,
|
|
119
|
+
dt as createSceneContext,
|
|
120
|
+
du as createShaderMaterial,
|
|
121
|
+
dv as createShadowTask,
|
|
122
|
+
dw as createSolidTexture2D,
|
|
123
|
+
dx as createSphere,
|
|
124
|
+
dy as createSphereData,
|
|
125
|
+
dz as createSpotLight,
|
|
126
|
+
dA as createSprite2DCustomShader,
|
|
127
|
+
dB as createSprite2DLayer,
|
|
128
|
+
dC as createSpriteAnimationManager,
|
|
129
|
+
dD as createSpriteAtlasFromFrames,
|
|
130
|
+
dE as createSpriteFrameAnimation,
|
|
131
|
+
dF as createSpriteRenderer,
|
|
132
|
+
dG as createStandardMaterial,
|
|
133
|
+
dH as createStandardNoColorMaterialView,
|
|
134
|
+
dI as createTexture2DFromPixels,
|
|
135
|
+
dJ as createTorus,
|
|
136
|
+
dK as createTransformNode,
|
|
137
|
+
dL as createTube,
|
|
138
|
+
dM as createUniformEffectRenderTask,
|
|
139
|
+
dN as createUniformEffectWrapper,
|
|
140
|
+
dO as crossFadeAnimationGroups,
|
|
141
|
+
dP as csg2Add,
|
|
142
|
+
dQ as csg2Intersect,
|
|
143
|
+
dR as csg2Subtract,
|
|
144
|
+
dS as csgIntersect,
|
|
145
|
+
dT as csgSubtract,
|
|
146
|
+
dU as csgUnion,
|
|
147
|
+
dV as disposeCsg2,
|
|
148
|
+
dW as disposeEffectRenderer,
|
|
149
|
+
dX as disposeEffectWrapper,
|
|
150
|
+
dY as disposeEngine,
|
|
151
|
+
dZ as disposeFrameGraphContext,
|
|
152
|
+
d_ as disposePhysics,
|
|
153
|
+
d$ as disposePicker,
|
|
154
|
+
e0 as disposeScene,
|
|
155
|
+
e1 as disposeSpriteAnimationBinding,
|
|
156
|
+
e2 as disposeSpriteRenderer,
|
|
157
|
+
e3 as disposeUniformEffectWrapper,
|
|
158
|
+
e4 as enableAnimationBlending,
|
|
159
|
+
e5 as enableDetailedPicking,
|
|
160
|
+
e6 as enableMaterialTracking,
|
|
161
|
+
e7 as enablePropertyAnimationBlending,
|
|
162
|
+
e8 as enableThinInstanceGpuCulling,
|
|
163
|
+
W as encodeIdToColor,
|
|
164
|
+
e9 as fadeAnimationWeight,
|
|
165
|
+
ea as findRandomPoint,
|
|
166
|
+
eb as findRandomPointAroundCircle,
|
|
167
|
+
ec as flushThinInstances,
|
|
168
|
+
ed as getAgentPosition,
|
|
169
|
+
ee as getAgentVelocity,
|
|
170
|
+
ef as getAnimationGroups,
|
|
171
|
+
eg as getBillboardSpriteHandleIndex,
|
|
172
|
+
O as getCameraPosition,
|
|
173
|
+
eh as getClosestPoint,
|
|
174
|
+
a$ as getEffectiveAspectRatio,
|
|
175
|
+
ei as getFrameGraph,
|
|
176
|
+
ej as getNavigationRandomSeed,
|
|
177
|
+
ek as getPhysicsGravity,
|
|
178
|
+
el as getPhysicsTimestep,
|
|
179
|
+
em as getPhysicsVelocityLimits,
|
|
180
|
+
en as getPickedNormal,
|
|
181
|
+
eo as getPickedUV,
|
|
182
|
+
L as getProjectionMatrix,
|
|
183
|
+
ep as getSprite2DHandleIndex,
|
|
184
|
+
eq as getVariantNames,
|
|
185
|
+
K as getViewMatrix,
|
|
186
|
+
b0 as getViewProjectionMatrix,
|
|
187
|
+
er as goToFrame,
|
|
188
|
+
es as gsAlphaBlendedDepthFragment,
|
|
189
|
+
Y as gsGpuPickingFragment,
|
|
190
|
+
et as gsLinearDepthFragment,
|
|
191
|
+
eu as initializeCsg2Async,
|
|
192
|
+
ev as isBillboardSpriteHandleAlive,
|
|
193
|
+
ew as isCsg2Ready,
|
|
194
|
+
ex as isSprite2DHandleAlive,
|
|
195
|
+
ey as loadBabylon,
|
|
196
|
+
ez as loadBasisTexture2D,
|
|
197
|
+
eA as loadEnvironment,
|
|
198
|
+
eB as loadGltf,
|
|
199
|
+
eC as loadHdrEnvironment,
|
|
200
|
+
eD as loadKtxTexture2D,
|
|
201
|
+
eE as loadSOG,
|
|
202
|
+
eF as loadSPZ,
|
|
203
|
+
eG as loadSkybox,
|
|
204
|
+
eH as loadSplat,
|
|
205
|
+
eI as loadSpriteAtlas,
|
|
206
|
+
eJ as loadTexture2D,
|
|
207
|
+
m as markMaterialUboDirty,
|
|
208
|
+
eK as mat4Compose,
|
|
209
|
+
k as mat4Identity,
|
|
210
|
+
eL as mat4Scale,
|
|
211
|
+
eM as mat4Translation,
|
|
212
|
+
eN as normalizeVec3,
|
|
213
|
+
eO as onBeforeRender,
|
|
214
|
+
eP as onSceneDispose,
|
|
215
|
+
eQ as parseNodeMaterialFromSnippet,
|
|
216
|
+
eR as pauseAnimation,
|
|
217
|
+
eS as pickAsync,
|
|
218
|
+
eT as playAnimation,
|
|
219
|
+
eU as playBillboardSpriteAnimation,
|
|
220
|
+
eV as playBillboardSpriteIndexAnimation,
|
|
221
|
+
eW as playSprite2DAnimation,
|
|
222
|
+
eX as playSprite2DIndexAnimation,
|
|
223
|
+
eY as playSpriteFrameAnimation,
|
|
224
|
+
eZ as raycast,
|
|
225
|
+
e_ as rebuildMaterial,
|
|
226
|
+
e$ as registerEffectRenderer,
|
|
227
|
+
f0 as registerFrameGraphContext,
|
|
228
|
+
f1 as registerScene,
|
|
229
|
+
f2 as registerSceneWithShadowSupport,
|
|
230
|
+
f3 as registerSpriteRenderer,
|
|
231
|
+
f4 as removeAnimationGroup,
|
|
232
|
+
f5 as removeAnimationTask,
|
|
233
|
+
f6 as removeBillboardSprite,
|
|
234
|
+
f7 as removeBillboardSpriteIndex,
|
|
235
|
+
f8 as removeFromScene,
|
|
236
|
+
f9 as removeMeshFromTask,
|
|
237
|
+
fa as removeObstacle,
|
|
238
|
+
fb as removeSprite2D,
|
|
239
|
+
fc as removeSprite2DIndex,
|
|
240
|
+
fd as removeSpriteAnimation,
|
|
241
|
+
fe as removeSpriteAnimationManager,
|
|
242
|
+
ff as removeSpriteRendererLayer,
|
|
243
|
+
fg as removeThinInstance,
|
|
244
|
+
fh as resetVariant,
|
|
245
|
+
fi as resizeEngine,
|
|
246
|
+
fj as resolveCameraViewport,
|
|
247
|
+
fk as selectVariant,
|
|
248
|
+
fl as setAnimationAdditive,
|
|
249
|
+
fm as setAnimationTaskCategoryHandler,
|
|
250
|
+
fn as setAnimationWeight,
|
|
251
|
+
fo as setBillboardShaderParams,
|
|
252
|
+
fp as setBillboardSpriteFrame,
|
|
253
|
+
fq as setBillboardSpriteFrameIndex,
|
|
254
|
+
fr as setEffectTexture,
|
|
255
|
+
fs as setEffectUniforms,
|
|
256
|
+
ft as setEngineSize,
|
|
257
|
+
s as setMaxLights,
|
|
258
|
+
h as setMeshVisible,
|
|
259
|
+
fu as setMorphTargetWeights,
|
|
260
|
+
fv as setNavigationRandomSeed,
|
|
261
|
+
fw as setParent,
|
|
262
|
+
fx as setPhysicsBodyMass,
|
|
263
|
+
fy as setPhysicsBodyShape,
|
|
264
|
+
fz as setPhysicsGravity,
|
|
265
|
+
fA as setPhysicsShapeMaterial,
|
|
266
|
+
fB as setPhysicsTimestep,
|
|
267
|
+
fC as setPhysicsVelocityLimits,
|
|
268
|
+
fD as setShaderFloat,
|
|
269
|
+
fE as setShaderMatrix,
|
|
270
|
+
fF as setShaderTexture,
|
|
271
|
+
fG as setShaderUniform,
|
|
272
|
+
fH as setShaderVector3,
|
|
273
|
+
fI as setShadowTaskCasterMeshes,
|
|
274
|
+
fJ as setSprite2DFrame,
|
|
275
|
+
fK as setSprite2DFrameIndex,
|
|
276
|
+
fL as setSprite2DShaderParams,
|
|
277
|
+
fM as setSprite2DUvOffset,
|
|
278
|
+
h2 as setSubtreeVisible,
|
|
279
|
+
fN as setThinInstanceColors,
|
|
280
|
+
fO as setThinInstanceMatrix,
|
|
281
|
+
v as setThinInstances,
|
|
282
|
+
fP as setUniformEffectUniforms,
|
|
283
|
+
fQ as spriteBlendAdditive,
|
|
284
|
+
fR as spriteBlendAlpha,
|
|
285
|
+
fS as spriteBlendMultiply,
|
|
286
|
+
fT as spriteBlendPremultiplied,
|
|
287
|
+
fU as startAnimationManager,
|
|
288
|
+
fV as startEngine,
|
|
289
|
+
fW as startSpriteAnimationManager,
|
|
290
|
+
fX as stopAnimation,
|
|
291
|
+
fY as stopAnimationManager,
|
|
292
|
+
fZ as stopEngine,
|
|
293
|
+
f_ as stopSpriteAnimation,
|
|
294
|
+
f$ as stopSpriteAnimationManager,
|
|
295
|
+
g0 as unregisterEffectRenderer,
|
|
296
|
+
g1 as unregisterFrameGraphContext,
|
|
297
|
+
g2 as unregisterScene,
|
|
298
|
+
g3 as unregisterSpriteRenderer,
|
|
299
|
+
g4 as updateAnimationManager,
|
|
300
|
+
g5 as updateBillboardSprite,
|
|
301
|
+
g6 as updateBillboardSpriteIndex,
|
|
302
|
+
g7 as updateMeshPositions,
|
|
303
|
+
g8 as updateNavCrowd,
|
|
304
|
+
g9 as updateNavMeshObstacles,
|
|
305
|
+
ga as updateSprite2D,
|
|
306
|
+
gb as updateSprite2DIndex,
|
|
307
|
+
gc as updateSpriteAnimationManager
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { aS as WGSL } from "./index-C8HOR2sB.js";
|
|
2
|
+
function bjsTypeToNodeType(t) {
|
|
3
|
+
if (t === 1 || t === 2) {
|
|
4
|
+
return "f32";
|
|
5
|
+
}
|
|
6
|
+
if (t === 4) {
|
|
7
|
+
return "vec2f";
|
|
8
|
+
}
|
|
9
|
+
if (t === 8 || t === 32) {
|
|
10
|
+
return "vec3f";
|
|
11
|
+
}
|
|
12
|
+
if (t === 16 || t === 64) {
|
|
13
|
+
return "vec4f";
|
|
14
|
+
}
|
|
15
|
+
if (t === 128) {
|
|
16
|
+
return "mat4f";
|
|
17
|
+
}
|
|
18
|
+
throw new Error(`InputBlock: unsupported BJS connection point type 0x${t.toString(16)}`);
|
|
19
|
+
}
|
|
20
|
+
const ATTRIBUTE_TYPES = {
|
|
21
|
+
position: "vec3f",
|
|
22
|
+
normal: "vec3f",
|
|
23
|
+
tangent: "vec4f",
|
|
24
|
+
uv: "vec2f",
|
|
25
|
+
uv2: "vec2f",
|
|
26
|
+
color: "vec4f",
|
|
27
|
+
matricesIndices: "vec4f",
|
|
28
|
+
matricesWeights: "vec4f",
|
|
29
|
+
matricesIndicesExtra: "vec4f",
|
|
30
|
+
matricesWeightsExtra: "vec4f"
|
|
31
|
+
};
|
|
32
|
+
function emitAttribute(block, stage, state) {
|
|
33
|
+
const attrName = block.name;
|
|
34
|
+
const type = ATTRIBUTE_TYPES[attrName];
|
|
35
|
+
if (!type) {
|
|
36
|
+
throw new Error(`InputBlock: unknown mesh attribute "${attrName}"`);
|
|
37
|
+
}
|
|
38
|
+
const wgslType = WGSL[type];
|
|
39
|
+
if (!state.vertexAttributes.find((a) => a._name === attrName)) {
|
|
40
|
+
state.vertexAttributes.push({
|
|
41
|
+
_name: attrName,
|
|
42
|
+
_type: wgslType,
|
|
43
|
+
_gpuFormat: type === "vec2f" ? "float32x2" : type === "vec3f" ? "float32x3" : "float32x4",
|
|
44
|
+
_arrayStride: (type === "vec2f" ? 2 : type === "vec3f" ? 3 : 4) * 4
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (stage === "vertex") {
|
|
48
|
+
return { expr: `in.${attrName}`, type };
|
|
49
|
+
}
|
|
50
|
+
const vname = `v_attr_${attrName}`;
|
|
51
|
+
if (!state.varyings.find((v) => v._name === vname)) {
|
|
52
|
+
state.varyings.push({ _name: vname, _type: wgslType });
|
|
53
|
+
state.vertex.body.push(`out.${vname} = in.${attrName};`);
|
|
54
|
+
}
|
|
55
|
+
return { expr: `in.${vname}`, type };
|
|
56
|
+
}
|
|
57
|
+
function emitSystemValue(block, stage, state) {
|
|
58
|
+
const sv = block.serialized["systemValue"];
|
|
59
|
+
switch (sv) {
|
|
60
|
+
case 1:
|
|
61
|
+
return { expr: "meshU.world", type: "mat4f" };
|
|
62
|
+
case 2:
|
|
63
|
+
return { expr: "sceneU.view", type: "mat4f" };
|
|
64
|
+
case 3:
|
|
65
|
+
return { expr: "sceneU.projection", type: "mat4f" };
|
|
66
|
+
case 4:
|
|
67
|
+
return { expr: "sceneU.viewProjection", type: "mat4f" };
|
|
68
|
+
case 5:
|
|
69
|
+
return { expr: "(sceneU.view * meshU.world)", type: "mat4f" };
|
|
70
|
+
case 6:
|
|
71
|
+
return { expr: "(sceneU.viewProjection * meshU.world)", type: "mat4f" };
|
|
72
|
+
case 7:
|
|
73
|
+
return { expr: "sceneU.vEyePosition.xyz", type: "vec3f" };
|
|
74
|
+
case 8:
|
|
75
|
+
return { expr: "sceneU.vFogColor.xyz", type: "vec3f" };
|
|
76
|
+
default:
|
|
77
|
+
throw new Error(`InputBlock: unsupported systemValue ${sv} on block "${block.name}"`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function emitUniform(block, state) {
|
|
81
|
+
const portType = block.serialized["type"] ?? 16;
|
|
82
|
+
const type = bjsTypeToNodeType(portType);
|
|
83
|
+
const fieldName = sanitize(block.name || `input${block.id}`);
|
|
84
|
+
if (!state.nodeUboFields.find((f) => f._name === fieldName)) {
|
|
85
|
+
state.nodeUboFields.push({ _name: fieldName, _type: WGSL[type] });
|
|
86
|
+
}
|
|
87
|
+
return { expr: `nodeU.${fieldName}`, type };
|
|
88
|
+
}
|
|
89
|
+
function sanitize(name) {
|
|
90
|
+
return name.replace(/[^A-Za-z0-9_]/g, "_");
|
|
91
|
+
}
|
|
92
|
+
const emitter = {
|
|
93
|
+
className: "InputBlock",
|
|
94
|
+
emit(block, _outputName, stage, state, _ctx) {
|
|
95
|
+
const mode = block.serialized["mode"] ?? block.serialized["_mode"];
|
|
96
|
+
if (mode === 1) {
|
|
97
|
+
return emitAttribute(block, stage, state);
|
|
98
|
+
}
|
|
99
|
+
const sv = block.serialized["systemValue"];
|
|
100
|
+
if (typeof sv === "number") {
|
|
101
|
+
return emitSystemValue(block);
|
|
102
|
+
}
|
|
103
|
+
return emitUniform(block, state);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
export {
|
|
107
|
+
emitter
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=input-block-DgAJBzN_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-block-DgAJBzN_.js","sources":["../src/material/node/blocks/input-block.ts"],"sourcesContent":["/** InputBlock emitter.\n *\n * Three modes (BJS NodeMaterialBlockConnectionPointMode):\n * 0 = Uniform — inline value becomes a field in the node UBO.\n * 1 = Attribute — bound to a vertex attribute (position/normal/uv/...).\n * 2 = Varying — interpolated from a system/pre-existing varying.\n *\n * For attributes we declare the vertex attribute (dedup by name) and, if the\n * value is consumed in fragment stage, a varying to carry it across.\n */\n\nimport type { BlockEmitter, NodeBuildState, NodeExpr, NodeValueType, Stage, NodeBlock } from \"../node-types.js\";\nimport { WGSL } from \"../node-types.js\";\n\ntype BjsType = number; // NodeMaterialBlockConnectionPointTypes\n\nfunction bjsTypeToNodeType(t: BjsType): NodeValueType {\n // bitflags: 0x1=Float, 0x4=Vec2, 0x8=Vec3, 0x10=Vec4, 0x20=Color3, 0x40=Color4\n if (t === 0x1 || t === 0x2) {\n return \"f32\";\n }\n if (t === 0x4) {\n return \"vec2f\";\n }\n if (t === 0x8 || t === 0x20) {\n return \"vec3f\";\n }\n if (t === 0x10 || t === 0x40) {\n return \"vec4f\";\n }\n if (t === 0x80) {\n return \"mat4f\";\n }\n throw new Error(`InputBlock: unsupported BJS connection point type 0x${t.toString(16)}`);\n}\n\nfunction wgslLiteral(value: unknown, type: NodeValueType): string {\n if (type === \"f32\") {\n const f = typeof value === \"number\" ? value : 0;\n return formatFloat(f);\n }\n if (Array.isArray(value)) {\n const parts = value.map((v) => formatFloat(typeof v === \"number\" ? v : 0)).join(\", \");\n return `${WGSL[type]}(${parts})`;\n }\n // Fallback to zero.\n if (type === \"vec2f\") {\n return \"vec2<f32>(0.0, 0.0)\";\n }\n if (type === \"vec3f\") {\n return \"vec3<f32>(0.0, 0.0, 0.0)\";\n }\n if (type === \"vec4f\") {\n return \"vec4<f32>(0.0, 0.0, 0.0, 0.0)\";\n }\n return \"0.0\";\n}\n\nfunction formatFloat(n: number): string {\n if (Number.isInteger(n)) {\n return `${n}.0`;\n }\n return `${n}`;\n}\n\n// Known mesh attributes — maps InputBlock.name → WGSL type.\nconst ATTRIBUTE_TYPES: Record<string, NodeValueType> = {\n position: \"vec3f\",\n normal: \"vec3f\",\n tangent: \"vec4f\",\n uv: \"vec2f\",\n uv2: \"vec2f\",\n color: \"vec4f\",\n matricesIndices: \"vec4f\",\n matricesWeights: \"vec4f\",\n matricesIndicesExtra: \"vec4f\",\n matricesWeightsExtra: \"vec4f\",\n};\n\nfunction emitAttribute(block: NodeBlock, stage: Stage, state: NodeBuildState): NodeExpr {\n const attrName = block.name;\n const type = ATTRIBUTE_TYPES[attrName];\n if (!type) {\n throw new Error(`InputBlock: unknown mesh attribute \"${attrName}\"`);\n }\n const wgslType = WGSL[type];\n // Dedup vertex attribute.\n if (!state.vertexAttributes.find((a) => a._name === attrName)) {\n state.vertexAttributes.push({\n _name: attrName,\n _type: wgslType,\n _gpuFormat: type === \"vec2f\" ? \"float32x2\" : type === \"vec3f\" ? \"float32x3\" : \"float32x4\",\n _arrayStride: (type === \"vec2f\" ? 2 : type === \"vec3f\" ? 3 : 4) * 4,\n });\n }\n if (stage === \"vertex\") {\n return { expr: `in.${attrName}`, type };\n }\n // In fragment stage — bridge through a varying (idempotent).\n const vname = `v_attr_${attrName}`;\n if (!state.varyings.find((v) => v._name === vname)) {\n state.varyings.push({ _name: vname, _type: wgslType });\n state.vertex.body.push(`out.${vname} = in.${attrName};`);\n }\n return { expr: `in.${vname}`, type };\n}\n\n// BJS NodeMaterialSystemValues enum (Babylon.js master).\n// We map the commonly used ones to WGSL expressions sourced from scene/mesh UBOs.\n// For matrices not present in Lite's scene UBO (`projection` alone), we fall\n// back to the closest valid expression (or throw — caller decides).\nfunction emitSystemValue(block: NodeBlock, stage: Stage, state: NodeBuildState): NodeExpr {\n const sv = block.serialized[\"systemValue\"] as number | undefined;\n // Only sensible in the vertex stage for matrix types; for CameraPosition/FogColor either stage is fine.\n switch (sv) {\n case 1: // World\n return { expr: \"meshU.world\", type: \"mat4f\" };\n case 2: // View\n return { expr: \"sceneU.view\", type: \"mat4f\" };\n case 3: // Projection\n return { expr: \"sceneU.projection\", type: \"mat4f\" };\n case 4: // ViewProjection\n return { expr: \"sceneU.viewProjection\", type: \"mat4f\" };\n case 5: // WorldView\n return { expr: \"(sceneU.view * meshU.world)\", type: \"mat4f\" };\n case 6: // WorldViewProjection\n return { expr: \"(sceneU.viewProjection * meshU.world)\", type: \"mat4f\" };\n case 7: // CameraPosition\n return { expr: \"sceneU.vEyePosition.xyz\", type: \"vec3f\" };\n case 8: // FogColor\n return { expr: \"sceneU.vFogColor.xyz\", type: \"vec3f\" };\n default:\n throw new Error(`InputBlock: unsupported systemValue ${sv} on block \"${block.name}\"`);\n }\n void stage;\n void state;\n}\n\nfunction emitUniform(block: NodeBlock, state: NodeBuildState): NodeExpr {\n // Determine the WGSL type. BJS serializes the port type under `type`.\n const portType = (block.serialized[\"type\"] as BjsType | undefined) ?? 0x10;\n const type = bjsTypeToNodeType(portType);\n // UBO field name — use block name (must be unique; parser enforces via namedInputs key).\n const fieldName = sanitize(block.name || `input${block.id}`);\n // Dedup.\n if (!state.nodeUboFields.find((f) => f._name === fieldName)) {\n state.nodeUboFields.push({ _name: fieldName, _type: WGSL[type] as any });\n // If this is a literal value (no override yet), it will be written into the\n // UBO at material-build time; for shader generation we just reference the field.\n // We ignore the inline literal here — the UBO write path handles that.\n }\n void wgslLiteral; // reserved for future default-literal constant-fold optimization\n return { expr: `nodeU.${fieldName}`, type };\n}\n\nfunction sanitize(name: string): string {\n return name.replace(/[^A-Za-z0-9_]/g, \"_\");\n}\n\nexport const emitter: BlockEmitter = {\n className: \"InputBlock\",\n emit(block, _outputName, stage, state, _ctx) {\n const mode = (block.serialized[\"mode\"] ?? block.serialized[\"_mode\"]) as number | undefined;\n if (mode === 1) {\n return emitAttribute(block, stage, state);\n }\n // System-value uniforms (World, WVP, CameraPosition, …) come from scene/mesh UBOs\n // rather than the material's node UBO, so they never appear in `nodeUboFields`.\n const sv = block.serialized[\"systemValue\"];\n if (typeof sv === \"number\") {\n return emitSystemValue(block, stage, state);\n }\n // Default to Uniform (mode 0 or unspecified).\n return emitUniform(block, state);\n },\n};\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const emitter = {
|
|
2
|
+
className: "InstancesBlock",
|
|
3
|
+
stage: "vertex",
|
|
4
|
+
emit(_block, _outputName, _stage, state, _ctx) {
|
|
5
|
+
if (state.hasInstances) ;
|
|
6
|
+
return { expr: "meshU.world", type: "mat4f" };
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
emitter
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=instances-block-BaSSiz8m.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instances-block-BaSSiz8m.js","sources":["../src/material/node/blocks/instances-block.ts"],"sourcesContent":["/** InstancesBlock — picks between per-instance and uniform world matrix.\n *\n * When instancing is enabled the pipeline builder wires `in.world0..world3`\n * (4x vec4 attribute) and the block's output becomes the reconstructed mat4x4.\n * Otherwise the output is the scene-provided uniform `_NME_WORLD_MATRIX_`.\n *\n * The choice is made at pipeline-build time by reading serialized flag\n * `isThinInstance` or by inspecting mesh metadata; for graph-walk purposes we\n * always emit the sentinel, and the pipeline builder rewrites it.\n */\n\nimport type { BlockEmitter } from \"../node-types.js\";\n\nexport const emitter: BlockEmitter = {\n className: \"InstancesBlock\",\n stage: \"vertex\",\n emit(_block, _outputName, _stage, state, _ctx) {\n if (state.hasInstances) {\n // TODO: wire per-instance world attributes. For now passthrough.\n }\n return { expr: \"meshU.world\", type: \"mat4f\" };\n },\n};\n"],"names":[],"mappings":"AAaO,MAAM,UAAwB;AAAA,EACjC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,KAAK,QAAQ,aAAa,QAAQ,OAAO,MAAM;AAC3C,QAAI,MAAM,aAAc;AAGxB,WAAO,EAAE,MAAM,eAAe,MAAM,QAAA;AAAA,EACxC;AACJ;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const IRIDESCENCE_HELPERS = `const NME_PBR_XYZ_TO_REC709: mat3x3<f32> = mat3x3<f32>(
|
|
2
|
+
3.2404542, -0.9692660, 0.0556434,
|
|
3
|
+
-1.5371385, 1.8760108, -0.2040259,
|
|
4
|
+
-0.4985314, 0.0415560, 1.0572252
|
|
5
|
+
);
|
|
6
|
+
fn nme_pbr_square3(x: vec3<f32>) -> vec3<f32> { return x * x; }
|
|
7
|
+
fn nme_pbr_iorFromAirF0(f0: vec3<f32>) -> vec3<f32> {
|
|
8
|
+
let s = sqrt(clamp(f0, vec3<f32>(0.0), vec3<f32>(0.9999)));
|
|
9
|
+
return (vec3<f32>(1.0) + s) / (vec3<f32>(1.0) - s);
|
|
10
|
+
}
|
|
11
|
+
fn nme_pbr_r0FromIor3(iorT: vec3<f32>, iorI: f32) -> vec3<f32> { return nme_pbr_square3((iorT - vec3<f32>(iorI)) / (iorT + vec3<f32>(iorI))); }
|
|
12
|
+
fn nme_pbr_r0FromIor(iorT: f32, iorI: f32) -> f32 { let r = (iorT - iorI) / (iorT + iorI); return r * r; }
|
|
13
|
+
fn nme_pbr_evalSensitivity(opd: f32, shift: vec3<f32>) -> vec3<f32> {
|
|
14
|
+
let phase = 6.283185307179586 * opd * 1.0e-9;
|
|
15
|
+
let val = vec3<f32>(5.4856e-13, 4.4201e-13, 5.2481e-13);
|
|
16
|
+
let pos = vec3<f32>(1.6810e+06, 1.7953e+06, 2.2084e+06);
|
|
17
|
+
let vr = vec3<f32>(4.3278e+09, 9.3046e+09, 6.6121e+09);
|
|
18
|
+
var xyz = val * sqrt(6.283185307179586 * vr) * cos(pos * phase + shift) * exp(-(phase * phase) * vr);
|
|
19
|
+
xyz.x = xyz.x + 9.7470e-14 * sqrt(6.283185307179586 * 4.5282e+09) * cos(2.2399e+06 * phase + shift.x) * exp(-4.5282e+09 * phase * phase);
|
|
20
|
+
xyz = xyz / 1.0685e-7;
|
|
21
|
+
return NME_PBR_XYZ_TO_REC709 * xyz;
|
|
22
|
+
}
|
|
23
|
+
fn nme_pbr_evalIridescence(outsideIor: f32, eta2: f32, cosTheta1: f32, thickness: f32, baseF0: vec3<f32>) -> vec3<f32> {
|
|
24
|
+
let iridescenceIor = mix(outsideIor, eta2, smoothstep(0.0, 0.03, thickness));
|
|
25
|
+
let sinTheta2Sq = ((outsideIor / iridescenceIor) * (outsideIor / iridescenceIor)) * (1.0 - cosTheta1 * cosTheta1);
|
|
26
|
+
let cosTheta2Sq = 1.0 - sinTheta2Sq;
|
|
27
|
+
if (cosTheta2Sq < 0.0) { return vec3<f32>(1.0); }
|
|
28
|
+
let cosTheta2 = sqrt(cosTheta2Sq);
|
|
29
|
+
let r0 = nme_pbr_r0FromIor(iridescenceIor, outsideIor);
|
|
30
|
+
let r12 = nme_pbr_fresSchlick(cosTheta1, vec3<f32>(r0), vec3<f32>(1.0)).x;
|
|
31
|
+
let t121 = 1.0 - r12;
|
|
32
|
+
var phi12 = 0.0;
|
|
33
|
+
if (iridescenceIor < outsideIor) { phi12 = 3.141592653589793; }
|
|
34
|
+
let phi21 = 3.141592653589793 - phi12;
|
|
35
|
+
let baseIor = nme_pbr_iorFromAirF0(baseF0);
|
|
36
|
+
let r1 = nme_pbr_r0FromIor3(baseIor, iridescenceIor);
|
|
37
|
+
let r23 = nme_pbr_fresSchlick(cosTheta2, r1, vec3<f32>(1.0));
|
|
38
|
+
var phi23 = vec3<f32>(0.0);
|
|
39
|
+
if (baseIor.x < iridescenceIor) { phi23.x = 3.141592653589793; }
|
|
40
|
+
if (baseIor.y < iridescenceIor) { phi23.y = 3.141592653589793; }
|
|
41
|
+
if (baseIor.z < iridescenceIor) { phi23.z = 3.141592653589793; }
|
|
42
|
+
let opd = 2.0 * iridescenceIor * thickness * cosTheta2;
|
|
43
|
+
let phi = vec3<f32>(phi21) + phi23;
|
|
44
|
+
let r123 = clamp(vec3<f32>(r12) * r23, vec3<f32>(1e-5), vec3<f32>(0.9999));
|
|
45
|
+
let smallR123 = sqrt(r123);
|
|
46
|
+
let rs = (t121 * t121) * r23 / (vec3<f32>(1.0) - r123);
|
|
47
|
+
var outI = vec3<f32>(r12) + rs;
|
|
48
|
+
var cm = rs - vec3<f32>(t121);
|
|
49
|
+
for (var m: i32 = 1; m <= 2; m = m + 1) {
|
|
50
|
+
cm = cm * smallR123;
|
|
51
|
+
outI = outI + cm * (2.0 * nme_pbr_evalSensitivity(f32(m) * opd, f32(m) * phi));
|
|
52
|
+
}
|
|
53
|
+
return max(outI, vec3<f32>(0.0));
|
|
54
|
+
}`;
|
|
55
|
+
const emitter = {
|
|
56
|
+
className: "IridescenceBlock",
|
|
57
|
+
stage: "fragment",
|
|
58
|
+
emit(_block, _outputName, _stage, state, _ctx) {
|
|
59
|
+
state.usesIridescence = true;
|
|
60
|
+
state.fragment.helpers.set("nme_pbr_iridescence_helpers", IRIDESCENCE_HELPERS);
|
|
61
|
+
return { expr: `vec3<f32>(0.0)`, type: "vec3f" };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
emitter
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=iridescence-block-B0pRFoOU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iridescence-block-B0pRFoOU.js","sources":["../src/material/node/blocks/iridescence-block.ts"],"sourcesContent":["/** IridescenceBlock — marker for PBR-MR thin-film Fresnel.\n *\n * The block itself returns an object output in Babylon.js. Lite keeps object\n * sockets as marker blocks: PBRMetallicRoughnessBlock walks into the connected\n * IridescenceBlock and reads `intensity`, `indexOfRefraction`, and `thickness`\n * so only graphs that use iridescence pay for the thin-film helper code.\n */\n\nimport type { BlockEmitter } from \"../node-types.js\";\n\nconst IRIDESCENCE_HELPERS = `const NME_PBR_XYZ_TO_REC709: mat3x3<f32> = mat3x3<f32>(\n 3.2404542, -0.9692660, 0.0556434,\n -1.5371385, 1.8760108, -0.2040259,\n -0.4985314, 0.0415560, 1.0572252\n);\nfn nme_pbr_square3(x: vec3<f32>) -> vec3<f32> { return x * x; }\nfn nme_pbr_iorFromAirF0(f0: vec3<f32>) -> vec3<f32> {\n let s = sqrt(clamp(f0, vec3<f32>(0.0), vec3<f32>(0.9999)));\n return (vec3<f32>(1.0) + s) / (vec3<f32>(1.0) - s);\n}\nfn nme_pbr_r0FromIor3(iorT: vec3<f32>, iorI: f32) -> vec3<f32> { return nme_pbr_square3((iorT - vec3<f32>(iorI)) / (iorT + vec3<f32>(iorI))); }\nfn nme_pbr_r0FromIor(iorT: f32, iorI: f32) -> f32 { let r = (iorT - iorI) / (iorT + iorI); return r * r; }\nfn nme_pbr_evalSensitivity(opd: f32, shift: vec3<f32>) -> vec3<f32> {\n let phase = 6.283185307179586 * opd * 1.0e-9;\n let val = vec3<f32>(5.4856e-13, 4.4201e-13, 5.2481e-13);\n let pos = vec3<f32>(1.6810e+06, 1.7953e+06, 2.2084e+06);\n let vr = vec3<f32>(4.3278e+09, 9.3046e+09, 6.6121e+09);\n var xyz = val * sqrt(6.283185307179586 * vr) * cos(pos * phase + shift) * exp(-(phase * phase) * vr);\n xyz.x = xyz.x + 9.7470e-14 * sqrt(6.283185307179586 * 4.5282e+09) * cos(2.2399e+06 * phase + shift.x) * exp(-4.5282e+09 * phase * phase);\n xyz = xyz / 1.0685e-7;\n return NME_PBR_XYZ_TO_REC709 * xyz;\n}\nfn nme_pbr_evalIridescence(outsideIor: f32, eta2: f32, cosTheta1: f32, thickness: f32, baseF0: vec3<f32>) -> vec3<f32> {\n let iridescenceIor = mix(outsideIor, eta2, smoothstep(0.0, 0.03, thickness));\n let sinTheta2Sq = ((outsideIor / iridescenceIor) * (outsideIor / iridescenceIor)) * (1.0 - cosTheta1 * cosTheta1);\n let cosTheta2Sq = 1.0 - sinTheta2Sq;\n if (cosTheta2Sq < 0.0) { return vec3<f32>(1.0); }\n let cosTheta2 = sqrt(cosTheta2Sq);\n let r0 = nme_pbr_r0FromIor(iridescenceIor, outsideIor);\n let r12 = nme_pbr_fresSchlick(cosTheta1, vec3<f32>(r0), vec3<f32>(1.0)).x;\n let t121 = 1.0 - r12;\n var phi12 = 0.0;\n if (iridescenceIor < outsideIor) { phi12 = 3.141592653589793; }\n let phi21 = 3.141592653589793 - phi12;\n let baseIor = nme_pbr_iorFromAirF0(baseF0);\n let r1 = nme_pbr_r0FromIor3(baseIor, iridescenceIor);\n let r23 = nme_pbr_fresSchlick(cosTheta2, r1, vec3<f32>(1.0));\n var phi23 = vec3<f32>(0.0);\n if (baseIor.x < iridescenceIor) { phi23.x = 3.141592653589793; }\n if (baseIor.y < iridescenceIor) { phi23.y = 3.141592653589793; }\n if (baseIor.z < iridescenceIor) { phi23.z = 3.141592653589793; }\n let opd = 2.0 * iridescenceIor * thickness * cosTheta2;\n let phi = vec3<f32>(phi21) + phi23;\n let r123 = clamp(vec3<f32>(r12) * r23, vec3<f32>(1e-5), vec3<f32>(0.9999));\n let smallR123 = sqrt(r123);\n let rs = (t121 * t121) * r23 / (vec3<f32>(1.0) - r123);\n var outI = vec3<f32>(r12) + rs;\n var cm = rs - vec3<f32>(t121);\n for (var m: i32 = 1; m <= 2; m = m + 1) {\n cm = cm * smallR123;\n outI = outI + cm * (2.0 * nme_pbr_evalSensitivity(f32(m) * opd, f32(m) * phi));\n }\n return max(outI, vec3<f32>(0.0));\n}`;\n\nexport const emitter: BlockEmitter = {\n className: \"IridescenceBlock\",\n stage: \"fragment\",\n emit(_block, _outputName, _stage, state, _ctx) {\n state.usesIridescence = true;\n state.fragment.helpers.set(\"nme_pbr_iridescence_helpers\", IRIDESCENCE_HELPERS);\n return { expr: `vec3<f32>(0.0)`, type: \"vec3f\" };\n },\n};\n"],"names":[],"mappings":"AAUA,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuDrB,MAAM,UAAwB;AAAA,EACjC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,KAAK,QAAQ,aAAa,QAAQ,OAAO,MAAM;AAC3C,UAAM,kBAAkB;AACxB,UAAM,SAAS,QAAQ,IAAI,+BAA+B,mBAAmB;AAC7E,WAAO,EAAE,MAAM,kBAAkB,MAAM,QAAA;AAAA,EAC3C;AACJ;"}
|