@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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { M as MAX_LIGHTS } from "./index-C8HOR2sB.js";
|
|
2
|
+
const SINGLE_LIGHT_STRUCTS = `
|
|
3
|
+
struct LightEntry {
|
|
4
|
+
vLightData: vec4<f32>,
|
|
5
|
+
vLightDiffuse: vec4<f32>,
|
|
6
|
+
vLightSpecular: vec4<f32>,
|
|
7
|
+
vLightDirection: vec4<f32>,
|
|
8
|
+
};
|
|
9
|
+
struct lightsUniforms {
|
|
10
|
+
count: u32, _p0: u32, _p1: u32, _p2: u32,
|
|
11
|
+
lights: array<LightEntry, ${MAX_LIGHTS}>,
|
|
12
|
+
};
|
|
13
|
+
`;
|
|
14
|
+
function specularBlock() {
|
|
15
|
+
return `let H = normalize(V + L);
|
|
16
|
+
let NdotH = clamp(dot(N, H), 0.0000001, 1.0);
|
|
17
|
+
let VdotH = saturate(dot(V, H));
|
|
18
|
+
let directRoughness = max(roughness, AA_factor_x);
|
|
19
|
+
let directAlphaG = directRoughness * directRoughness + 0.0005;
|
|
20
|
+
let D = distributionGGX(NdotH, directAlphaG);
|
|
21
|
+
let G = geometrySmithGGX(NdotL, NdotV, directAlphaG);
|
|
22
|
+
let coloredFresnel = fresnelSchlick(VdotH, colorF0, colorF90);
|
|
23
|
+
var directSpecular = coloredFresnel * D * G * NdotL * lightColor * lightAtten * material.directIntensity;`;
|
|
24
|
+
}
|
|
25
|
+
function getSingleLightBlock() {
|
|
26
|
+
return `let entry = lights.lights[mli(0u)];
|
|
27
|
+
let lightToFrag = entry.vLightData.xyz - input.worldPos;
|
|
28
|
+
let lightDist = length(lightToFrag);
|
|
29
|
+
let L = lightToFrag / max(lightDist, 0.0001);
|
|
30
|
+
let NdotL = max(dot(N, L), 0.0);
|
|
31
|
+
let spotC = dot(entry.vLightDirection.xyz, -L);
|
|
32
|
+
let physicalFalloff = material.lightFalloffMode >= 0.5;
|
|
33
|
+
let rangeAtt = select(max(0.0, 1.0 - lightDist / entry.vLightDiffuse.a), 1.0 / max(dot(lightToFrag, lightToFrag), 0.0000001), physicalFalloff);
|
|
34
|
+
let standardDirFalloff = select(0.0, max(0.0, pow(max(spotC, 0.0), entry.vLightSpecular.a)), spotC >= entry.vLightDirection.w);
|
|
35
|
+
let kappa = 6.64385618977 / max(1.0 - entry.vLightDirection.w, 0.0001);
|
|
36
|
+
let physicalDirFalloff = exp2(kappa * (spotC - 1.0));
|
|
37
|
+
let lightAtten = rangeAtt * select(standardDirFalloff, physicalDirFalloff, physicalFalloff);
|
|
38
|
+
let lightColor = entry.vLightDiffuse.rgb;
|
|
39
|
+
var directDiffuse = surfaceAlbedo * (1.0 / PI) * NdotL * lightColor * lightAtten * material.directIntensity;
|
|
40
|
+
${specularBlock()}
|
|
41
|
+
/*AD*/`;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
SINGLE_LIGHT_STRUCTS,
|
|
45
|
+
getSingleLightBlock
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=singlelight-spot-wgsl-DEEUrfVM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singlelight-spot-wgsl-DEEUrfVM.js","sources":["../src/material/pbr/fragments/singlelight-spot-wgsl.ts"],"sourcesContent":["/** Single spot-light WGSL helpers for the PBR template. */\n\nimport { MAX_LIGHTS } from \"../../../light/types.js\";\n\nexport const SINGLE_LIGHT_STRUCTS = `\nstruct LightEntry {\nvLightData: vec4<f32>,\nvLightDiffuse: vec4<f32>,\nvLightSpecular: vec4<f32>,\nvLightDirection: vec4<f32>,\n};\nstruct lightsUniforms {\ncount: u32, _p0: u32, _p1: u32, _p2: u32,\n lights: array<LightEntry, ${MAX_LIGHTS}>,\n};\n`;\n\nfunction specularBlock(): string {\n return `let H = normalize(V + L);\nlet NdotH = clamp(dot(N, H), 0.0000001, 1.0);\nlet VdotH = saturate(dot(V, H));\nlet directRoughness = max(roughness, AA_factor_x);\nlet directAlphaG = directRoughness * directRoughness + 0.0005;\nlet D = distributionGGX(NdotH, directAlphaG);\nlet G = geometrySmithGGX(NdotL, NdotV, directAlphaG);\nlet coloredFresnel = fresnelSchlick(VdotH, colorF0, colorF90);\nvar directSpecular = coloredFresnel * D * G * NdotL * lightColor * lightAtten * material.directIntensity;`;\n}\n\nexport function getSingleLightBlock(): string {\n return `let entry = lights.lights[mli(0u)];\nlet lightToFrag = entry.vLightData.xyz - input.worldPos;\nlet lightDist = length(lightToFrag);\nlet L = lightToFrag / max(lightDist, 0.0001);\nlet NdotL = max(dot(N, L), 0.0);\nlet spotC = dot(entry.vLightDirection.xyz, -L);\nlet physicalFalloff = material.lightFalloffMode >= 0.5;\nlet rangeAtt = select(max(0.0, 1.0 - lightDist / entry.vLightDiffuse.a), 1.0 / max(dot(lightToFrag, lightToFrag), 0.0000001), physicalFalloff);\nlet standardDirFalloff = select(0.0, max(0.0, pow(max(spotC, 0.0), entry.vLightSpecular.a)), spotC >= entry.vLightDirection.w);\nlet kappa = 6.64385618977 / max(1.0 - entry.vLightDirection.w, 0.0001);\nlet physicalDirFalloff = exp2(kappa * (spotC - 1.0));\nlet lightAtten = rangeAtt * select(standardDirFalloff, physicalDirFalloff, physicalFalloff);\nlet lightColor = entry.vLightDiffuse.rgb;\nvar directDiffuse = surfaceAlbedo * (1.0 / PI) * NdotL * lightColor * lightAtten * material.directIntensity;\n${specularBlock()}\n/*AD*/`;\n}\n"],"names":[],"mappings":";AAIO,MAAM,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCASJ,UAAU;AAAA;AAAA;AAI1C,SAAS,gBAAwB;AAC7B,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASX;AAEO,SAAS,sBAA8B;AAC1C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcT,eAAe;AAAA;AAEjB;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { M as MSH_HAS_SKELETON, a as MSH_HAS_SKELETON_8 } from "./mesh-features-BLENkYVt.js";
|
|
2
|
+
const STAGE_VERTEX = 1;
|
|
3
|
+
const SKELETON_HELPERS = `
|
|
4
|
+
fn readMatrixFromRawSampler(smp: texture_2d<f32>, index: f32) -> mat4x4<f32> {
|
|
5
|
+
let offset = i32(index) * 4;
|
|
6
|
+
let m0 = textureLoad(smp, vec2<i32>(offset + 0, 0), 0);
|
|
7
|
+
let m1 = textureLoad(smp, vec2<i32>(offset + 1, 0), 0);
|
|
8
|
+
let m2 = textureLoad(smp, vec2<i32>(offset + 2, 0), 0);
|
|
9
|
+
let m3 = textureLoad(smp, vec2<i32>(offset + 3, 0), 0);
|
|
10
|
+
return mat4x4f(m0, m1, m2, m3);
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
function makeSkinningCode(has8Bones) {
|
|
14
|
+
let code = `var influence: mat4x4<f32> = readMatrixFromRawSampler(boneSampler, f32(joints[0])) * weights[0];
|
|
15
|
+
influence = influence + readMatrixFromRawSampler(boneSampler, f32(joints[1])) * weights[1];
|
|
16
|
+
influence = influence + readMatrixFromRawSampler(boneSampler, f32(joints[2])) * weights[2];
|
|
17
|
+
influence = influence + readMatrixFromRawSampler(boneSampler, f32(joints[3])) * weights[3];`;
|
|
18
|
+
if (has8Bones) {
|
|
19
|
+
code += `
|
|
20
|
+
influence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[0])) * weights1[0];
|
|
21
|
+
influence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[1])) * weights1[1];
|
|
22
|
+
influence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[2])) * weights1[2];
|
|
23
|
+
influence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[3])) * weights1[3];`;
|
|
24
|
+
}
|
|
25
|
+
code += `
|
|
26
|
+
finalWorld = mesh.world * influence;`;
|
|
27
|
+
return code;
|
|
28
|
+
}
|
|
29
|
+
function createSkeletonFragment(has8Bones) {
|
|
30
|
+
return {
|
|
31
|
+
_id: "skeleton",
|
|
32
|
+
_vertexAttributes: [
|
|
33
|
+
{ _name: "joints", _type: "vec4<u32>", _gpuFormat: "uint32x4", _arrayStride: 16 },
|
|
34
|
+
{ _name: "weights", _type: "vec4<f32>", _gpuFormat: "float32x4", _arrayStride: 16 },
|
|
35
|
+
...has8Bones ? [
|
|
36
|
+
{ _name: "joints1", _type: "vec4<u32>", _gpuFormat: "uint32x4", _arrayStride: 16 },
|
|
37
|
+
{ _name: "weights1", _type: "vec4<f32>", _gpuFormat: "float32x4", _arrayStride: 16 }
|
|
38
|
+
] : []
|
|
39
|
+
],
|
|
40
|
+
_vertexBindings: [
|
|
41
|
+
{ _name: "boneSampler", _type: { _kind: "texture", _textureType: "texture_2d<f32>", _sampleType: "unfilterable-float" }, _visibility: STAGE_VERTEX }
|
|
42
|
+
],
|
|
43
|
+
_vertexHelperFunctions: SKELETON_HELPERS,
|
|
44
|
+
_vertexSlots: {
|
|
45
|
+
VW: makeSkinningCode(has8Bones)
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const pbrExt = {
|
|
50
|
+
id: "skeleton",
|
|
51
|
+
phase: "vertex",
|
|
52
|
+
frag(ctx) {
|
|
53
|
+
if (!(ctx._meshFeatures & MSH_HAS_SKELETON)) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return createSkeletonFragment((ctx._meshFeatures & MSH_HAS_SKELETON_8) !== 0);
|
|
57
|
+
},
|
|
58
|
+
bind(ctx, entries, b) {
|
|
59
|
+
const mesh = ctx._mesh;
|
|
60
|
+
if (!(ctx._meshFeatures & MSH_HAS_SKELETON) || !(mesh == null ? void 0 : mesh.skeleton)) {
|
|
61
|
+
return b;
|
|
62
|
+
}
|
|
63
|
+
entries.push({ binding: b++, resource: mesh.skeleton.boneTexture.createView() });
|
|
64
|
+
return b;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
createSkeletonFragment,
|
|
69
|
+
pbrExt
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=skeleton-fragment-B_XlFbtx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton-fragment-B_XlFbtx.js","sources":["../src/material/pbr/fragments/skeleton-fragment.ts"],"sourcesContent":["/**\n * Skeleton Fragment\n *\n * Vertex-stage skeletal animation: bone texture sampling + skinning matrix.\n * Only bundled when a scene has skeletal animation.\n * Supports 4-bone and 8-bone skinning.\n */\n\nimport type { ShaderFragment, VertexAttribute } from \"../../../shader/fragment-types.js\";\n\n// WebGPU shader stage constants\nconst STAGE_VERTEX = 0x1;\n\nconst SKELETON_HELPERS = `\nfn readMatrixFromRawSampler(smp: texture_2d<f32>, index: f32) -> mat4x4<f32> {\nlet offset = i32(index) * 4;\nlet m0 = textureLoad(smp, vec2<i32>(offset + 0, 0), 0);\nlet m1 = textureLoad(smp, vec2<i32>(offset + 1, 0), 0);\nlet m2 = textureLoad(smp, vec2<i32>(offset + 2, 0), 0);\nlet m3 = textureLoad(smp, vec2<i32>(offset + 3, 0), 0);\nreturn mat4x4f(m0, m1, m2, m3);\n}\n`;\n\nfunction makeSkinningCode(has8Bones: boolean): string {\n let code = `var influence: mat4x4<f32> = readMatrixFromRawSampler(boneSampler, f32(joints[0])) * weights[0];\ninfluence = influence + readMatrixFromRawSampler(boneSampler, f32(joints[1])) * weights[1];\ninfluence = influence + readMatrixFromRawSampler(boneSampler, f32(joints[2])) * weights[2];\ninfluence = influence + readMatrixFromRawSampler(boneSampler, f32(joints[3])) * weights[3];`;\n if (has8Bones) {\n code += `\ninfluence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[0])) * weights1[0];\ninfluence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[1])) * weights1[1];\ninfluence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[2])) * weights1[2];\ninfluence = influence + readMatrixFromRawSampler(boneSampler, f32(joints1[3])) * weights1[3];`;\n }\n code += `\\nfinalWorld = mesh.world * influence;`;\n return code;\n}\n\n/**\n * Create a skeleton fragment.\n * @param has8Bones - Whether to use 8-bone skinning (joints1/weights1).\n */\nexport function createSkeletonFragment(has8Bones: boolean): ShaderFragment {\n return {\n _id: \"skeleton\",\n\n _vertexAttributes: [\n { _name: \"joints\", _type: \"vec4<u32>\", _gpuFormat: \"uint32x4\" as GPUVertexFormat, _arrayStride: 16 },\n { _name: \"weights\", _type: \"vec4<f32>\", _gpuFormat: \"float32x4\" as GPUVertexFormat, _arrayStride: 16 },\n ...(has8Bones\n ? [\n { _name: \"joints1\", _type: \"vec4<u32>\", _gpuFormat: \"uint32x4\" as GPUVertexFormat, _arrayStride: 16 },\n { _name: \"weights1\", _type: \"vec4<f32>\", _gpuFormat: \"float32x4\" as GPUVertexFormat, _arrayStride: 16 },\n ]\n : []),\n ] as VertexAttribute[],\n\n _vertexBindings: [\n { _name: \"boneSampler\", _type: { _kind: \"texture\", _textureType: \"texture_2d<f32>\" as const, _sampleType: \"unfilterable-float\" as const }, _visibility: STAGE_VERTEX },\n ],\n\n _vertexHelperFunctions: SKELETON_HELPERS,\n\n _vertexSlots: {\n VW: makeSkinningCode(has8Bones),\n },\n };\n}\n\nimport type { PbrExt } from \"../pbr-flags.js\";\nimport { MSH_HAS_SKELETON, MSH_HAS_SKELETON_8 } from \"../../mesh-features.js\";\n\nexport const pbrExt: PbrExt = {\n id: \"skeleton\",\n phase: \"vertex\",\n frag(ctx) {\n if (!(ctx._meshFeatures & MSH_HAS_SKELETON)) {\n return null;\n }\n return createSkeletonFragment((ctx._meshFeatures & MSH_HAS_SKELETON_8) !== 0);\n },\n bind(ctx, entries, b) {\n const mesh = ctx._mesh as { skeleton?: { boneTexture: GPUTexture } } | undefined;\n if (!(ctx._meshFeatures & MSH_HAS_SKELETON) || !mesh?.skeleton) {\n return b;\n }\n entries.push({ binding: b++, resource: mesh.skeleton.boneTexture.createView() });\n return b;\n },\n};\n"],"names":[],"mappings":";AAWA,MAAM,eAAe;AAErB,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWzB,SAAS,iBAAiB,WAA4B;AAClD,MAAI,OAAO;AAAA;AAAA;AAAA;AAIX,MAAI,WAAW;AACX,YAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKZ;AACA,UAAQ;AAAA;AACR,SAAO;AACX;AAMO,SAAS,uBAAuB,WAAoC;AACvE,SAAO;AAAA,IACH,KAAK;AAAA,IAEL,mBAAmB;AAAA,MACf,EAAE,OAAO,UAAU,OAAO,aAAa,YAAY,YAA+B,cAAc,GAAA;AAAA,MAChG,EAAE,OAAO,WAAW,OAAO,aAAa,YAAY,aAAgC,cAAc,GAAA;AAAA,MAClG,GAAI,YACE;AAAA,QACI,EAAE,OAAO,WAAW,OAAO,aAAa,YAAY,YAA+B,cAAc,GAAA;AAAA,QACjG,EAAE,OAAO,YAAY,OAAO,aAAa,YAAY,aAAgC,cAAc,GAAA;AAAA,MAAG,IAE1G,CAAA;AAAA,IAAC;AAAA,IAGX,iBAAiB;AAAA,MACb,EAAE,OAAO,eAAe,OAAO,EAAE,OAAO,WAAW,cAAc,mBAA4B,aAAa,qBAAA,GAAiC,aAAa,aAAA;AAAA,IAAa;AAAA,IAGzK,wBAAwB;AAAA,IAExB,cAAc;AAAA,MACV,IAAI,iBAAiB,SAAS;AAAA,IAAA;AAAA,EAClC;AAER;AAKO,MAAM,SAAiB;AAAA,EAC1B,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,KAAK,KAAK;AACN,QAAI,EAAE,IAAI,gBAAgB,mBAAmB;AACzC,aAAO;AAAA,IACX;AACA,WAAO,wBAAwB,IAAI,gBAAgB,wBAAwB,CAAC;AAAA,EAChF;AAAA,EACA,KAAK,KAAK,SAAS,GAAG;AAClB,UAAM,OAAO,IAAI;AACjB,QAAI,EAAE,IAAI,gBAAgB,qBAAqB,EAAC,6BAAM,WAAU;AAC5D,aAAO;AAAA,IACX;AACA,YAAQ,KAAK,EAAE,SAAS,KAAK,UAAU,KAAK,SAAS,YAAY,WAAA,EAAW,CAAG;AAC/E,WAAO;AAAA,EACX;AACJ;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { aY as createUniformBuffer, aW as SCENE_UBO_WGSL, D as targetSignatureKey, E as createDefaultPipelineDescriptor, F as getSceneBindGroupLayout } from "./index-C8HOR2sB.js";
|
|
2
|
+
import { c as WGSL_FOG } from "./wgsl-helpers-DyzNzCeE.js";
|
|
3
|
+
const skyVertSrc = "// Skybox CubeMap Vertex Shader\n// Passes object-space position (for cube texture lookup) and world-space position.\n\nstruct MeshUniforms {\n world: mat4x4<f32>,\n};\n@group(1) @binding(0) var<uniform> mesh: MeshUniforms;\n\nstruct VertexOutput {\n @builtin(position) clipPos: vec4<f32>,\n @location(0) vPositionW: vec3<f32>,\n @location(1) vPositionLocal: vec3<f32>,\n @location(2) vFogDistance: vec3<f32>,\n};\n\n@vertex\nfn main(\n @location(0) position: vec3<f32>,\n @location(1) normal: vec3<f32>,\n) -> VertexOutput {\n var out: VertexOutput;\n let worldPos = mesh.world * vec4<f32>(position, 1.0);\n out.vPositionW = worldPos.xyz;\n out.vPositionLocal = position;\n out.clipPos = scene.viewProjection * worldPos;\n out.vFogDistance = (scene.view * worldPos).xyz;\n return out;\n}\n";
|
|
4
|
+
const skyFragSrc = "// Skybox CubeMap Fragment Shader\n// Samples cube texture using object-space position as lookup direction.\n// Matches Babylon StandardMaterial with REFLECTION + REFLECTIONMAP_SKYBOX.\n\n@group(1) @binding(1) var cubeTexture: texture_cube<f32>;\n@group(1) @binding(2) var cubeSampler: sampler;\n\nstruct FragmentInput {\n @location(0) vPositionW: vec3<f32>,\n @location(1) vPositionLocal: vec3<f32>,\n @location(2) vFogDistance: vec3<f32>,\n};\n\n@fragment\nfn main(input: FragmentInput) -> @location(0) vec4<f32> {\n // SKYBOX_MODE: use object-space position as cube lookup direction\n let lookupDir = normalize(input.vPositionLocal);\n var color = textureSample(cubeTexture, cubeSampler, lookupDir);\n\n // Apply fog\n if (scene.vFogInfos.x > 0.0) {\n let fog = calcFogFactor(input.vFogDistance);\n color = vec4<f32>(mix(scene.vFogColor.rgb, color.rgb, fog), color.a);\n }\n\n return color;\n}\n";
|
|
5
|
+
function buildSkyboxCubeMapGPU(engine, worldMatrix, cubeView, cubeSampler) {
|
|
6
|
+
const device = engine._device;
|
|
7
|
+
const meshBindGroupLayout = device.createBindGroupLayout({
|
|
8
|
+
label: "skybox-cm-mesh",
|
|
9
|
+
entries: [
|
|
10
|
+
{ binding: 0, visibility: GPUShaderStage.VERTEX, buffer: { type: "uniform" } },
|
|
11
|
+
{ binding: 1, visibility: GPUShaderStage.FRAGMENT, texture: { sampleType: "float", viewDimension: "cube" } },
|
|
12
|
+
{ binding: 2, visibility: GPUShaderStage.FRAGMENT, sampler: {} }
|
|
13
|
+
]
|
|
14
|
+
});
|
|
15
|
+
const meshUBO = createUniformBuffer(engine, worldMatrix);
|
|
16
|
+
const meshBindGroup = device.createBindGroup({
|
|
17
|
+
layout: meshBindGroupLayout,
|
|
18
|
+
entries: [
|
|
19
|
+
{ binding: 0, resource: { buffer: meshUBO } },
|
|
20
|
+
{ binding: 1, resource: cubeView },
|
|
21
|
+
{ binding: 2, resource: cubeSampler }
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
const vertModule = device.createShaderModule({ code: SCENE_UBO_WGSL + skyVertSrc, label: "skybox-cm-vert" });
|
|
25
|
+
const fragModule = device.createShaderModule({ code: SCENE_UBO_WGSL + WGSL_FOG + skyFragSrc, label: "skybox-cm-frag" });
|
|
26
|
+
const gpu = {
|
|
27
|
+
getPipeline(_engine, sig) {
|
|
28
|
+
const key = targetSignatureKey(sig);
|
|
29
|
+
const cached = gpu.pipelines.get(key);
|
|
30
|
+
if (cached) {
|
|
31
|
+
return cached;
|
|
32
|
+
}
|
|
33
|
+
const pipeline = _engine._device.createRenderPipeline(
|
|
34
|
+
createDefaultPipelineDescriptor({
|
|
35
|
+
_label: "skybox-cubemap-pipeline",
|
|
36
|
+
_engine,
|
|
37
|
+
_bgls: [getSceneBindGroupLayout(_engine), gpu.meshBindGroupLayout],
|
|
38
|
+
_vertModule: gpu.vertModule,
|
|
39
|
+
_fragModule: gpu.fragModule,
|
|
40
|
+
_vertexBuffers: [
|
|
41
|
+
{ arrayStride: 12, attributes: [{ shaderLocation: 0, offset: 0, format: "float32x3" }] },
|
|
42
|
+
{ arrayStride: 12, attributes: [{ shaderLocation: 1, offset: 0, format: "float32x3" }] }
|
|
43
|
+
],
|
|
44
|
+
_format: sig._colorFormat,
|
|
45
|
+
_depthStencilFormat: sig._depthStencilFormat,
|
|
46
|
+
_depthCompare: sig._depthCompare,
|
|
47
|
+
_msaaSamples: sig._sampleCount,
|
|
48
|
+
_cullMode: "none",
|
|
49
|
+
_flipY: sig._flipY
|
|
50
|
+
})
|
|
51
|
+
);
|
|
52
|
+
gpu.pipelines.set(key, pipeline);
|
|
53
|
+
return pipeline;
|
|
54
|
+
},
|
|
55
|
+
meshBindGroup,
|
|
56
|
+
meshUBO,
|
|
57
|
+
meshBindGroupLayout,
|
|
58
|
+
vertModule,
|
|
59
|
+
fragModule,
|
|
60
|
+
pipelines: /* @__PURE__ */ new Map()
|
|
61
|
+
};
|
|
62
|
+
return gpu;
|
|
63
|
+
}
|
|
64
|
+
function buildSkyboxRenderable(scene, skybox) {
|
|
65
|
+
const engine = scene.engine;
|
|
66
|
+
const gpu = buildSkyboxCubeMapGPU(engine, skybox.worldMatrix, skybox.cubeView, skybox.cubeSampler);
|
|
67
|
+
const r = {
|
|
68
|
+
order: 0,
|
|
69
|
+
// skybox behind everything
|
|
70
|
+
isTransparent: false,
|
|
71
|
+
bind(eng, sig) {
|
|
72
|
+
const pipeline = gpu.getPipeline(eng, sig);
|
|
73
|
+
return {
|
|
74
|
+
renderable: r,
|
|
75
|
+
pipeline,
|
|
76
|
+
draw(pass) {
|
|
77
|
+
pass.setBindGroup(1, gpu.meshBindGroup);
|
|
78
|
+
pass.setVertexBuffer(0, skybox.posBuffer);
|
|
79
|
+
pass.setVertexBuffer(1, skybox.normBuffer);
|
|
80
|
+
pass.setIndexBuffer(skybox.idxBuffer, "uint32");
|
|
81
|
+
pass.drawIndexed(skybox.idxCount);
|
|
82
|
+
return 1;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return r;
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
buildSkyboxRenderable
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=skybox-renderable-DDwzu-PT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skybox-renderable-DDwzu-PT.js","sources":["../shaders/skybox-cubemap.vertex.wgsl?raw","../shaders/skybox-cubemap.fragment.wgsl?raw","../src/material/standard/skybox-cubemap.ts","../src/loader-skybox/skybox-renderable.ts"],"sourcesContent":["export default \"// Skybox CubeMap Vertex Shader\\n// Passes object-space position (for cube texture lookup) and world-space position.\\n\\nstruct MeshUniforms {\\n world: mat4x4<f32>,\\n};\\n@group(1) @binding(0) var<uniform> mesh: MeshUniforms;\\n\\nstruct VertexOutput {\\n @builtin(position) clipPos: vec4<f32>,\\n @location(0) vPositionW: vec3<f32>,\\n @location(1) vPositionLocal: vec3<f32>,\\n @location(2) vFogDistance: vec3<f32>,\\n};\\n\\n@vertex\\nfn main(\\n @location(0) position: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n) -> VertexOutput {\\n var out: VertexOutput;\\n let worldPos = mesh.world * vec4<f32>(position, 1.0);\\n out.vPositionW = worldPos.xyz;\\n out.vPositionLocal = position;\\n out.clipPos = scene.viewProjection * worldPos;\\n out.vFogDistance = (scene.view * worldPos).xyz;\\n return out;\\n}\\n\"","export default \"// Skybox CubeMap Fragment Shader\\n// Samples cube texture using object-space position as lookup direction.\\n// Matches Babylon StandardMaterial with REFLECTION + REFLECTIONMAP_SKYBOX.\\n\\n@group(1) @binding(1) var cubeTexture: texture_cube<f32>;\\n@group(1) @binding(2) var cubeSampler: sampler;\\n\\nstruct FragmentInput {\\n @location(0) vPositionW: vec3<f32>,\\n @location(1) vPositionLocal: vec3<f32>,\\n @location(2) vFogDistance: vec3<f32>,\\n};\\n\\n@fragment\\nfn main(input: FragmentInput) -> @location(0) vec4<f32> {\\n // SKYBOX_MODE: use object-space position as cube lookup direction\\n let lookupDir = normalize(input.vPositionLocal);\\n var color = textureSample(cubeTexture, cubeSampler, lookupDir);\\n\\n // Apply fog\\n if (scene.vFogInfos.x > 0.0) {\\n let fog = calcFogFactor(input.vFogDistance);\\n color = vec4<f32>(mix(scene.vFogColor.rgb, color.rgb, fog), color.a);\\n }\\n\\n return color;\\n}\\n\"","/**\n * Skybox CubeMap Material — renders a cube map on the inside of a box.\n * Material owns shaders (pillar 4c). Self-contained pipeline and bind groups.\n *\n * Used for StandardMaterial + CubeTexture(SKYBOX_MODE) in Babylon.\n * Renders backfaces (no culling → sees inside of box).\n */\n\nimport type { EngineContext } from \"../../engine/engine.js\";\nimport type { RenderTargetSignature } from \"../../engine/render-target.js\";\nimport skyVertSrc from \"../../../shaders/skybox-cubemap.vertex.wgsl?raw\";\nimport skyFragSrc from \"../../../shaders/skybox-cubemap.fragment.wgsl?raw\";\nimport { getSceneBindGroupLayout, createDefaultPipelineDescriptor } from \"../../render/scene-helpers.js\";\nimport { WGSL_FOG } from \"../../shader/wgsl-helpers.js\";\nimport { SCENE_UBO_WGSL } from \"../../shader/scene-uniforms.js\";\nimport { createUniformBuffer } from \"../../resource/gpu-buffers.js\";\nimport { targetSignatureKey } from \"../../engine/render-target.js\";\n\nexport interface SkyboxCubeMapGPU {\n /** Sig-keyed pipeline lookup (called from `bind()` once the target sig is known). */\n getPipeline(engine: EngineContext, sig: RenderTargetSignature): GPURenderPipeline;\n meshBindGroup: GPUBindGroup;\n meshUBO: GPUBuffer;\n meshBindGroupLayout: GPUBindGroupLayout;\n /** Pre-compiled shader modules — sig-independent. */\n vertModule: GPUShaderModule;\n fragModule: GPUShaderModule;\n /** Per-sig pipeline cache, owned by this skybox instance. */\n pipelines: Map<string, GPURenderPipeline>;\n}\n\n/**\n * Build the per-skybox GPU resources (mesh BGL + bind group + UBO + shader modules\n * + pipeline cache). The pipeline is created lazily by `getPipeline(engine, sig)`\n * once the target sig is known. The scene bind group is supplied per-pass by the\n * active RenderTask.\n */\nexport function buildSkyboxCubeMapGPU(engine: EngineContext, worldMatrix: Float32Array, cubeView: GPUTextureView, cubeSampler: GPUSampler): SkyboxCubeMapGPU {\n const device = engine._device;\n const meshBindGroupLayout = device.createBindGroupLayout({\n label: \"skybox-cm-mesh\",\n entries: [\n { binding: 0, visibility: GPUShaderStage.VERTEX, buffer: { type: \"uniform\" } },\n { binding: 1, visibility: GPUShaderStage.FRAGMENT, texture: { sampleType: \"float\", viewDimension: \"cube\" } },\n { binding: 2, visibility: GPUShaderStage.FRAGMENT, sampler: {} },\n ],\n });\n\n const meshUBO = createUniformBuffer(engine, worldMatrix);\n const meshBindGroup = device.createBindGroup({\n layout: meshBindGroupLayout,\n entries: [\n { binding: 0, resource: { buffer: meshUBO } },\n { binding: 1, resource: cubeView },\n { binding: 2, resource: cubeSampler },\n ],\n });\n\n const vertModule = device.createShaderModule({ code: SCENE_UBO_WGSL + skyVertSrc, label: \"skybox-cm-vert\" });\n const fragModule = device.createShaderModule({ code: SCENE_UBO_WGSL + WGSL_FOG + skyFragSrc, label: \"skybox-cm-frag\" });\n\n const gpu: SkyboxCubeMapGPU = {\n getPipeline(_engine, sig) {\n const key = targetSignatureKey(sig);\n const cached = gpu.pipelines.get(key);\n if (cached) {\n return cached;\n }\n const pipeline = _engine._device.createRenderPipeline(\n createDefaultPipelineDescriptor({\n _label: \"skybox-cubemap-pipeline\",\n _engine,\n _bgls: [getSceneBindGroupLayout(_engine), gpu.meshBindGroupLayout],\n _vertModule: gpu.vertModule,\n _fragModule: gpu.fragModule,\n _vertexBuffers: [\n { arrayStride: 12, attributes: [{ shaderLocation: 0, offset: 0, format: \"float32x3\" as GPUVertexFormat }] },\n { arrayStride: 12, attributes: [{ shaderLocation: 1, offset: 0, format: \"float32x3\" as GPUVertexFormat }] },\n ],\n _format: sig._colorFormat!,\n _depthStencilFormat: sig._depthStencilFormat,\n _depthCompare: sig._depthCompare,\n _msaaSamples: sig._sampleCount,\n _cullMode: \"none\",\n _flipY: sig._flipY,\n })\n );\n gpu.pipelines.set(key, pipeline);\n return pipeline;\n },\n meshBindGroup,\n meshUBO,\n meshBindGroupLayout,\n vertModule,\n fragModule,\n pipelines: new Map(),\n };\n return gpu;\n}\n","/** Skybox renderable for cube-texture skyboxes (standard-material scenes).\n * Wraps the existing skybox-cubemap material into a Renderable. */\n\nimport type { SceneContext } from \"../scene/scene.js\";\nimport type { EngineContext } from \"../engine/engine.js\";\nimport type { SkyboxData } from \"./load-skybox.js\";\nimport type { Renderable } from \"../render/renderable.js\";\nimport { buildSkyboxCubeMapGPU } from \"../material/standard/skybox-cubemap.js\";\n\n/** Build a skybox Renderable from a SkyboxData (loaded via loadSkybox). */\nexport function buildSkyboxRenderable(scene: SceneContext, skybox: SkyboxData): Renderable {\n const engine = scene.engine;\n\n const gpu = buildSkyboxCubeMapGPU(engine, skybox.worldMatrix, skybox.cubeView, skybox.cubeSampler);\n\n const r: Renderable = {\n order: 0, // skybox behind everything\n isTransparent: false,\n bind(eng, sig) {\n const pipeline = gpu.getPipeline(eng as EngineContext, sig);\n return {\n renderable: r,\n pipeline,\n draw(pass) {\n pass.setBindGroup(1, gpu.meshBindGroup);\n pass.setVertexBuffer(0, skybox.posBuffer);\n pass.setVertexBuffer(1, skybox.normBuffer);\n pass.setIndexBuffer(skybox.idxBuffer, \"uint32\");\n pass.drawIndexed(skybox.idxCount);\n return 1;\n },\n };\n },\n };\n return r;\n}\n"],"names":[],"mappings":";;AAAA,MAAA,aAAe;ACAf,MAAA,aAAe;ACqCR,SAAS,sBAAsB,QAAuB,aAA2B,UAA0B,aAA2C;AACzJ,QAAM,SAAS,OAAO;AACtB,QAAM,sBAAsB,OAAO,sBAAsB;AAAA,IACrD,OAAO;AAAA,IACP,SAAS;AAAA,MACL,EAAE,SAAS,GAAG,YAAY,eAAe,QAAQ,QAAQ,EAAE,MAAM,YAAU;AAAA,MAC3E,EAAE,SAAS,GAAG,YAAY,eAAe,UAAU,SAAS,EAAE,YAAY,SAAS,eAAe,OAAA,EAAO;AAAA,MACzG,EAAE,SAAS,GAAG,YAAY,eAAe,UAAU,SAAS,CAAA,EAAC;AAAA,IAAE;AAAA,EACnE,CACH;AAED,QAAM,UAAU,oBAAoB,QAAQ,WAAW;AACvD,QAAM,gBAAgB,OAAO,gBAAgB;AAAA,IACzC,QAAQ;AAAA,IACR,SAAS;AAAA,MACL,EAAE,SAAS,GAAG,UAAU,EAAE,QAAQ,UAAQ;AAAA,MAC1C,EAAE,SAAS,GAAG,UAAU,SAAA;AAAA,MACxB,EAAE,SAAS,GAAG,UAAU,YAAA;AAAA,IAAY;AAAA,EACxC,CACH;AAED,QAAM,aAAa,OAAO,mBAAmB,EAAE,MAAM,iBAAiB,YAAY,OAAO,kBAAkB;AAC3G,QAAM,aAAa,OAAO,mBAAmB,EAAE,MAAM,iBAAiB,WAAW,YAAY,OAAO,kBAAkB;AAEtH,QAAM,MAAwB;AAAA,IAC1B,YAAY,SAAS,KAAK;AACtB,YAAM,MAAM,mBAAmB,GAAG;AAClC,YAAM,SAAS,IAAI,UAAU,IAAI,GAAG;AACpC,UAAI,QAAQ;AACR,eAAO;AAAA,MACX;AACA,YAAM,WAAW,QAAQ,QAAQ;AAAA,QAC7B,gCAAgC;AAAA,UAC5B,QAAQ;AAAA,UACR;AAAA,UACA,OAAO,CAAC,wBAAwB,OAAO,GAAG,IAAI,mBAAmB;AAAA,UACjE,aAAa,IAAI;AAAA,UACjB,aAAa,IAAI;AAAA,UACjB,gBAAgB;AAAA,YACZ,EAAE,aAAa,IAAI,YAAY,CAAC,EAAE,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,YAAA,CAAgC,EAAA;AAAA,YACxG,EAAE,aAAa,IAAI,YAAY,CAAC,EAAE,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,YAAA,CAAgC,EAAA;AAAA,UAAE;AAAA,UAE9G,SAAS,IAAI;AAAA,UACb,qBAAqB,IAAI;AAAA,UACzB,eAAe,IAAI;AAAA,UACnB,cAAc,IAAI;AAAA,UAClB,WAAW;AAAA,UACX,QAAQ,IAAI;AAAA,QAAA,CACf;AAAA,MAAA;AAEL,UAAI,UAAU,IAAI,KAAK,QAAQ;AAC/B,aAAO;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,+BAAe,IAAA;AAAA,EAAI;AAEvB,SAAO;AACX;ACxFO,SAAS,sBAAsB,OAAqB,QAAgC;AACvF,QAAM,SAAS,MAAM;AAErB,QAAM,MAAM,sBAAsB,QAAQ,OAAO,aAAa,OAAO,UAAU,OAAO,WAAW;AAEjG,QAAM,IAAgB;AAAA,IAClB,OAAO;AAAA;AAAA,IACP,eAAe;AAAA,IACf,KAAK,KAAK,KAAK;AACX,YAAM,WAAW,IAAI,YAAY,KAAsB,GAAG;AAC1D,aAAO;AAAA,QACH,YAAY;AAAA,QACZ;AAAA,QACA,KAAK,MAAM;AACP,eAAK,aAAa,GAAG,IAAI,aAAa;AACtC,eAAK,gBAAgB,GAAG,OAAO,SAAS;AACxC,eAAK,gBAAgB,GAAG,OAAO,UAAU;AACzC,eAAK,eAAe,OAAO,WAAW,QAAQ;AAC9C,eAAK,YAAY,OAAO,QAAQ;AAChC,iBAAO;AAAA,QACX;AAAA,MAAA;AAAA,IAER;AAAA,EAAA;AAEJ,SAAO;AACX;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const skyboxVertSrc = "// Skybox Vertex Shader — matches Babylon BackgroundMaterial (REFLECTIONMAP_SKYBOX)\n// Outputs local position as cubemap direction (vPositionUVW) + world position for dithering\n\nstruct MeshUniforms {\n world: mat4x4<f32>,\n};\n\n@group(1) @binding(0) var<uniform> mesh: MeshUniforms;\n\nstruct VertexOutput {\n @builtin(position) clipPos: vec4<f32>,\n @location(0) positionUVW: vec3<f32>,\n @location(1) positionW: vec3<f32>,\n};\n\n@vertex\nfn main(@location(0) position: vec3<f32>) -> VertexOutput {\n var output: VertexOutput;\n output.positionUVW = position;\n // Infinite distance: strip translation (w=0), center at camera.\n // Matches BJS skybox.infiniteDistance = true.\n let worldPos = (mesh.world * vec4<f32>(position, 0.0)).xyz + scene.vEyePosition.xyz;\n output.positionW = worldPos;\n output.clipPos = scene.viewProjection * vec4<f32>(worldPos, 1.0);\n return output;\n}\n";
|
|
2
|
+
export {
|
|
3
|
+
skyboxVertSrc as s
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=skybox.vertex-DJgi072W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skybox.vertex-DJgi072W.js","sources":["../shaders/skybox.vertex.wgsl?raw"],"sourcesContent":["export default \"// Skybox Vertex Shader — matches Babylon BackgroundMaterial (REFLECTIONMAP_SKYBOX)\\n// Outputs local position as cubemap direction (vPositionUVW) + world position for dithering\\n\\nstruct MeshUniforms {\\n world: mat4x4<f32>,\\n};\\n\\n@group(1) @binding(0) var<uniform> mesh: MeshUniforms;\\n\\nstruct VertexOutput {\\n @builtin(position) clipPos: vec4<f32>,\\n @location(0) positionUVW: vec3<f32>,\\n @location(1) positionW: vec3<f32>,\\n};\\n\\n@vertex\\nfn main(@location(0) position: vec3<f32>) -> VertexOutput {\\n var output: VertexOutput;\\n output.positionUVW = position;\\n // Infinite distance: strip translation (w=0), center at camera.\\n // Matches BJS skybox.infiniteDistance = true.\\n let worldPos = (mesh.world * vec4<f32>(position, 0.0)).xyz + scene.vEyePosition.xyz;\\n output.positionW = worldPos;\\n output.clipPos = scene.viewProjection * vec4<f32>(worldPos, 1.0);\\n return output;\\n}\\n\""],"names":[],"mappings":"AAAA,MAAA,gBAAe;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const emitter = {
|
|
2
|
+
className: "SmoothStepBlock",
|
|
3
|
+
emit(block, _outputName, stage, state, ctx) {
|
|
4
|
+
const value = ctx.resolve(block, "value", stage, state);
|
|
5
|
+
const edge0 = ctx.resolve(block, "edge0", stage, state);
|
|
6
|
+
const edge1 = ctx.resolve(block, "edge1", stage, state);
|
|
7
|
+
const e0 = ctx.cast(edge0, value.type).expr;
|
|
8
|
+
const e1 = ctx.cast(edge1, value.type).expr;
|
|
9
|
+
return { expr: `smoothstep(${e0}, ${e1}, ${value.expr})`, type: value.type };
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
emitter
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=smoothstep-block-Di4t37x-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smoothstep-block-Di4t37x-.js","sources":["../src/material/node/blocks/smoothstep-block.ts"],"sourcesContent":["import type { BlockEmitter } from \"../node-types.js\";\n\nexport const emitter: BlockEmitter = {\n className: \"SmoothStepBlock\",\n emit(block, _outputName, stage, state, ctx) {\n const value = ctx.resolve(block, \"value\", stage, state);\n const edge0 = ctx.resolve(block, \"edge0\", stage, state);\n const edge1 = ctx.resolve(block, \"edge1\", stage, state);\n const e0 = ctx.cast(edge0, value.type).expr;\n const e1 = ctx.cast(edge1, value.type).expr;\n return { expr: `smoothstep(${e0}, ${e1}, ${value.expr})`, type: value.type };\n },\n};\n"],"names":[],"mappings":"AAEO,MAAM,UAAwB;AAAA,EACjC,WAAW;AAAA,EACX,KAAK,OAAO,aAAa,OAAO,OAAO,KAAK;AACxC,UAAM,QAAQ,IAAI,QAAQ,OAAO,SAAS,OAAO,KAAK;AACtD,UAAM,QAAQ,IAAI,QAAQ,OAAO,SAAS,OAAO,KAAK;AACtD,UAAM,QAAQ,IAAI,QAAQ,OAAO,SAAS,OAAO,KAAK;AACtD,UAAM,KAAK,IAAI,KAAK,OAAO,MAAM,IAAI,EAAE;AACvC,UAAM,KAAK,IAAI,KAAK,OAAO,MAAM,IAAI,EAAE;AACvC,WAAO,EAAE,MAAM,cAAc,EAAE,KAAK,EAAE,KAAK,MAAM,IAAI,KAAK,MAAM,MAAM,KAAA;AAAA,EAC1E;AACJ;"}
|