@unikia/upe-renderer 0.186.110 → 0.187.11
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/README.md +5 -7
- package/UPSTREAM.md +4 -4
- package/build/three.core.js +853 -277
- package/build/three.module.js +1098 -1280
- package/build/three.tsl.js +41938 -686
- package/build/three.webgpu.js +10604 -49055
- package/build/three.webgpu.nodes.js +9249 -5788
- package/examples/jsm/Addons.js +2 -0
- package/examples/jsm/animation/CCDIKSolver.js +17 -5
- package/examples/jsm/controls/FirstPersonControls.js +1 -1
- package/examples/jsm/controls/OrbitControls.js +27 -14
- package/examples/jsm/csm/CSMShader.js +74 -3
- package/examples/jsm/curves/CurveExtras.js +4 -4
- package/examples/jsm/curves/NURBSCurve.js +14 -0
- package/examples/jsm/exporters/EXRExporter.js +673 -16
- package/examples/jsm/exporters/GLTFExporter.js +4 -4
- package/examples/jsm/exporters/KTX2Exporter.js +1 -1
- package/examples/jsm/exporters/OBJExporter.js +48 -5
- package/examples/jsm/exporters/PLYExporter.js +22 -11
- package/examples/jsm/generators/CityGenerator.js +3 -2
- package/examples/jsm/generators/city/SkyscraperGenerator.js +63 -21
- package/examples/jsm/gpgpu/BitonicSort.js +30 -23
- package/examples/jsm/helpers/VertexTangentsHelper.js +1 -1
- package/examples/jsm/inspector/Extension.js +1 -1
- package/examples/jsm/inspector/Inspector.js +6 -46
- package/examples/jsm/inspector/RendererInspector.js +43 -8
- package/examples/jsm/inspector/Storage.js +49 -0
- package/examples/jsm/inspector/extensions/color-grading/ColorGrading.js +32 -27
- package/examples/jsm/inspector/tabs/Parameters.js +5 -1
- package/examples/jsm/inspector/tabs/Performance.js +22 -7
- package/examples/jsm/inspector/tabs/Settings.js +1 -1
- package/examples/jsm/inspector/tabs/Timeline.js +83 -7
- package/examples/jsm/inspector/tabs/Viewer.js +25 -10
- package/examples/jsm/inspector/ui/Profiler.js +1 -1
- package/examples/jsm/inspector/ui/Style.js +21 -53
- package/examples/jsm/inspector/ui/Values.js +28 -3
- package/examples/jsm/libs/fflate.module.js +83 -56
- package/examples/jsm/libs/mikktspace.README.md +27 -0
- package/examples/jsm/libs/mikktspace.module.js +721 -109
- package/examples/jsm/lighting/ClusteredLighting.js +100 -2
- package/examples/jsm/lighting/LightMapper.js +295 -0
- package/examples/jsm/lighting/LightProbeGrid.js +242 -139
- package/examples/jsm/lighting/LightProbeGridWebGL.js +30 -14
- package/examples/jsm/lighting/vxgi/VXGIConeTracer.js +54 -5
- package/examples/jsm/lighting/vxgi/VXGIIrradiance.js +43 -0
- package/examples/jsm/lighting/vxgi/VXGINode.js +13 -56
- package/examples/jsm/lighting/vxgi/VXGISceneCollector.js +316 -1
- package/examples/jsm/lighting/vxgi/VXGIVolume.js +69 -59
- package/examples/jsm/lights/SunLight.js +9 -4
- package/examples/jsm/lights/SunLightNode.js +3 -3
- package/examples/jsm/lines/LineMaterial.js +26 -10
- package/examples/jsm/loaders/3DMLoader.js +10 -1
- package/examples/jsm/loaders/3MFLoader.js +5 -1
- package/examples/jsm/loaders/AMFLoader.js +2 -0
- package/examples/jsm/loaders/BVHLoader.js +2 -0
- package/examples/jsm/loaders/ColladaLoader.js +8 -0
- package/examples/jsm/loaders/DDSLoader.js +1 -1
- package/examples/jsm/loaders/DRACOLoader.js +5 -1
- package/examples/jsm/loaders/EXRLoader.js +120 -104
- package/examples/jsm/loaders/FBXLoader.js +4 -0
- package/examples/jsm/loaders/FontLoader.js +2 -0
- package/examples/jsm/loaders/GCodeLoader.js +5 -9
- package/examples/jsm/loaders/GLTFLoader.js +112 -31
- package/examples/jsm/loaders/GaussianSplatPLYLoader.js +2 -0
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +3 -0
- package/examples/jsm/loaders/IESLoader.js +46 -12
- package/examples/jsm/loaders/JXLLoader.js +159 -0
- package/examples/jsm/loaders/KMZLoader.js +6 -0
- package/examples/jsm/loaders/KSPLATLoader.js +2 -0
- package/examples/jsm/loaders/KTX2Loader.js +49 -4
- package/examples/jsm/loaders/KTXLoader.js +5 -3
- package/examples/jsm/loaders/LDrawLoader.js +15 -22
- package/examples/jsm/loaders/LUT3dlLoader.js +5 -1
- package/examples/jsm/loaders/LUTCubeLoader.js +6 -2
- package/examples/jsm/loaders/LUTImageLoader.js +2 -0
- package/examples/jsm/loaders/LWOLoader.js +6 -0
- package/examples/jsm/loaders/MD2Loader.js +2 -0
- package/examples/jsm/loaders/MDDLoader.js +4 -0
- package/examples/jsm/loaders/MTLLoader.js +8 -0
- package/examples/jsm/loaders/MaterialXLoader.js +57 -5
- package/examples/jsm/loaders/NRRDLoader.js +4 -2
- package/examples/jsm/loaders/OBJLoader.js +10 -4
- package/examples/jsm/loaders/PCDLoader.js +6 -2
- package/examples/jsm/loaders/PDBLoader.js +5 -3
- package/examples/jsm/loaders/PLYLoader.js +39 -15
- package/examples/jsm/loaders/PVRLoader.js +2 -2
- package/examples/jsm/loaders/SPLATLoader.js +2 -0
- package/examples/jsm/loaders/SPZLoader.js +2 -0
- package/examples/jsm/loaders/STLLoader.js +3 -1
- package/examples/jsm/loaders/SVGLoader.js +27 -49
- package/examples/jsm/loaders/TDSLoader.js +4 -0
- package/examples/jsm/loaders/TGALoader.js +6 -5
- package/examples/jsm/loaders/TTFLoader.js +2 -0
- package/examples/jsm/loaders/USDLoader.js +14 -0
- package/examples/jsm/loaders/UltraHDRLoader.js +2 -0
- package/examples/jsm/loaders/VOXLoader.js +3 -0
- package/examples/jsm/loaders/VRMLLoader.js +4 -0
- package/examples/jsm/loaders/VTKLoader.js +2 -0
- package/examples/jsm/loaders/XYZLoader.js +2 -0
- package/examples/jsm/loaders/collada/ColladaComposer.js +15 -8
- package/examples/jsm/loaders/materialx/MaterialXDocument.js +610 -138
- package/examples/jsm/loaders/materialx/MaterialXInterfaceValidation.js +12 -95
- package/examples/jsm/loaders/materialx/MaterialXLog.js +4 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeDefs.js +99 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeInterfaceRegistry.js +760 -1
- package/examples/jsm/loaders/materialx/MaterialXNodeLibrary.js +222 -372
- package/examples/jsm/loaders/materialx/MaterialXSurfaceMappings.js +163 -259
- package/examples/jsm/loaders/materialx/MaterialXUtils.js +25 -0
- package/examples/jsm/loaders/materialx/compile/MaterialXCompileRegistry.js +161 -159
- package/examples/jsm/loaders/usd/USDAParser.js +56 -47
- package/examples/jsm/loaders/usd/USDComposer.js +25 -30
- package/examples/jsm/math/ColorConverter.js +7 -3
- package/examples/jsm/math/Lut.js +2 -2
- package/examples/jsm/math/OBB.js +3 -3
- package/examples/jsm/math/Octree.js +20 -17
- package/examples/jsm/objects/GaussianSplat.js +5 -4
- package/examples/jsm/objects/Reflector.js +5 -0
- package/examples/jsm/objects/SkyMesh.js +14 -7
- package/examples/jsm/objects/Water2Mesh.js +2 -2
- package/examples/jsm/physics/RapierPhysics.js +2 -2
- package/examples/jsm/pipelines/MeshletDrawingPipeline.js +5571 -0
- package/examples/jsm/pipelines/VisibilityBufferDrawingPipeline.js +954 -0
- package/examples/jsm/postprocessing/BokehPass.js +1 -1
- package/examples/jsm/postprocessing/GTAOPass.js +26 -18
- package/examples/jsm/renderers/SVGRenderer.js +3 -2
- package/examples/jsm/shaders/GTAOShader.js +7 -4
- package/examples/jsm/shaders/PoissonDenoiseShader.js +1 -10
- package/examples/jsm/tsl/WebGLNodesHandler.js +21 -9
- package/examples/jsm/tsl/display/AfterImageNode.js +3 -3
- package/examples/jsm/tsl/display/BilateralBlurNode.js +3 -3
- package/examples/jsm/tsl/display/BloomNode.js +3 -3
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +8 -19
- package/examples/jsm/tsl/display/DenoiseNode.js +5 -5
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +3 -3
- package/examples/jsm/tsl/display/DotScreenNode.js +3 -3
- package/examples/jsm/tsl/display/FSR1Node.js +3 -3
- package/examples/jsm/tsl/display/FXAANode.js +3 -10
- package/examples/jsm/tsl/display/FilmNode.js +3 -3
- package/examples/jsm/tsl/display/GTAONode.js +33 -25
- package/examples/jsm/tsl/display/GaussianBlurNode.js +3 -3
- package/examples/jsm/tsl/display/GodraysNode.js +5 -19
- package/examples/jsm/tsl/display/ImportanceSampledEnvironment.js +8 -4
- package/examples/jsm/tsl/display/LensflareNode.js +3 -3
- package/examples/jsm/tsl/display/Lut3DNode.js +3 -3
- package/examples/jsm/tsl/display/OITPassNode.js +0 -11
- package/examples/jsm/tsl/display/OutlineNode.js +107 -5
- package/examples/jsm/tsl/display/PixelationPassNode.js +85 -193
- package/examples/jsm/tsl/display/RGBShiftNode.js +3 -3
- package/examples/jsm/tsl/display/RecurrentDenoiseNode.js +23 -126
- package/examples/jsm/tsl/display/SMAANode.js +3 -3
- package/examples/jsm/tsl/display/SSAONode.js +6 -20
- package/examples/jsm/tsl/display/SSGINode.js +36 -29
- package/examples/jsm/tsl/display/SSRNode.js +135 -63
- package/examples/jsm/tsl/display/SSSNode.js +6 -20
- package/examples/jsm/tsl/display/SharpenNode.js +3 -3
- package/examples/jsm/tsl/display/SobelOperatorNode.js +3 -3
- package/examples/jsm/tsl/display/TAAUNode.js +10 -42
- package/examples/jsm/tsl/display/TRAANode.js +11 -43
- package/examples/jsm/tsl/display/TemporalReprojectNode.js +42 -47
- package/examples/jsm/tsl/display/TransitionNode.js +3 -3
- package/examples/jsm/tsl/display/lensDirt.js +30 -0
- package/examples/jsm/tsl/lighting/ClusteredLightsNode.js +482 -121
- package/examples/jsm/tsl/lighting/DynamicLightsNode.js +41 -140
- package/examples/jsm/tsl/lighting/LightProbeGridNode.js +72 -25
- package/examples/jsm/tsl/lighting/data/AmbientLightDataNode.js +6 -0
- package/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.js +6 -0
- package/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.js +6 -0
- package/examples/jsm/tsl/lighting/data/PointLightDataNode.js +6 -0
- package/examples/jsm/tsl/lighting/data/SpotLightDataNode.js +6 -0
- package/examples/jsm/tsl/shadows/TileShadowNode.js +102 -14
- package/examples/jsm/tsl/utils/Raymarching.js +1 -1
- package/examples/jsm/tsl/utils/SoftParticles.js +5 -12
- package/examples/jsm/tsl/utils/SpecularHelpers.js +47 -70
- package/examples/jsm/tsl/utils/TAAUtils.js +6 -17
- package/examples/jsm/utils/BufferGeometryUtils.js +110 -88
- package/examples/jsm/utils/MeshletGeometryUtils.js +417 -0
- package/examples/jsm/utils/SceneOptimizer.js +2 -1
- package/examples/jsm/utils/SceneUtils.js +1 -1
- package/examples/jsm/utils/unwrapUVs.js +865 -0
- package/examples/jsm/webxr/XREstimatedLight.js +11 -4
- package/package.json +3 -3
- package/src/Three.TSL.js +2 -683
- package/src/Three.WebGPU.Nodes.js +2 -1
- package/src/Three.WebGPU.js +2 -1
- package/src/animation/AnimationAction.js +1 -1
- package/src/animation/AnimationUtils.js +1 -3
- package/src/animation/KeyframeTrack.js +19 -0
- package/src/cameras/ArrayCamera.js +12 -0
- package/src/cameras/CubeCamera.js +3 -3
- package/src/constants.js +1 -9
- package/src/core/BufferAttribute.js +57 -21
- package/src/core/BufferGeometry.js +5 -13
- package/src/core/Clock.js +1 -1
- package/src/core/InterleavedBuffer.js +28 -18
- package/src/core/InterleavedBufferAttribute.js +54 -20
- package/src/core/Object3D.js +19 -9
- package/src/core/Raycaster.js +2 -0
- package/src/core/RenderTarget.js +11 -5
- package/src/core/UniformsGroup.js +7 -3
- package/src/extras/PMREMGenerator.js +392 -685
- package/src/extras/core/Curve.js +4 -0
- package/src/extras/core/CurvePath.js +13 -0
- package/src/extras/core/ShapePath.js +1 -1
- package/src/geometries/EdgesGeometry.js +12 -10
- package/src/geometries/LatheGeometry.js +2 -0
- package/src/helpers/PolarGridHelper.js +1 -1
- package/src/lights/Light.js +11 -0
- package/src/lights/LightProbe.js +2 -0
- package/src/lights/LightShadow.js +2 -0
- package/src/loaders/AnimationLoader.js +2 -0
- package/src/loaders/AudioLoader.js +2 -0
- package/src/loaders/BufferGeometryLoader.js +2 -0
- package/src/loaders/CompressedTextureLoader.js +2 -0
- package/src/loaders/CubeTextureLoader.js +2 -0
- package/src/loaders/DataTextureLoader.js +2 -0
- package/src/loaders/FileLoader.js +2 -0
- package/src/loaders/ImageBitmapLoader.js +3 -1
- package/src/loaders/ImageLoader.js +1 -0
- package/src/loaders/Loader.js +47 -0
- package/src/loaders/MaterialLoader.js +2 -0
- package/src/loaders/ObjectLoader.js +27 -8
- package/src/loaders/TextureLoader.js +5 -3
- package/src/loaders/nodes/NodeLoader.js +2 -0
- package/src/materials/Material.js +21 -2
- package/src/materials/MeshDepthMaterial.js +1 -1
- package/src/materials/MeshDistanceMaterial.js +1 -1
- package/src/materials/MeshLambertMaterial.js +1 -1
- package/src/materials/MeshMatcapMaterial.js +1 -1
- package/src/materials/MeshNormalMaterial.js +1 -1
- package/src/materials/MeshPhongMaterial.js +1 -1
- package/src/materials/MeshPhysicalMaterial.js +90 -11
- package/src/materials/MeshStandardMaterial.js +1 -1
- package/src/materials/MeshToonMaterial.js +1 -1
- package/src/materials/nodes/Line2NodeMaterial.js +32 -10
- package/src/materials/nodes/MeshLambertNodeMaterial.js +13 -0
- package/src/materials/nodes/MeshPhongNodeMaterial.js +13 -0
- package/src/materials/nodes/MeshPhysicalNodeMaterial.js +40 -5
- package/src/materials/nodes/MeshToonNodeMaterial.js +13 -0
- package/src/materials/nodes/NodeMaterial.js +36 -16
- package/src/materials/nodes/NodeMaterialInstance.js +193 -0
- package/src/materials/nodes/NodeMaterials.js +1 -0
- package/src/materials/nodes/PointsNodeMaterial.js +1 -1
- package/src/materials/nodes/SpriteNodeMaterial.js +3 -3
- package/src/materials/nodes/manager/NodeMaterialObserver.js +191 -22
- package/src/math/Box3.js +2 -2
- package/src/math/Color.js +8 -8
- package/src/math/ColorManagement.js +2 -21
- package/src/math/FrustumArray.js +12 -0
- package/src/math/Interpolant.js +1 -1
- package/src/math/Line3.js +2 -4
- package/src/math/MathUtils.js +33 -46
- package/src/math/Matrix2.js +1 -1
- package/src/math/Matrix3.js +1 -1
- package/src/math/Matrix4.js +1 -1
- package/src/math/Triangle.js +2 -1
- package/src/math/Vector2.js +1 -1
- package/src/math/Vector3.js +1 -1
- package/src/math/Vector4.js +1 -1
- package/src/nodes/Nodes.js +1 -0
- package/src/nodes/TSL.js +2 -0
- package/src/nodes/accessors/Arrays.js +1 -1
- package/src/nodes/accessors/Batch.js +29 -23
- package/src/nodes/accessors/BufferAttributeNode.js +21 -1
- package/src/nodes/accessors/BuiltinNode.js +6 -0
- package/src/nodes/accessors/Camera.js +100 -93
- package/src/nodes/accessors/ClippingNode.js +17 -6
- package/src/nodes/accessors/CubeTextureNode.js +12 -24
- package/src/nodes/accessors/Instance.js +198 -160
- package/src/nodes/accessors/Lights.js +19 -6
- package/src/nodes/accessors/MaterialNode.js +33 -4
- package/src/nodes/accessors/Morph.js +81 -22
- package/src/nodes/accessors/Normal.js +0 -42
- package/src/nodes/accessors/Object3DNode.js +6 -0
- package/src/nodes/accessors/PointUVNode.js +6 -0
- package/src/nodes/accessors/ReferenceAttributeNode.js +279 -0
- package/src/nodes/accessors/ReferenceBaseNode.js +6 -0
- package/src/nodes/accessors/ReferenceNode.js +6 -0
- package/src/nodes/accessors/Skinning.js +57 -52
- package/src/nodes/accessors/StorageBufferNode.js +3 -12
- package/src/nodes/accessors/TextureBicubic.js +30 -27
- package/src/nodes/accessors/TextureNode.js +164 -78
- package/src/nodes/accessors/TextureSizeNode.js +6 -0
- package/src/nodes/accessors/UniformArrayNode.js +8 -15
- package/src/nodes/accessors/VelocityNode.js +13 -8
- package/src/nodes/code/CodeNode.js +6 -0
- package/src/nodes/code/ExpressionNode.js +6 -0
- package/src/nodes/code/FunctionCallNode.js +3 -3
- package/src/nodes/code/FunctionNode.js +15 -13
- package/src/nodes/core/ArrayNode.js +3 -3
- package/src/nodes/core/AssignNode.js +10 -9
- package/src/nodes/core/AttributeNode.js +39 -0
- package/src/nodes/core/BypassNode.js +6 -0
- package/src/nodes/core/ConstNode.js +31 -1
- package/src/nodes/core/ContextNode.js +11 -6
- package/src/nodes/core/IndexNode.js +6 -0
- package/src/nodes/core/InputNode.js +6 -0
- package/src/nodes/core/InspectorNode.js +17 -31
- package/src/nodes/core/IsolateNode.js +8 -0
- package/src/nodes/core/Node.js +367 -67
- package/src/nodes/core/NodeBuilder.js +664 -222
- package/src/nodes/core/NodeUtils.js +25 -0
- package/src/nodes/core/NodeVar.js +10 -1
- package/src/nodes/core/OutputStructNode.js +6 -0
- package/src/nodes/core/OverrideContextNode.js +38 -37
- package/src/nodes/core/PropertyNode.js +14 -0
- package/src/nodes/core/StackNode.js +33 -21
- package/src/nodes/core/StructNode.js +6 -0
- package/src/nodes/core/StructTypeNode.js +6 -0
- package/src/nodes/core/SubBuildNode.js +8 -0
- package/src/nodes/core/TempNode.js +10 -35
- package/src/nodes/core/UniformGroupNode.js +6 -0
- package/src/nodes/core/VarNode.js +43 -135
- package/src/nodes/core/VaryingNode.js +33 -2
- package/src/nodes/display/BlendModes.js +5 -40
- package/src/nodes/display/BumpMapNode.js +17 -7
- package/src/nodes/display/ColorAdjustment.js +22 -10
- package/src/nodes/display/ColorSpaceFunctions.js +2 -14
- package/src/nodes/display/ColorSpaceNode.js +3 -3
- package/src/nodes/display/FrontFacingNode.js +6 -0
- package/src/nodes/display/NormalMapNode.js +3 -3
- package/src/nodes/display/PassNode.js +75 -16
- package/src/nodes/display/RenderOutputNode.js +22 -5
- package/src/nodes/display/ScreenNode.js +6 -0
- package/src/nodes/display/ToneMappingFunctions.js +9 -51
- package/src/nodes/display/ToneMappingNode.js +3 -3
- package/src/nodes/display/ToonOutlinePassNode.js +66 -2
- package/src/nodes/display/ViewportDepthNode.js +34 -4
- package/src/nodes/functions/BSDF/BRDF_EON.js +65 -0
- package/src/nodes/functions/BSDF/BRDF_GGX.js +5 -3
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +2 -16
- package/src/nodes/functions/BSDF/D_GGX.js +1 -8
- package/src/nodes/functions/BSDF/D_GGX_Anisotropic.js +7 -10
- package/src/nodes/functions/BSDF/LTC.js +20 -47
- package/src/nodes/functions/BSDF/Schlick_to_F0.js +1 -9
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.js +1 -9
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.js +10 -13
- package/src/nodes/functions/PhysicalLightingModel.js +84 -51
- package/src/nodes/functions/VolumetricLightingModel.js +1 -1
- package/src/nodes/functions/material/getAlphaHashThreshold.js +3 -9
- package/src/nodes/functions/material/getParallaxCorrectNormal.js +10 -11
- package/src/nodes/functions/material/getRoughness.js +3 -1
- package/src/nodes/geometry/RangeNode.js +52 -69
- package/src/nodes/gpgpu/AtomicFunctionNode.js +11 -6
- package/src/nodes/gpgpu/BarrierNode.js +6 -0
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +6 -0
- package/src/nodes/gpgpu/ComputeNode.js +6 -0
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +38 -29
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +6 -0
- package/src/nodes/lighting/AnalyticLightNode.js +7 -14
- package/src/nodes/lighting/BasicEnvironmentNode.js +5 -1
- package/src/nodes/lighting/EnvironmentNode.js +58 -8
- package/src/nodes/lighting/IESSpotLightNode.js +19 -4
- package/src/nodes/lighting/LightProbeNode.js +2 -1
- package/src/nodes/lighting/LightUtils.js +2 -2
- package/src/nodes/lighting/LightingNode.js +6 -0
- package/src/nodes/lighting/LightsNode.js +26 -32
- package/src/nodes/lighting/PointShadowNode.js +92 -48
- package/src/nodes/lighting/ProjectorLightNode.js +1 -1
- package/src/nodes/lighting/RectAreaLightNode.js +13 -14
- package/src/nodes/lighting/ShadowBaseNode.js +9 -17
- package/src/nodes/lighting/ShadowFilterNode.js +26 -3
- package/src/nodes/lighting/ShadowNode.js +13 -11
- package/src/nodes/materialx/MaterialXColor.js +2 -14
- package/src/nodes/materialx/MaterialXColorTransform.js +1 -7
- package/src/nodes/materialx/MaterialXNodes.js +8 -11
- package/src/nodes/materialx/MaterialXNoise.js +195 -454
- package/src/nodes/math/BitcastNode.js +5 -5
- package/src/nodes/math/BitcountNode.js +18 -46
- package/src/nodes/math/ConditionalNode.js +92 -22
- package/src/nodes/math/Hash.js +1 -1
- package/src/nodes/math/MathNode.js +86 -64
- package/src/nodes/math/MathUtils.js +2 -2
- package/src/nodes/math/OperatorNode.js +42 -59
- package/src/nodes/math/PackFloatNode.js +9 -9
- package/src/nodes/math/Packed4x8IntegerNode.js +20 -52
- package/src/nodes/math/TriNoise3D.js +3 -23
- package/src/nodes/math/UnpackFloatNode.js +9 -9
- package/src/nodes/pmrem/PMREMNode.js +38 -75
- package/src/nodes/pmrem/PMREMUtils.js +108 -272
- package/src/nodes/procedural/Checker.js +1 -1
- package/src/nodes/tsl/TSLCore.js +199 -74
- package/src/nodes/utils/ArrayElementNode.js +19 -1
- package/src/nodes/utils/CubeMapNode.js +3 -3
- package/src/nodes/utils/DebugNode.js +2 -2
- package/src/nodes/utils/EventNode.js +6 -0
- package/src/nodes/utils/FlipNode.js +3 -3
- package/src/nodes/utils/FunctionOverloadingNode.js +7 -1
- package/src/nodes/utils/JoinNode.js +3 -3
- package/src/nodes/utils/LoopNode.js +14 -9
- package/src/nodes/utils/MemberNode.js +18 -0
- package/src/nodes/utils/PostProcessingUtils.js +20 -25
- package/src/nodes/utils/RTTNode.js +2 -0
- package/src/nodes/utils/ReflectorNode.js +24 -0
- package/src/nodes/utils/RotateNode.js +3 -3
- package/src/nodes/utils/SampleNode.js +6 -0
- package/src/nodes/utils/SetNode.js +3 -3
- package/src/nodes/utils/SplitNode.js +6 -0
- package/src/nodes/utils/UVUtils.js +2 -2
- package/src/objects/BatchedMesh.js +146 -15
- package/src/objects/InstancedMesh.js +12 -4
- package/src/objects/Line.js +20 -0
- package/src/objects/Mesh.js +8 -0
- package/src/objects/Points.js +20 -0
- package/src/objects/Skeleton.js +26 -0
- package/src/objects/SkinnedMesh.js +3 -3
- package/src/objects/Sprite.js +10 -0
- package/src/renderers/WebGLRenderer.js +104 -70
- package/src/renderers/common/Animation.js +5 -1
- package/src/renderers/common/Attributes.js +67 -57
- package/src/renderers/common/Backend.js +78 -3
- package/src/renderers/common/BindGroup.js +11 -0
- package/src/renderers/common/Binding.js +0 -11
- package/src/renderers/common/Bindings.js +116 -10
- package/src/renderers/common/Buffer.js +1 -1
- package/src/renderers/common/ClippingContext.js +12 -1
- package/src/renderers/common/ComputePipeline.js +17 -1
- package/src/renderers/common/DirectRenderPipeline.js +7 -3
- package/src/renderers/common/Geometries.js +170 -132
- package/src/renderers/common/Info.js +1 -1
- package/src/renderers/common/InspectorBase.js +5 -5
- package/src/renderers/common/Lighting.js +59 -0
- package/src/renderers/common/Pipelines.js +26 -12
- package/src/renderers/common/ProgrammableStage.js +1 -17
- package/src/renderers/common/RenderContext.js +21 -0
- package/src/renderers/common/RenderContexts.js +13 -4
- package/src/renderers/common/RenderObject.js +111 -35
- package/src/renderers/common/RenderObjects.js +37 -19
- package/src/renderers/common/Renderer.js +537 -295
- package/src/renderers/common/RendererUtils.js +15 -0
- package/src/renderers/common/StandardDrawingPipeline.js +343 -0
- package/src/renderers/common/Storage3DTexture.js +11 -0
- package/src/renderers/common/StorageArrayTexture.js +10 -0
- package/src/renderers/common/StorageTexture.js +0 -9
- package/src/renderers/common/Textures.js +144 -37
- package/src/renderers/common/UniformsGroup.js +19 -0
- package/src/renderers/common/XRManager.js +10 -91
- package/src/renderers/common/extras/PMREMGenerator.js +298 -576
- package/src/renderers/common/nodes/NodeBuilderState.js +7 -5
- package/src/renderers/common/nodes/NodeLibrary.js +11 -35
- package/src/renderers/common/nodes/NodeManager.js +80 -31
- package/src/renderers/common/nodes/NodeSampledTexture.js +14 -0
- package/src/renderers/common/nodes/NodeSampler.js +14 -0
- package/src/renderers/common/nodes/NodeStorageBuffer.js +1 -1
- package/src/renderers/common/nodes/NodeUniformBuffer.js +1 -14
- package/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js +13 -4
- package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +8 -8
- package/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.js +23 -11
- package/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js +21 -2
- package/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js +18 -2
- package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +104 -7
- package/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.js +11 -2
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +36 -20
- package/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.js +6 -0
- package/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk.js +0 -2
- package/src/renderers/shaders/ShaderLib/backgroundCube.glsl.js +4 -18
- package/src/renderers/shaders/ShaderLib/meshlambert.glsl.js +0 -1
- package/src/renderers/shaders/ShaderLib/meshphong.glsl.js +0 -1
- package/src/renderers/shaders/ShaderLib/meshphysical.glsl.js +8 -1
- package/src/renderers/shaders/ShaderLib.js +3 -0
- package/src/renderers/shaders/UniformsLib.js +4 -5
- package/src/renderers/webgl/WebGLBackground.js +3 -3
- package/src/renderers/webgl/WebGLBindingStates.js +4 -2
- package/src/renderers/webgl/WebGLCapabilities.js +7 -1
- package/src/renderers/webgl/WebGLEnvironments.js +2 -2
- package/src/renderers/webgl/WebGLGeometries.js +42 -14
- package/src/renderers/webgl/WebGLMaterials.js +15 -2
- package/src/renderers/webgl/WebGLOutput.js +37 -1
- package/src/renderers/webgl/WebGLProgram.js +13 -54
- package/src/renderers/webgl/WebGLPrograms.js +22 -8
- package/src/renderers/webgl/WebGLRenderStates.js +11 -8
- package/src/renderers/webgl/WebGLShadowMap.js +6 -4
- package/src/renderers/webgl/WebGLState.js +10 -6
- package/src/renderers/webgl/WebGLTextures.js +129 -77
- package/src/renderers/webgl/WebGLUniforms.js +44 -6
- package/src/renderers/webgl/WebGLUniformsGroups.js +75 -69
- package/src/renderers/webgl-fallback/WebGLBackend.js +206 -278
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +154 -20
- package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +45 -42
- package/src/renderers/webgl-fallback/utils/WebGLState.js +29 -4
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +129 -49
- package/src/renderers/webgl-fallback/utils/WebGLVertexArrayUtils.js +346 -0
- package/src/renderers/webgpu/WebGPUBackend.js +140 -82
- package/src/renderers/webgpu/WebGPURenderer.js +1 -1
- package/src/renderers/webgpu/nodes/BasicNodeLibrary.js +10 -10
- package/src/renderers/webgpu/nodes/StandardNodeLibrary.js +10 -10
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +135 -60
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +128 -55
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +1 -1
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +15 -12
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +55 -19
- package/src/renderers/webgpu/utils/WebGPUUtils.js +20 -3
- package/src/renderers/webxr/WebXRController.js +3 -3
- package/src/renderers/webxr/WebXRManager.js +5 -90
- package/src/scenes/Scene.js +4 -4
- package/src/textures/CompressedTexture.js +2 -2
- package/src/textures/DepthTexture.js +2 -2
- package/src/textures/FramebufferTexture.js +11 -0
- package/src/textures/Texture.js +29 -1
- package/src/textures/TextureSource.js +1 -1
- package/src/upe.js +1 -1
- package/src/utils.js +4 -4
- package/examples/jsm/libs/surfaceNet.js +0 -201
- package/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js +0 -186
|
@@ -15,15 +15,7 @@ export const mx_select = /*@__PURE__*/ Fn( ( [ b_immutable, t_immutable, f_immut
|
|
|
15
15
|
|
|
16
16
|
return select( b, t, f ).uniformFlow();
|
|
17
17
|
|
|
18
|
-
} )
|
|
19
|
-
name: 'mx_select',
|
|
20
|
-
type: 'float',
|
|
21
|
-
inputs: [
|
|
22
|
-
{ name: 'b', type: 'bool' },
|
|
23
|
-
{ name: 't', type: 'float' },
|
|
24
|
-
{ name: 'f', type: 'float' }
|
|
25
|
-
]
|
|
26
|
-
} );
|
|
18
|
+
}, { b: 'bool', t: 'float', f: 'float', return: 'float' } );
|
|
27
19
|
|
|
28
20
|
export const mx_negate_if = /*@__PURE__*/ Fn( ( [ val_immutable, b_immutable ] ) => {
|
|
29
21
|
|
|
@@ -32,14 +24,7 @@ export const mx_negate_if = /*@__PURE__*/ Fn( ( [ val_immutable, b_immutable ] )
|
|
|
32
24
|
|
|
33
25
|
return select( b, val.negate(), val ).uniformFlow();
|
|
34
26
|
|
|
35
|
-
} )
|
|
36
|
-
name: 'mx_negate_if',
|
|
37
|
-
type: 'float',
|
|
38
|
-
inputs: [
|
|
39
|
-
{ name: 'val', type: 'float' },
|
|
40
|
-
{ name: 'b', type: 'bool' }
|
|
41
|
-
]
|
|
42
|
-
} );
|
|
27
|
+
}, { val: 'float', b: 'bool', return: 'float' } );
|
|
43
28
|
|
|
44
29
|
export const mx_floor = /*@__PURE__*/ Fn( ( [ x_immutable ] ) => {
|
|
45
30
|
|
|
@@ -47,13 +32,7 @@ export const mx_floor = /*@__PURE__*/ Fn( ( [ x_immutable ] ) => {
|
|
|
47
32
|
|
|
48
33
|
return int( floor( x ) );
|
|
49
34
|
|
|
50
|
-
} )
|
|
51
|
-
name: 'mx_floor',
|
|
52
|
-
type: 'int',
|
|
53
|
-
inputs: [
|
|
54
|
-
{ name: 'x', type: 'float' }
|
|
55
|
-
]
|
|
56
|
-
} );
|
|
35
|
+
}, { x: 'float', return: 'int' } );
|
|
57
36
|
|
|
58
37
|
export const mx_floorfrac = /*@__PURE__*/ Fn( ( [ x_immutable, i ] ) => {
|
|
59
38
|
|
|
@@ -91,17 +70,14 @@ export const mx_bilerp_0 = /*@__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_
|
|
|
91
70
|
|
|
92
71
|
return mxBilerpValue( v0, v1, v2, v3, s, t );
|
|
93
72
|
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
{ name: 's', type: 'float' },
|
|
103
|
-
{ name: 't', type: 'float' }
|
|
104
|
-
]
|
|
73
|
+
}, {
|
|
74
|
+
v0: 'float',
|
|
75
|
+
v1: 'float',
|
|
76
|
+
v2: 'float',
|
|
77
|
+
v3: 'float',
|
|
78
|
+
s: 'float',
|
|
79
|
+
t: 'float',
|
|
80
|
+
return: 'float'
|
|
105
81
|
} );
|
|
106
82
|
|
|
107
83
|
export const mx_bilerp_1 = /*@__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, s_immutable, t_immutable ] ) => {
|
|
@@ -115,17 +91,14 @@ export const mx_bilerp_1 = /*@__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_
|
|
|
115
91
|
|
|
116
92
|
return mxBilerpValue( v0, v1, v2, v3, s, t );
|
|
117
93
|
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{ name: 's', type: 'float' },
|
|
127
|
-
{ name: 't', type: 'float' }
|
|
128
|
-
]
|
|
94
|
+
}, {
|
|
95
|
+
v0: 'vec3',
|
|
96
|
+
v1: 'vec3',
|
|
97
|
+
v2: 'vec3',
|
|
98
|
+
v3: 'vec3',
|
|
99
|
+
s: 'float',
|
|
100
|
+
t: 'float',
|
|
101
|
+
return: 'vec3'
|
|
129
102
|
} );
|
|
130
103
|
|
|
131
104
|
export const mx_bilerp = /*@__PURE__*/ overloadingFn( [ mx_bilerp_0, mx_bilerp_1 ] );
|
|
@@ -146,22 +119,19 @@ export const mx_trilerp_0 = /*@__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2
|
|
|
146
119
|
|
|
147
120
|
return mxTrilerpValue( v0, v1, v2, v3, v4, v5, v6, v7, s, t, r );
|
|
148
121
|
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
{ name: 't', type: 'float' },
|
|
163
|
-
{ name: 'r', type: 'float' }
|
|
164
|
-
]
|
|
122
|
+
}, {
|
|
123
|
+
v0: 'float',
|
|
124
|
+
v1: 'float',
|
|
125
|
+
v2: 'float',
|
|
126
|
+
v3: 'float',
|
|
127
|
+
v4: 'float',
|
|
128
|
+
v5: 'float',
|
|
129
|
+
v6: 'float',
|
|
130
|
+
v7: 'float',
|
|
131
|
+
s: 'float',
|
|
132
|
+
t: 'float',
|
|
133
|
+
r: 'float',
|
|
134
|
+
return: 'float'
|
|
165
135
|
} );
|
|
166
136
|
|
|
167
137
|
export const mx_trilerp_1 = /*@__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, v4_immutable, v5_immutable, v6_immutable, v7_immutable, s_immutable, t_immutable, r_immutable ] ) => {
|
|
@@ -180,22 +150,19 @@ export const mx_trilerp_1 = /*@__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2
|
|
|
180
150
|
|
|
181
151
|
return mxTrilerpValue( v0, v1, v2, v3, v4, v5, v6, v7, s, t, r );
|
|
182
152
|
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
{ name: 't', type: 'float' },
|
|
197
|
-
{ name: 'r', type: 'float' }
|
|
198
|
-
]
|
|
153
|
+
}, {
|
|
154
|
+
v0: 'vec3',
|
|
155
|
+
v1: 'vec3',
|
|
156
|
+
v2: 'vec3',
|
|
157
|
+
v3: 'vec3',
|
|
158
|
+
v4: 'vec3',
|
|
159
|
+
v5: 'vec3',
|
|
160
|
+
v6: 'vec3',
|
|
161
|
+
v7: 'vec3',
|
|
162
|
+
s: 'float',
|
|
163
|
+
t: 'float',
|
|
164
|
+
r: 'float',
|
|
165
|
+
return: 'vec3'
|
|
199
166
|
} );
|
|
200
167
|
|
|
201
168
|
export const mx_trilerp = /*@__PURE__*/ overloadingFn( [ mx_trilerp_0, mx_trilerp_1 ] );
|
|
@@ -211,15 +178,7 @@ export const mx_gradient_float_0 = /*@__PURE__*/ Fn( ( [ hash_immutable, x_immut
|
|
|
211
178
|
|
|
212
179
|
return mx_negate_if( u, bool( h.bitAnd( uint( 1 ) ) ) ).add( mx_negate_if( v, bool( h.bitAnd( uint( 2 ) ) ) ) );
|
|
213
180
|
|
|
214
|
-
} )
|
|
215
|
-
name: 'mx_gradient_float_0',
|
|
216
|
-
type: 'float',
|
|
217
|
-
inputs: [
|
|
218
|
-
{ name: 'hash', type: 'uint' },
|
|
219
|
-
{ name: 'x', type: 'float' },
|
|
220
|
-
{ name: 'y', type: 'float' }
|
|
221
|
-
]
|
|
222
|
-
} );
|
|
181
|
+
}, { hash: 'uint', x: 'float', y: 'float', return: 'float' } );
|
|
223
182
|
|
|
224
183
|
export const mx_gradient_float_1 = /*@__PURE__*/ Fn( ( [ hash_immutable, x_immutable, y_immutable, z_immutable ] ) => {
|
|
225
184
|
|
|
@@ -233,15 +192,12 @@ export const mx_gradient_float_1 = /*@__PURE__*/ Fn( ( [ hash_immutable, x_immut
|
|
|
233
192
|
|
|
234
193
|
return mx_negate_if( u, bool( h.bitAnd( uint( 1 ) ) ) ).add( mx_negate_if( v, bool( h.bitAnd( uint( 2 ) ) ) ) );
|
|
235
194
|
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
{ name: 'y', type: 'float' },
|
|
243
|
-
{ name: 'z', type: 'float' }
|
|
244
|
-
]
|
|
195
|
+
}, {
|
|
196
|
+
hash: 'uint',
|
|
197
|
+
x: 'float',
|
|
198
|
+
y: 'float',
|
|
199
|
+
z: 'float',
|
|
200
|
+
return: 'float'
|
|
245
201
|
} );
|
|
246
202
|
|
|
247
203
|
export const mx_gradient_float = /*@__PURE__*/ overloadingFn( [ mx_gradient_float_0, mx_gradient_float_1 ] );
|
|
@@ -254,15 +210,7 @@ export const mx_gradient_vec3_0 = /*@__PURE__*/ Fn( ( [ hash_immutable, x_immuta
|
|
|
254
210
|
|
|
255
211
|
return vec3( mx_gradient_float( hash.x, x, y ), mx_gradient_float( hash.y, x, y ), mx_gradient_float( hash.z, x, y ) );
|
|
256
212
|
|
|
257
|
-
} )
|
|
258
|
-
name: 'mx_gradient_vec3_0',
|
|
259
|
-
type: 'vec3',
|
|
260
|
-
inputs: [
|
|
261
|
-
{ name: 'hash', type: 'uvec3' },
|
|
262
|
-
{ name: 'x', type: 'float' },
|
|
263
|
-
{ name: 'y', type: 'float' }
|
|
264
|
-
]
|
|
265
|
-
} );
|
|
213
|
+
}, { hash: 'uvec3', x: 'float', y: 'float', return: 'vec3' } );
|
|
266
214
|
|
|
267
215
|
export const mx_gradient_vec3_1 = /*@__PURE__*/ Fn( ( [ hash_immutable, x_immutable, y_immutable, z_immutable ] ) => {
|
|
268
216
|
|
|
@@ -273,15 +221,12 @@ export const mx_gradient_vec3_1 = /*@__PURE__*/ Fn( ( [ hash_immutable, x_immuta
|
|
|
273
221
|
|
|
274
222
|
return vec3( mx_gradient_float( hash.x, x, y, z ), mx_gradient_float( hash.y, x, y, z ), mx_gradient_float( hash.z, x, y, z ) );
|
|
275
223
|
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
{ name: 'y', type: 'float' },
|
|
283
|
-
{ name: 'z', type: 'float' }
|
|
284
|
-
]
|
|
224
|
+
}, {
|
|
225
|
+
hash: 'uvec3',
|
|
226
|
+
x: 'float',
|
|
227
|
+
y: 'float',
|
|
228
|
+
z: 'float',
|
|
229
|
+
return: 'vec3'
|
|
285
230
|
} );
|
|
286
231
|
|
|
287
232
|
export const mx_gradient_vec3 = /*@__PURE__*/ overloadingFn( [ mx_gradient_vec3_0, mx_gradient_vec3_1 ] );
|
|
@@ -292,13 +237,7 @@ export const mx_gradient_scale2d_0 = /*@__PURE__*/ Fn( ( [ v_immutable ] ) => {
|
|
|
292
237
|
|
|
293
238
|
return mul( 0.6616, v );
|
|
294
239
|
|
|
295
|
-
} )
|
|
296
|
-
name: 'mx_gradient_scale2d_0',
|
|
297
|
-
type: 'float',
|
|
298
|
-
inputs: [
|
|
299
|
-
{ name: 'v', type: 'float' }
|
|
300
|
-
]
|
|
301
|
-
} );
|
|
240
|
+
}, { v: 'float', return: 'float' } );
|
|
302
241
|
|
|
303
242
|
export const mx_gradient_scale3d_0 = /*@__PURE__*/ Fn( ( [ v_immutable ] ) => {
|
|
304
243
|
|
|
@@ -306,13 +245,7 @@ export const mx_gradient_scale3d_0 = /*@__PURE__*/ Fn( ( [ v_immutable ] ) => {
|
|
|
306
245
|
|
|
307
246
|
return mul( 0.9820, v );
|
|
308
247
|
|
|
309
|
-
} )
|
|
310
|
-
name: 'mx_gradient_scale3d_0',
|
|
311
|
-
type: 'float',
|
|
312
|
-
inputs: [
|
|
313
|
-
{ name: 'v', type: 'float' }
|
|
314
|
-
]
|
|
315
|
-
} );
|
|
248
|
+
}, { v: 'float', return: 'float' } );
|
|
316
249
|
|
|
317
250
|
export const mx_gradient_scale2d_1 = /*@__PURE__*/ Fn( ( [ v_immutable ] ) => {
|
|
318
251
|
|
|
@@ -320,13 +253,7 @@ export const mx_gradient_scale2d_1 = /*@__PURE__*/ Fn( ( [ v_immutable ] ) => {
|
|
|
320
253
|
|
|
321
254
|
return mul( 0.6616, v );
|
|
322
255
|
|
|
323
|
-
} )
|
|
324
|
-
name: 'mx_gradient_scale2d_1',
|
|
325
|
-
type: 'vec3',
|
|
326
|
-
inputs: [
|
|
327
|
-
{ name: 'v', type: 'vec3' }
|
|
328
|
-
]
|
|
329
|
-
} );
|
|
256
|
+
}, { v: 'vec3', return: 'vec3' } );
|
|
330
257
|
|
|
331
258
|
export const mx_gradient_scale2d = /*@__PURE__*/ overloadingFn( [ mx_gradient_scale2d_0, mx_gradient_scale2d_1 ] );
|
|
332
259
|
|
|
@@ -336,13 +263,7 @@ export const mx_gradient_scale3d_1 = /*@__PURE__*/ Fn( ( [ v_immutable ] ) => {
|
|
|
336
263
|
|
|
337
264
|
return mul( 0.9820, v );
|
|
338
265
|
|
|
339
|
-
} )
|
|
340
|
-
name: 'mx_gradient_scale3d_1',
|
|
341
|
-
type: 'vec3',
|
|
342
|
-
inputs: [
|
|
343
|
-
{ name: 'v', type: 'vec3' }
|
|
344
|
-
]
|
|
345
|
-
} );
|
|
266
|
+
}, { v: 'vec3', return: 'vec3' } );
|
|
346
267
|
|
|
347
268
|
export const mx_gradient_scale3d = /*@__PURE__*/ overloadingFn( [ mx_gradient_scale3d_0, mx_gradient_scale3d_1 ] );
|
|
348
269
|
|
|
@@ -353,14 +274,7 @@ export const mx_rotl32 = /*@__PURE__*/ Fn( ( [ x_immutable, k_immutable ] ) => {
|
|
|
353
274
|
|
|
354
275
|
return x.shiftLeft( k ).bitOr( x.shiftRight( int( 32 ).sub( k ) ) );
|
|
355
276
|
|
|
356
|
-
} )
|
|
357
|
-
name: 'mx_rotl32',
|
|
358
|
-
type: 'uint',
|
|
359
|
-
inputs: [
|
|
360
|
-
{ name: 'x', type: 'uint' },
|
|
361
|
-
{ name: 'k', type: 'int' }
|
|
362
|
-
]
|
|
363
|
-
} );
|
|
277
|
+
}, { x: 'uint', k: 'int', return: 'uint' } );
|
|
364
278
|
|
|
365
279
|
export const mx_bjmix = /*@__PURE__*/ Fn( ( [ a, b, c ] ) => {
|
|
366
280
|
|
|
@@ -388,15 +302,7 @@ export const mx_bjmix = /*@__PURE__*/ Fn( ( [ a, b, c ] ) => {
|
|
|
388
302
|
|
|
389
303
|
return uvec3( a, b, c );
|
|
390
304
|
|
|
391
|
-
} )
|
|
392
|
-
name: 'mx_bjmix',
|
|
393
|
-
type: 'uvec3',
|
|
394
|
-
inputs: [
|
|
395
|
-
{ name: 'a', type: 'uint' },
|
|
396
|
-
{ name: 'b', type: 'uint' },
|
|
397
|
-
{ name: 'c', type: 'uint' }
|
|
398
|
-
]
|
|
399
|
-
} );
|
|
305
|
+
}, { a: 'uint', b: 'uint', c: 'uint', return: 'uvec3' } );
|
|
400
306
|
|
|
401
307
|
export const mx_bjfinal = /*@__PURE__*/ Fn( ( [ a_immutable, b_immutable, c_immutable ] ) => {
|
|
402
308
|
|
|
@@ -420,15 +326,7 @@ export const mx_bjfinal = /*@__PURE__*/ Fn( ( [ a_immutable, b_immutable, c_immu
|
|
|
420
326
|
|
|
421
327
|
return c;
|
|
422
328
|
|
|
423
|
-
} )
|
|
424
|
-
name: 'mx_bjfinal',
|
|
425
|
-
type: 'uint',
|
|
426
|
-
inputs: [
|
|
427
|
-
{ name: 'a', type: 'uint' },
|
|
428
|
-
{ name: 'b', type: 'uint' },
|
|
429
|
-
{ name: 'c', type: 'uint' }
|
|
430
|
-
]
|
|
431
|
-
} );
|
|
329
|
+
}, { a: 'uint', b: 'uint', c: 'uint', return: 'uint' } );
|
|
432
330
|
|
|
433
331
|
export const mx_bits_to_01 = /*@__PURE__*/ Fn( ( [ bits_immutable ] ) => {
|
|
434
332
|
|
|
@@ -436,13 +334,7 @@ export const mx_bits_to_01 = /*@__PURE__*/ Fn( ( [ bits_immutable ] ) => {
|
|
|
436
334
|
|
|
437
335
|
return float( bits ).div( float( uint( 0xffffffff ) ) );
|
|
438
336
|
|
|
439
|
-
} )
|
|
440
|
-
name: 'mx_bits_to_01',
|
|
441
|
-
type: 'float',
|
|
442
|
-
inputs: [
|
|
443
|
-
{ name: 'bits', type: 'uint' }
|
|
444
|
-
]
|
|
445
|
-
} );
|
|
337
|
+
}, { bits: 'uint', return: 'float' } );
|
|
446
338
|
|
|
447
339
|
export const mx_fade = /*@__PURE__*/ Fn( ( [ t_immutable ] ) => {
|
|
448
340
|
|
|
@@ -450,13 +342,7 @@ export const mx_fade = /*@__PURE__*/ Fn( ( [ t_immutable ] ) => {
|
|
|
450
342
|
|
|
451
343
|
return t.mul( t ).mul( t ).mul( t.mul( t.mul( 6.0 ).sub( 15.0 ) ).add( 10.0 ) );
|
|
452
344
|
|
|
453
|
-
} )
|
|
454
|
-
name: 'mx_fade',
|
|
455
|
-
type: 'float',
|
|
456
|
-
inputs: [
|
|
457
|
-
{ name: 't', type: 'float' }
|
|
458
|
-
]
|
|
459
|
-
} );
|
|
345
|
+
}, { t: 'float', return: 'float' } );
|
|
460
346
|
|
|
461
347
|
export const mx_hash_int_0 = /*@__PURE__*/ Fn( ( [ x_immutable ] ) => {
|
|
462
348
|
|
|
@@ -466,13 +352,7 @@ export const mx_hash_int_0 = /*@__PURE__*/ Fn( ( [ x_immutable ] ) => {
|
|
|
466
352
|
|
|
467
353
|
return mx_bjfinal( seed.add( uint( x ) ), seed, seed );
|
|
468
354
|
|
|
469
|
-
} )
|
|
470
|
-
name: 'mx_hash_int_0',
|
|
471
|
-
type: 'uint',
|
|
472
|
-
inputs: [
|
|
473
|
-
{ name: 'x', type: 'int' }
|
|
474
|
-
]
|
|
475
|
-
} );
|
|
355
|
+
}, { x: 'int', return: 'uint' } );
|
|
476
356
|
|
|
477
357
|
export const mx_hash_int_1 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable ] ) => {
|
|
478
358
|
|
|
@@ -486,14 +366,7 @@ export const mx_hash_int_1 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable ] )
|
|
|
486
366
|
|
|
487
367
|
return mx_bjfinal( a, b, c );
|
|
488
368
|
|
|
489
|
-
} )
|
|
490
|
-
name: 'mx_hash_int_1',
|
|
491
|
-
type: 'uint',
|
|
492
|
-
inputs: [
|
|
493
|
-
{ name: 'x', type: 'int' },
|
|
494
|
-
{ name: 'y', type: 'int' }
|
|
495
|
-
]
|
|
496
|
-
} );
|
|
369
|
+
}, { x: 'int', y: 'int', return: 'uint' } );
|
|
497
370
|
|
|
498
371
|
export const mx_hash_int_2 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable ] ) => {
|
|
499
372
|
|
|
@@ -509,15 +382,7 @@ export const mx_hash_int_2 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_i
|
|
|
509
382
|
|
|
510
383
|
return mx_bjfinal( a, b, c );
|
|
511
384
|
|
|
512
|
-
} )
|
|
513
|
-
name: 'mx_hash_int_2',
|
|
514
|
-
type: 'uint',
|
|
515
|
-
inputs: [
|
|
516
|
-
{ name: 'x', type: 'int' },
|
|
517
|
-
{ name: 'y', type: 'int' },
|
|
518
|
-
{ name: 'z', type: 'int' }
|
|
519
|
-
]
|
|
520
|
-
} );
|
|
385
|
+
}, { x: 'int', y: 'int', z: 'int', return: 'uint' } );
|
|
521
386
|
|
|
522
387
|
export const mx_hash_int_3 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable, xx_immutable ] ) => {
|
|
523
388
|
|
|
@@ -539,15 +404,12 @@ export const mx_hash_int_3 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_i
|
|
|
539
404
|
|
|
540
405
|
return mx_bjfinal( a, b, c );
|
|
541
406
|
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
{ name: 'z', type: 'int' },
|
|
549
|
-
{ name: 'xx', type: 'int' }
|
|
550
|
-
]
|
|
407
|
+
}, {
|
|
408
|
+
x: 'int',
|
|
409
|
+
y: 'int',
|
|
410
|
+
z: 'int',
|
|
411
|
+
xx: 'int',
|
|
412
|
+
return: 'uint'
|
|
551
413
|
} );
|
|
552
414
|
|
|
553
415
|
export const mx_hash_int_4 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable, xx_immutable, yy_immutable ] ) => {
|
|
@@ -572,16 +434,13 @@ export const mx_hash_int_4 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_i
|
|
|
572
434
|
|
|
573
435
|
return mx_bjfinal( a, b, c );
|
|
574
436
|
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
{ name: 'xx', type: 'int' },
|
|
583
|
-
{ name: 'yy', type: 'int' }
|
|
584
|
-
]
|
|
437
|
+
}, {
|
|
438
|
+
x: 'int',
|
|
439
|
+
y: 'int',
|
|
440
|
+
z: 'int',
|
|
441
|
+
xx: 'int',
|
|
442
|
+
yy: 'int',
|
|
443
|
+
return: 'uint'
|
|
585
444
|
} );
|
|
586
445
|
|
|
587
446
|
export const mx_hash_int = /*@__PURE__*/ overloadingFn( [ mx_hash_int_0, mx_hash_int_1, mx_hash_int_2, mx_hash_int_3, mx_hash_int_4 ] );
|
|
@@ -598,14 +457,7 @@ export const mx_hash_vec3_0 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable ] )
|
|
|
598
457
|
|
|
599
458
|
return result;
|
|
600
459
|
|
|
601
|
-
} )
|
|
602
|
-
name: 'mx_hash_vec3_0',
|
|
603
|
-
type: 'uvec3',
|
|
604
|
-
inputs: [
|
|
605
|
-
{ name: 'x', type: 'int' },
|
|
606
|
-
{ name: 'y', type: 'int' }
|
|
607
|
-
]
|
|
608
|
-
} );
|
|
460
|
+
}, { x: 'int', y: 'int', return: 'uvec3' } );
|
|
609
461
|
|
|
610
462
|
export const mx_hash_vec3_1 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable ] ) => {
|
|
611
463
|
|
|
@@ -620,15 +472,7 @@ export const mx_hash_vec3_1 = /*@__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_
|
|
|
620
472
|
|
|
621
473
|
return result;
|
|
622
474
|
|
|
623
|
-
} )
|
|
624
|
-
name: 'mx_hash_vec3_1',
|
|
625
|
-
type: 'uvec3',
|
|
626
|
-
inputs: [
|
|
627
|
-
{ name: 'x', type: 'int' },
|
|
628
|
-
{ name: 'y', type: 'int' },
|
|
629
|
-
{ name: 'z', type: 'int' }
|
|
630
|
-
]
|
|
631
|
-
} );
|
|
475
|
+
}, { x: 'int', y: 'int', z: 'int', return: 'uvec3' } );
|
|
632
476
|
|
|
633
477
|
export const mx_hash_vec3 = /*@__PURE__*/ overloadingFn( [ mx_hash_vec3_0, mx_hash_vec3_1 ] );
|
|
634
478
|
|
|
@@ -644,13 +488,7 @@ export const mx_perlin_noise_float_0 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) =>
|
|
|
644
488
|
|
|
645
489
|
return mx_gradient_scale2d( result );
|
|
646
490
|
|
|
647
|
-
} )
|
|
648
|
-
name: 'mx_perlin_noise_float_0',
|
|
649
|
-
type: 'float',
|
|
650
|
-
inputs: [
|
|
651
|
-
{ name: 'p', type: 'vec2' }
|
|
652
|
-
]
|
|
653
|
-
} );
|
|
491
|
+
}, { p: 'vec2', return: 'float' } );
|
|
654
492
|
|
|
655
493
|
export const mx_perlin_noise_float_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
656
494
|
|
|
@@ -666,13 +504,7 @@ export const mx_perlin_noise_float_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) =>
|
|
|
666
504
|
|
|
667
505
|
return mx_gradient_scale3d( result );
|
|
668
506
|
|
|
669
|
-
} )
|
|
670
|
-
name: 'mx_perlin_noise_float_1',
|
|
671
|
-
type: 'float',
|
|
672
|
-
inputs: [
|
|
673
|
-
{ name: 'p', type: 'vec3' }
|
|
674
|
-
]
|
|
675
|
-
} );
|
|
507
|
+
}, { p: 'vec3', return: 'float' } );
|
|
676
508
|
|
|
677
509
|
export const mx_perlin_noise_float = /*@__PURE__*/ overloadingFn( [ mx_perlin_noise_float_0, mx_perlin_noise_float_1 ] );
|
|
678
510
|
|
|
@@ -688,13 +520,7 @@ export const mx_perlin_noise_vec3_0 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
688
520
|
|
|
689
521
|
return mx_gradient_scale2d( result );
|
|
690
522
|
|
|
691
|
-
} )
|
|
692
|
-
name: 'mx_perlin_noise_vec3_0',
|
|
693
|
-
type: 'vec3',
|
|
694
|
-
inputs: [
|
|
695
|
-
{ name: 'p', type: 'vec2' }
|
|
696
|
-
]
|
|
697
|
-
} );
|
|
523
|
+
}, { p: 'vec2', return: 'vec3' } );
|
|
698
524
|
|
|
699
525
|
export const mx_perlin_noise_vec3_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
700
526
|
|
|
@@ -710,13 +536,7 @@ export const mx_perlin_noise_vec3_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
710
536
|
|
|
711
537
|
return mx_gradient_scale3d( result );
|
|
712
538
|
|
|
713
|
-
} )
|
|
714
|
-
name: 'mx_perlin_noise_vec3_1',
|
|
715
|
-
type: 'vec3',
|
|
716
|
-
inputs: [
|
|
717
|
-
{ name: 'p', type: 'vec3' }
|
|
718
|
-
]
|
|
719
|
-
} );
|
|
539
|
+
}, { p: 'vec3', return: 'vec3' } );
|
|
720
540
|
|
|
721
541
|
export const mx_perlin_noise_vec3 = /*@__PURE__*/ overloadingFn( [ mx_perlin_noise_vec3_0, mx_perlin_noise_vec3_1 ] );
|
|
722
542
|
|
|
@@ -727,13 +547,7 @@ export const mx_cell_noise_float_0 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
727
547
|
|
|
728
548
|
return mx_bits_to_01( mx_hash_int( ix ) );
|
|
729
549
|
|
|
730
|
-
} )
|
|
731
|
-
name: 'mx_cell_noise_float_0',
|
|
732
|
-
type: 'float',
|
|
733
|
-
inputs: [
|
|
734
|
-
{ name: 'p', type: 'float' }
|
|
735
|
-
]
|
|
736
|
-
} );
|
|
550
|
+
}, { p: 'float', return: 'float' } );
|
|
737
551
|
|
|
738
552
|
export const mx_cell_noise_float_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
739
553
|
|
|
@@ -743,13 +557,7 @@ export const mx_cell_noise_float_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
743
557
|
|
|
744
558
|
return mx_bits_to_01( mx_hash_int( ix, iy ) );
|
|
745
559
|
|
|
746
|
-
} )
|
|
747
|
-
name: 'mx_cell_noise_float_1',
|
|
748
|
-
type: 'float',
|
|
749
|
-
inputs: [
|
|
750
|
-
{ name: 'p', type: 'vec2' }
|
|
751
|
-
]
|
|
752
|
-
} );
|
|
560
|
+
}, { p: 'vec2', return: 'float' } );
|
|
753
561
|
|
|
754
562
|
export const mx_cell_noise_float_2 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
755
563
|
|
|
@@ -760,13 +568,7 @@ export const mx_cell_noise_float_2 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
760
568
|
|
|
761
569
|
return mx_bits_to_01( mx_hash_int( ix, iy, iz ) );
|
|
762
570
|
|
|
763
|
-
} )
|
|
764
|
-
name: 'mx_cell_noise_float_2',
|
|
765
|
-
type: 'float',
|
|
766
|
-
inputs: [
|
|
767
|
-
{ name: 'p', type: 'vec3' }
|
|
768
|
-
]
|
|
769
|
-
} );
|
|
571
|
+
}, { p: 'vec3', return: 'float' } );
|
|
770
572
|
|
|
771
573
|
export const mx_cell_noise_float_3 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
772
574
|
|
|
@@ -778,13 +580,7 @@ export const mx_cell_noise_float_3 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
778
580
|
|
|
779
581
|
return mx_bits_to_01( mx_hash_int( ix, iy, iz, iw ) );
|
|
780
582
|
|
|
781
|
-
} )
|
|
782
|
-
name: 'mx_cell_noise_float_3',
|
|
783
|
-
type: 'float',
|
|
784
|
-
inputs: [
|
|
785
|
-
{ name: 'p', type: 'vec4' }
|
|
786
|
-
]
|
|
787
|
-
} );
|
|
583
|
+
}, { p: 'vec4', return: 'float' } );
|
|
788
584
|
|
|
789
585
|
export const mx_cell_noise_float = /*@__PURE__*/ overloadingFn( [ mx_cell_noise_float_0, mx_cell_noise_float_1, mx_cell_noise_float_2, mx_cell_noise_float_3 ] );
|
|
790
586
|
|
|
@@ -799,13 +595,7 @@ export const mx_cell_noise_vec3_0 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
799
595
|
mx_bits_to_01( mx_hash_int( ix, int( 2 ) ) )
|
|
800
596
|
);
|
|
801
597
|
|
|
802
|
-
} )
|
|
803
|
-
name: 'mx_cell_noise_vec3_0',
|
|
804
|
-
type: 'vec3',
|
|
805
|
-
inputs: [
|
|
806
|
-
{ name: 'p', type: 'float' }
|
|
807
|
-
]
|
|
808
|
-
} );
|
|
598
|
+
}, { p: 'float', return: 'vec3' } );
|
|
809
599
|
|
|
810
600
|
export const mx_cell_noise_vec3_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
811
601
|
|
|
@@ -819,13 +609,7 @@ export const mx_cell_noise_vec3_1 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
819
609
|
mx_bits_to_01( mx_hash_int( ix, iy, int( 2 ) ) )
|
|
820
610
|
);
|
|
821
611
|
|
|
822
|
-
} )
|
|
823
|
-
name: 'mx_cell_noise_vec3_1',
|
|
824
|
-
type: 'vec3',
|
|
825
|
-
inputs: [
|
|
826
|
-
{ name: 'p', type: 'vec2' }
|
|
827
|
-
]
|
|
828
|
-
} );
|
|
612
|
+
}, { p: 'vec2', return: 'vec3' } );
|
|
829
613
|
|
|
830
614
|
export const mx_cell_noise_vec3_2 = /*@__PURE__*/ Fn( ( [ positionInput ] ) => {
|
|
831
615
|
|
|
@@ -851,13 +635,7 @@ export const mx_cell_noise_vec3_2 = /*@__PURE__*/ Fn( ( [ positionInput ] ) => {
|
|
|
851
635
|
mx_bits_to_01( hash2 )
|
|
852
636
|
);
|
|
853
637
|
|
|
854
|
-
} )
|
|
855
|
-
name: 'mx_cell_noise_vec3_2',
|
|
856
|
-
type: 'vec3',
|
|
857
|
-
inputs: [
|
|
858
|
-
{ name: 'p', type: 'vec3' }
|
|
859
|
-
]
|
|
860
|
-
} );
|
|
638
|
+
}, { p: 'vec3', return: 'vec3' } );
|
|
861
639
|
|
|
862
640
|
export const mx_cell_noise_vec3_3 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
863
641
|
|
|
@@ -885,13 +663,7 @@ export const mx_cell_noise_vec3_3 = /*@__PURE__*/ Fn( ( [ p_immutable ] ) => {
|
|
|
885
663
|
mx_bits_to_01( mx_bjfinal( a, add( b, uint( 2 ) ), c ) )
|
|
886
664
|
);
|
|
887
665
|
|
|
888
|
-
} )
|
|
889
|
-
name: 'mx_cell_noise_vec3_3',
|
|
890
|
-
type: 'vec3',
|
|
891
|
-
inputs: [
|
|
892
|
-
{ name: 'p', type: 'vec4' }
|
|
893
|
-
]
|
|
894
|
-
} );
|
|
666
|
+
}, { p: 'vec4', return: 'vec3' } );
|
|
895
667
|
|
|
896
668
|
export const mx_cell_noise_vec3 = /*@__PURE__*/ overloadingFn( [ mx_cell_noise_vec3_0, mx_cell_noise_vec3_1, mx_cell_noise_vec3_2, mx_cell_noise_vec3_3 ] );
|
|
897
669
|
|
|
@@ -919,7 +691,7 @@ const mx_cell_noise_vec3_3d = /*@__PURE__*/ Fn( ( [ positionInput ] ) => {
|
|
|
919
691
|
mx_bits_to_01( hash2 )
|
|
920
692
|
);
|
|
921
693
|
|
|
922
|
-
} );
|
|
694
|
+
}, { position: 'vec3', return: 'vec3' } );
|
|
923
695
|
|
|
924
696
|
export const mx_fractal_noise_float_2d = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
|
|
925
697
|
|
|
@@ -940,15 +712,12 @@ export const mx_fractal_noise_float_2d = /*@__PURE__*/ Fn( ( [ p_immutable, octa
|
|
|
940
712
|
|
|
941
713
|
return result;
|
|
942
714
|
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
{ name: 'lacunarity', type: 'float' },
|
|
950
|
-
{ name: 'diminish', type: 'float' }
|
|
951
|
-
]
|
|
715
|
+
}, {
|
|
716
|
+
p: 'vec2',
|
|
717
|
+
octaves: 'int',
|
|
718
|
+
lacunarity: 'float',
|
|
719
|
+
diminish: 'float',
|
|
720
|
+
return: 'float'
|
|
952
721
|
} );
|
|
953
722
|
|
|
954
723
|
export const mx_fractal_noise_float = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
|
|
@@ -970,15 +739,12 @@ export const mx_fractal_noise_float = /*@__PURE__*/ Fn( ( [ p_immutable, octaves
|
|
|
970
739
|
|
|
971
740
|
return result;
|
|
972
741
|
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
{ name: 'lacunarity', type: 'float' },
|
|
980
|
-
{ name: 'diminish', type: 'float' }
|
|
981
|
-
]
|
|
742
|
+
}, {
|
|
743
|
+
p: 'vec3',
|
|
744
|
+
octaves: 'int',
|
|
745
|
+
lacunarity: 'float',
|
|
746
|
+
diminish: 'float',
|
|
747
|
+
return: 'float'
|
|
982
748
|
} );
|
|
983
749
|
|
|
984
750
|
export const mx_fractal_noise_vec3 = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
|
|
@@ -1000,15 +766,12 @@ export const mx_fractal_noise_vec3 = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_
|
|
|
1000
766
|
|
|
1001
767
|
return result;
|
|
1002
768
|
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
{ name: 'lacunarity', type: 'float' },
|
|
1010
|
-
{ name: 'diminish', type: 'float' }
|
|
1011
|
-
]
|
|
769
|
+
}, {
|
|
770
|
+
p: 'vec3',
|
|
771
|
+
octaves: 'int',
|
|
772
|
+
lacunarity: 'float',
|
|
773
|
+
diminish: 'float',
|
|
774
|
+
return: 'vec3'
|
|
1012
775
|
} );
|
|
1013
776
|
|
|
1014
777
|
export const mx_fractal_noise_vec2 = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
|
|
@@ -1020,15 +783,12 @@ export const mx_fractal_noise_vec2 = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_
|
|
|
1020
783
|
|
|
1021
784
|
return vec2( mx_fractal_noise_float( p, octaves, lacunarity, diminish ), mx_fractal_noise_float( p.add( vec3( int( 19 ), int( 193 ), int( 17 ) ) ), octaves, lacunarity, diminish ) );
|
|
1022
785
|
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
{ name: 'lacunarity', type: 'float' },
|
|
1030
|
-
{ name: 'diminish', type: 'float' }
|
|
1031
|
-
]
|
|
786
|
+
}, {
|
|
787
|
+
p: 'vec3',
|
|
788
|
+
octaves: 'int',
|
|
789
|
+
lacunarity: 'float',
|
|
790
|
+
diminish: 'float',
|
|
791
|
+
return: 'vec2'
|
|
1032
792
|
} );
|
|
1033
793
|
|
|
1034
794
|
export const mx_fractal_noise_vec4 = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
|
|
@@ -1042,15 +802,12 @@ export const mx_fractal_noise_vec4 = /*@__PURE__*/ Fn( ( [ p_immutable, octaves_
|
|
|
1042
802
|
|
|
1043
803
|
return vec4( c, f );
|
|
1044
804
|
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
{ name: 'lacunarity', type: 'float' },
|
|
1052
|
-
{ name: 'diminish', type: 'float' }
|
|
1053
|
-
]
|
|
805
|
+
}, {
|
|
806
|
+
p: 'vec3',
|
|
807
|
+
octaves: 'int',
|
|
808
|
+
lacunarity: 'float',
|
|
809
|
+
diminish: 'float',
|
|
810
|
+
return: 'vec4'
|
|
1054
811
|
} );
|
|
1055
812
|
|
|
1056
813
|
export const mx_worley_distance_0 = /*@__PURE__*/ Fn( ( [ p_immutable, x_immutable, y_immutable, xoff_immutable, yoff_immutable, jitter_immutable, metric_immutable ] ) => {
|
|
@@ -1084,18 +841,15 @@ export const mx_worley_distance_0 = /*@__PURE__*/ Fn( ( [ p_immutable, x_immutab
|
|
|
1084
841
|
|
|
1085
842
|
return dot( diff, diff );
|
|
1086
843
|
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
{ name: 'jitter', type: 'float' },
|
|
1097
|
-
{ name: 'metric', type: 'int' }
|
|
1098
|
-
]
|
|
844
|
+
}, {
|
|
845
|
+
p: 'vec2',
|
|
846
|
+
x: 'int',
|
|
847
|
+
y: 'int',
|
|
848
|
+
xoff: 'int',
|
|
849
|
+
yoff: 'int',
|
|
850
|
+
jitter: 'float',
|
|
851
|
+
metric: 'int',
|
|
852
|
+
return: 'float'
|
|
1099
853
|
} );
|
|
1100
854
|
|
|
1101
855
|
export const mx_worley_distance_1 = /*@__PURE__*/ Fn( ( [ p_immutable, x_immutable, y_immutable, z_immutable, xoff_immutable, yoff_immutable, zoff_immutable, jitter_immutable, metric_immutable ] ) => {
|
|
@@ -1130,20 +884,17 @@ export const mx_worley_distance_1 = /*@__PURE__*/ Fn( ( [ p_immutable, x_immutab
|
|
|
1130
884
|
|
|
1131
885
|
return dot( diff, diff );
|
|
1132
886
|
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
{ name: 'jitter', type: 'float' },
|
|
1145
|
-
{ name: 'metric', type: 'int' }
|
|
1146
|
-
]
|
|
887
|
+
}, {
|
|
888
|
+
p: 'vec3',
|
|
889
|
+
x: 'int',
|
|
890
|
+
y: 'int',
|
|
891
|
+
z: 'int',
|
|
892
|
+
xoff: 'int',
|
|
893
|
+
yoff: 'int',
|
|
894
|
+
zoff: 'int',
|
|
895
|
+
jitter: 'float',
|
|
896
|
+
metric: 'int',
|
|
897
|
+
return: 'float'
|
|
1147
898
|
} );
|
|
1148
899
|
|
|
1149
900
|
export const mx_worley_distance = /*@__PURE__*/ overloadingFn( [ mx_worley_distance_0, mx_worley_distance_1 ] );
|
|
@@ -1198,7 +949,7 @@ export const mx_worley_noise_float_3d = /*@__PURE__*/ Fn( ( [ positionInput, jit
|
|
|
1198
949
|
|
|
1199
950
|
return sqdist;
|
|
1200
951
|
|
|
1201
|
-
} );
|
|
952
|
+
}, { position: 'vec3', jitter: 'float', style: 'int', return: 'float' } );
|
|
1202
953
|
|
|
1203
954
|
export const mx_worley_noise_float_2d = /*@__PURE__*/ Fn( ( [ texcoordInput, jitterInput, styleInput ] ) => {
|
|
1204
955
|
|
|
@@ -1246,7 +997,7 @@ export const mx_worley_noise_float_2d = /*@__PURE__*/ Fn( ( [ texcoordInput, jit
|
|
|
1246
997
|
|
|
1247
998
|
return sqdist;
|
|
1248
999
|
|
|
1249
|
-
} );
|
|
1000
|
+
}, { texcoord: 'vec2', jitter: 'float', style: 'int', return: 'float' } );
|
|
1250
1001
|
|
|
1251
1002
|
export const mx_worley_noise_float = /*@__PURE__*/ overloadingFn( [ mx_worley_noise_float_2d, mx_worley_noise_float_3d ] );
|
|
1252
1003
|
|
|
@@ -1288,15 +1039,7 @@ export const mx_worley_noise_vec2_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_
|
|
|
1288
1039
|
|
|
1289
1040
|
return sqdist;
|
|
1290
1041
|
|
|
1291
|
-
} )
|
|
1292
|
-
name: 'mx_worley_noise_vec2_0',
|
|
1293
|
-
type: 'vec2',
|
|
1294
|
-
inputs: [
|
|
1295
|
-
{ name: 'p', type: 'vec2' },
|
|
1296
|
-
{ name: 'jitter', type: 'float' },
|
|
1297
|
-
{ name: 'metric', type: 'int' }
|
|
1298
|
-
]
|
|
1299
|
-
} );
|
|
1042
|
+
}, { p: 'vec2', jitter: 'float', metric: 'int', return: 'vec2' } );
|
|
1300
1043
|
|
|
1301
1044
|
export const mx_worley_noise_vec3_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
|
|
1302
1045
|
|
|
@@ -1342,15 +1085,7 @@ export const mx_worley_noise_vec3_0 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_
|
|
|
1342
1085
|
|
|
1343
1086
|
return sqdist;
|
|
1344
1087
|
|
|
1345
|
-
} )
|
|
1346
|
-
name: 'mx_worley_noise_vec3_0',
|
|
1347
|
-
type: 'vec3',
|
|
1348
|
-
inputs: [
|
|
1349
|
-
{ name: 'p', type: 'vec2' },
|
|
1350
|
-
{ name: 'jitter', type: 'float' },
|
|
1351
|
-
{ name: 'metric', type: 'int' }
|
|
1352
|
-
]
|
|
1353
|
-
} );
|
|
1088
|
+
}, { p: 'vec2', jitter: 'float', metric: 'int', return: 'vec3' } );
|
|
1354
1089
|
|
|
1355
1090
|
export const mx_worley_noise_vec2_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
|
|
1356
1091
|
|
|
@@ -1394,15 +1129,7 @@ export const mx_worley_noise_vec2_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_
|
|
|
1394
1129
|
|
|
1395
1130
|
return sqdist;
|
|
1396
1131
|
|
|
1397
|
-
} )
|
|
1398
|
-
name: 'mx_worley_noise_vec2_1',
|
|
1399
|
-
type: 'vec2',
|
|
1400
|
-
inputs: [
|
|
1401
|
-
{ name: 'p', type: 'vec3' },
|
|
1402
|
-
{ name: 'jitter', type: 'float' },
|
|
1403
|
-
{ name: 'metric', type: 'int' }
|
|
1404
|
-
]
|
|
1405
|
-
} );
|
|
1132
|
+
}, { p: 'vec3', jitter: 'float', metric: 'int', return: 'vec2' } );
|
|
1406
1133
|
|
|
1407
1134
|
export const mx_worley_noise_vec2 = /*@__PURE__*/ overloadingFn( [ mx_worley_noise_vec2_0, mx_worley_noise_vec2_1 ] );
|
|
1408
1135
|
|
|
@@ -1454,15 +1181,7 @@ export const mx_worley_noise_vec3_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_
|
|
|
1454
1181
|
|
|
1455
1182
|
return sqdist;
|
|
1456
1183
|
|
|
1457
|
-
} )
|
|
1458
|
-
name: 'mx_worley_noise_vec3_1',
|
|
1459
|
-
type: 'vec3',
|
|
1460
|
-
inputs: [
|
|
1461
|
-
{ name: 'p', type: 'vec3' },
|
|
1462
|
-
{ name: 'jitter', type: 'float' },
|
|
1463
|
-
{ name: 'metric', type: 'int' }
|
|
1464
|
-
]
|
|
1465
|
-
} );
|
|
1184
|
+
}, { p: 'vec3', jitter: 'float', metric: 'int', return: 'vec3' } );
|
|
1466
1185
|
|
|
1467
1186
|
export const mx_worley_noise_vec3 = /*@__PURE__*/ overloadingFn( [ mx_worley_noise_vec3_0, mx_worley_noise_vec3_1 ] );
|
|
1468
1187
|
|
|
@@ -1509,15 +1228,12 @@ export const mx_worley_noise_vec3_style_0 = /*@__PURE__*/ Fn( ( [ p_immutable, j
|
|
|
1509
1228
|
|
|
1510
1229
|
return result;
|
|
1511
1230
|
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
{ name: 'style', type: 'int' },
|
|
1519
|
-
{ name: 'metric', type: 'int' }
|
|
1520
|
-
]
|
|
1231
|
+
}, {
|
|
1232
|
+
p: 'vec2',
|
|
1233
|
+
jitter: 'float',
|
|
1234
|
+
style: 'int',
|
|
1235
|
+
metric: 'int',
|
|
1236
|
+
return: 'vec3'
|
|
1521
1237
|
} );
|
|
1522
1238
|
|
|
1523
1239
|
export const mx_worley_noise_vec3_style_1 = /*@__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, style_immutable, metric_immutable ] ) => {
|
|
@@ -1566,15 +1282,12 @@ export const mx_worley_noise_vec3_style_1 = /*@__PURE__*/ Fn( ( [ p_immutable, j
|
|
|
1566
1282
|
|
|
1567
1283
|
return result;
|
|
1568
1284
|
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
{ name: 'style', type: 'int' },
|
|
1576
|
-
{ name: 'metric', type: 'int' }
|
|
1577
|
-
]
|
|
1285
|
+
}, {
|
|
1286
|
+
p: 'vec3',
|
|
1287
|
+
jitter: 'float',
|
|
1288
|
+
style: 'int',
|
|
1289
|
+
metric: 'int',
|
|
1290
|
+
return: 'vec3'
|
|
1578
1291
|
} );
|
|
1579
1292
|
|
|
1580
1293
|
export const mx_worley_noise_vec3_style = /*@__PURE__*/ overloadingFn( [ mx_worley_noise_vec3_style_0, mx_worley_noise_vec3_style_1 ] );
|
|
@@ -1648,6 +1361,20 @@ export const mx_unifiednoise2d = /*@__PURE__*/ Fn( ( [
|
|
|
1648
1361
|
|
|
1649
1362
|
return output;
|
|
1650
1363
|
|
|
1364
|
+
}, {
|
|
1365
|
+
noiseType: 'int',
|
|
1366
|
+
texcoord: 'vec2',
|
|
1367
|
+
freq: 'vec2',
|
|
1368
|
+
offset: 'vec2',
|
|
1369
|
+
jitter: 'float',
|
|
1370
|
+
outmin: 'float',
|
|
1371
|
+
outmax: 'float',
|
|
1372
|
+
clampoutput: 'float',
|
|
1373
|
+
octaves: 'int',
|
|
1374
|
+
lacunarity: 'float',
|
|
1375
|
+
diminish: 'float',
|
|
1376
|
+
style: 'int',
|
|
1377
|
+
return: 'float'
|
|
1651
1378
|
} );
|
|
1652
1379
|
|
|
1653
1380
|
// Unified Noise 3D
|
|
@@ -1717,4 +1444,18 @@ export const mx_unifiednoise3d = /*@__PURE__*/ Fn( ( [
|
|
|
1717
1444
|
|
|
1718
1445
|
return output;
|
|
1719
1446
|
|
|
1447
|
+
}, {
|
|
1448
|
+
noiseType: 'int',
|
|
1449
|
+
position: 'vec3',
|
|
1450
|
+
freq: 'vec3',
|
|
1451
|
+
offset: 'vec3',
|
|
1452
|
+
jitter: 'float',
|
|
1453
|
+
outmin: 'float',
|
|
1454
|
+
outmax: 'float',
|
|
1455
|
+
clampoutput: 'float',
|
|
1456
|
+
octaves: 'int',
|
|
1457
|
+
lacunarity: 'float',
|
|
1458
|
+
diminish: 'float',
|
|
1459
|
+
style: 'int',
|
|
1460
|
+
return: 'float'
|
|
1720
1461
|
} );
|