@unikia/upe-renderer 0.0.0-stage → 0.186.110
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/LICENSE +21 -0
- package/LICENSE.types +21 -0
- package/README.md +37 -2
- package/README.three.md +85 -0
- package/UPSTREAM.md +11 -0
- package/build/three.cjs +17 -0
- package/build/three.core.d.ts +1 -0
- package/build/three.core.js +60602 -0
- package/build/three.d.cts +1 -0
- package/build/three.module.d.ts +1 -0
- package/build/three.module.js +19719 -0
- package/build/three.tsl.d.ts +1 -0
- package/build/three.tsl.js +691 -0
- package/build/three.webgpu.d.ts +1 -0
- package/build/three.webgpu.js +93270 -0
- package/build/three.webgpu.nodes.d.ts +1 -0
- package/build/three.webgpu.nodes.js +92988 -0
- package/examples/jsm/Addons.d.ts +300 -0
- package/examples/jsm/Addons.js +301 -0
- package/examples/jsm/animation/AnimationClipCreator.d.ts +12 -0
- package/examples/jsm/animation/AnimationClipCreator.js +168 -0
- package/examples/jsm/animation/CCDIKSolver.d.ts +44 -0
- package/examples/jsm/animation/CCDIKSolver.js +595 -0
- package/examples/jsm/capabilities/WebGL.d.ts +6 -0
- package/examples/jsm/capabilities/WebGL.js +113 -0
- package/examples/jsm/capabilities/WebGPU.d.ts +7 -0
- package/examples/jsm/capabilities/WebGPU.js +59 -0
- package/examples/jsm/controls/ArcballControls.d.ts +208 -0
- package/examples/jsm/controls/ArcballControls.js +3543 -0
- package/examples/jsm/controls/DragControls.d.ts +81 -0
- package/examples/jsm/controls/DragControls.js +452 -0
- package/examples/jsm/controls/FirstPersonControls.d.ts +105 -0
- package/examples/jsm/controls/FirstPersonControls.js +512 -0
- package/examples/jsm/controls/FlyControls.d.ts +44 -0
- package/examples/jsm/controls/FlyControls.js +384 -0
- package/examples/jsm/controls/MapControls.d.ts +21 -0
- package/examples/jsm/controls/MapControls.js +116 -0
- package/examples/jsm/controls/OrbitControls.d.ts +295 -0
- package/examples/jsm/controls/OrbitControls.js +1972 -0
- package/examples/jsm/controls/PointerLockControls.d.ts +84 -0
- package/examples/jsm/controls/PointerLockControls.js +264 -0
- package/examples/jsm/controls/TrackballControls.d.ts +152 -0
- package/examples/jsm/controls/TrackballControls.js +1106 -0
- package/examples/jsm/controls/TransformControls.d.ts +363 -0
- package/examples/jsm/controls/TransformControls.js +2003 -0
- package/examples/jsm/csm/CSM.d.ts +55 -0
- package/examples/jsm/csm/CSM.js +598 -0
- package/examples/jsm/csm/CSMFrustum.d.ts +85 -0
- package/examples/jsm/csm/CSMFrustum.js +234 -0
- package/examples/jsm/csm/CSMHelper.d.ts +28 -0
- package/examples/jsm/csm/CSMHelper.js +243 -0
- package/examples/jsm/csm/CSMShader.d.ts +4 -0
- package/examples/jsm/csm/CSMShader.js +307 -0
- package/examples/jsm/csm/CSMShadowNode.d.ts +44 -0
- package/examples/jsm/csm/CSMShadowNode.js +619 -0
- package/examples/jsm/curves/CurveExtras.d.ts +68 -0
- package/examples/jsm/curves/CurveExtras.js +694 -0
- package/examples/jsm/curves/NURBSCurve.d.ts +28 -0
- package/examples/jsm/curves/NURBSCurve.js +155 -0
- package/examples/jsm/curves/NURBSSurface.d.ts +13 -0
- package/examples/jsm/curves/NURBSSurface.js +98 -0
- package/examples/jsm/curves/NURBSUtils.d.ts +146 -0
- package/examples/jsm/curves/NURBSUtils.js +532 -0
- package/examples/jsm/curves/NURBSVolume.d.ts +23 -0
- package/examples/jsm/curves/NURBSVolume.js +82 -0
- package/examples/jsm/effects/AnaglyphEffect.d.ts +21 -0
- package/examples/jsm/effects/AnaglyphEffect.js +274 -0
- package/examples/jsm/effects/AsciiEffect.d.ts +18 -0
- package/examples/jsm/effects/AsciiEffect.js +323 -0
- package/examples/jsm/effects/OutlineEffect.d.ts +28 -0
- package/examples/jsm/effects/OutlineEffect.js +489 -0
- package/examples/jsm/effects/ParallaxBarrierEffect.d.ts +11 -0
- package/examples/jsm/effects/ParallaxBarrierEffect.js +155 -0
- package/examples/jsm/effects/StereoEffect.d.ts +9 -0
- package/examples/jsm/effects/StereoEffect.js +91 -0
- package/examples/jsm/environments/ColorEnvironment.d.ts +9 -0
- package/examples/jsm/environments/ColorEnvironment.js +59 -0
- package/examples/jsm/environments/DebugEnvironment.d.ts +5 -0
- package/examples/jsm/environments/DebugEnvironment.js +102 -0
- package/examples/jsm/environments/RoomEnvironment.d.ts +6 -0
- package/examples/jsm/environments/RoomEnvironment.js +185 -0
- package/examples/jsm/exporters/DRACOExporter.d.ts +17 -0
- package/examples/jsm/exporters/DRACOExporter.js +332 -0
- package/examples/jsm/exporters/EXRExporter.d.ts +27 -0
- package/examples/jsm/exporters/EXRExporter.js +618 -0
- package/examples/jsm/exporters/GLTFExporter.d.ts +161 -0
- package/examples/jsm/exporters/GLTFExporter.js +3856 -0
- package/examples/jsm/exporters/KTX2Exporter.d.ts +7 -0
- package/examples/jsm/exporters/KTX2Exporter.js +347 -0
- package/examples/jsm/exporters/OBJExporter.d.ts +7 -0
- package/examples/jsm/exporters/OBJExporter.js +308 -0
- package/examples/jsm/exporters/PLYExporter.d.ts +31 -0
- package/examples/jsm/exporters/PLYExporter.js +775 -0
- package/examples/jsm/exporters/STLExporter.d.ts +21 -0
- package/examples/jsm/exporters/STLExporter.js +221 -0
- package/examples/jsm/exporters/USDZExporter.d.ts +30 -0
- package/examples/jsm/exporters/USDZExporter.js +1489 -0
- package/examples/jsm/generators/CityGenerator.d.ts +131 -0
- package/examples/jsm/generators/CityGenerator.js +678 -0
- package/examples/jsm/generators/ForestGenerator.d.ts +73 -0
- package/examples/jsm/generators/ForestGenerator.js +347 -0
- package/examples/jsm/generators/TerrainGenerator.d.ts +57 -0
- package/examples/jsm/generators/TerrainGenerator.js +516 -0
- package/examples/jsm/generators/TreeGenerator.d.ts +102 -0
- package/examples/jsm/generators/TreeGenerator.js +371 -0
- package/examples/jsm/generators/city/BenchGenerator.d.ts +29 -0
- package/examples/jsm/generators/city/BenchGenerator.js +127 -0
- package/examples/jsm/generators/city/CarGenerator.d.ts +43 -0
- package/examples/jsm/generators/city/CarGenerator.js +479 -0
- package/examples/jsm/generators/city/CityGeneratorUtils.js +31 -0
- package/examples/jsm/generators/city/HydrantGenerator.d.ts +27 -0
- package/examples/jsm/generators/city/HydrantGenerator.js +106 -0
- package/examples/jsm/generators/city/InstancedMeshGenerator.d.ts +29 -0
- package/examples/jsm/generators/city/InstancedMeshGenerator.js +86 -0
- package/examples/jsm/generators/city/PersonGenerator.d.ts +44 -0
- package/examples/jsm/generators/city/PersonGenerator.js +447 -0
- package/examples/jsm/generators/city/SidewalkGenerator.d.ts +40 -0
- package/examples/jsm/generators/city/SidewalkGenerator.js +248 -0
- package/examples/jsm/generators/city/SkyscraperGenerator.d.ts +83 -0
- package/examples/jsm/generators/city/SkyscraperGenerator.js +1757 -0
- package/examples/jsm/generators/city/StreetTreeGenerator.d.ts +30 -0
- package/examples/jsm/generators/city/StreetTreeGenerator.js +231 -0
- package/examples/jsm/generators/city/StreetlightGenerator.d.ts +28 -0
- package/examples/jsm/generators/city/StreetlightGenerator.js +100 -0
- package/examples/jsm/generators/city/TrafficlightGenerator.d.ts +29 -0
- package/examples/jsm/generators/city/TrafficlightGenerator.js +106 -0
- package/examples/jsm/generators/city/TrashcanGenerator.d.ts +24 -0
- package/examples/jsm/generators/city/TrashcanGenerator.js +100 -0
- package/examples/jsm/geometries/BoxLineGeometry.d.ts +12 -0
- package/examples/jsm/geometries/BoxLineGeometry.js +92 -0
- package/examples/jsm/geometries/ConvexGeometry.d.ts +5 -0
- package/examples/jsm/geometries/ConvexGeometry.js +72 -0
- package/examples/jsm/geometries/DecalGeometry.d.ts +16 -0
- package/examples/jsm/geometries/DecalGeometry.js +420 -0
- package/examples/jsm/geometries/LoftGeometry.d.ts +83 -0
- package/examples/jsm/geometries/LoftGeometry.js +355 -0
- package/examples/jsm/geometries/ParametricFunctions.d.ts +8 -0
- package/examples/jsm/geometries/ParametricFunctions.js +100 -0
- package/examples/jsm/geometries/ParametricGeometry.d.ts +18 -0
- package/examples/jsm/geometries/ParametricGeometry.js +172 -0
- package/examples/jsm/geometries/RoundedBoxGeometry.d.ts +5 -0
- package/examples/jsm/geometries/RoundedBoxGeometry.js +216 -0
- package/examples/jsm/geometries/TeapotGeometry.d.ts +37 -0
- package/examples/jsm/geometries/TeapotGeometry.js +689 -0
- package/examples/jsm/geometries/TextGeometry.d.ts +89 -0
- package/examples/jsm/geometries/TextGeometry.js +102 -0
- package/examples/jsm/gpgpu/BitonicSort.d.ts +21 -0
- package/examples/jsm/gpgpu/BitonicSort.js +715 -0
- package/examples/jsm/gpgpu/CountingSort.d.ts +31 -0
- package/examples/jsm/gpgpu/CountingSort.js +271 -0
- package/examples/jsm/helpers/AnimationPathHelper.d.ts +38 -0
- package/examples/jsm/helpers/AnimationPathHelper.js +302 -0
- package/examples/jsm/helpers/LightProbeGridHelper.d.ts +12 -0
- package/examples/jsm/helpers/LightProbeGridHelper.js +166 -0
- package/examples/jsm/helpers/LightProbeGridHelperWebGL.d.ts +12 -0
- package/examples/jsm/helpers/LightProbeGridHelperWebGL.js +221 -0
- package/examples/jsm/helpers/LightProbeHelper.d.ts +12 -0
- package/examples/jsm/helpers/LightProbeHelper.js +166 -0
- package/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
- package/examples/jsm/helpers/LightProbeHelperGPU.js +102 -0
- package/examples/jsm/helpers/OctreeHelper.d.ts +17 -0
- package/examples/jsm/helpers/OctreeHelper.js +109 -0
- package/examples/jsm/helpers/PositionalAudioHelper.d.ts +13 -0
- package/examples/jsm/helpers/PositionalAudioHelper.js +169 -0
- package/examples/jsm/helpers/RapierHelper.d.ts +13 -0
- package/examples/jsm/helpers/RapierHelper.js +59 -0
- package/examples/jsm/helpers/RectAreaLightHelper.d.ts +10 -0
- package/examples/jsm/helpers/RectAreaLightHelper.js +118 -0
- package/examples/jsm/helpers/TextureHelper.d.ts +10 -0
- package/examples/jsm/helpers/TextureHelper.js +265 -0
- package/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
- package/examples/jsm/helpers/TextureHelperGPU.js +214 -0
- package/examples/jsm/helpers/VertexNormalsHelper.d.ts +14 -0
- package/examples/jsm/helpers/VertexNormalsHelper.js +155 -0
- package/examples/jsm/helpers/VertexTangentsHelper.d.ts +12 -0
- package/examples/jsm/helpers/VertexTangentsHelper.js +133 -0
- package/examples/jsm/helpers/ViewHelper.d.ts +20 -0
- package/examples/jsm/helpers/ViewHelper.js +529 -0
- package/examples/jsm/inspector/Extension.d.ts +22 -0
- package/examples/jsm/inspector/Extension.js +107 -0
- package/examples/jsm/inspector/Inspector.d.ts +54 -0
- package/examples/jsm/inspector/Inspector.js +684 -0
- package/examples/jsm/inspector/RendererInspector.d.ts +9 -0
- package/examples/jsm/inspector/RendererInspector.js +589 -0
- package/examples/jsm/inspector/extensions/color-grading/ColorGrading.d.ts +34 -0
- package/examples/jsm/inspector/extensions/color-grading/ColorGrading.js +2609 -0
- package/examples/jsm/inspector/extensions/color-grading/ColorWheel.js +352 -0
- package/examples/jsm/inspector/extensions/color-grading/CurveEditor.js +599 -0
- package/examples/jsm/inspector/extensions/color-grading/LUT3DStyle.js +1201 -0
- package/examples/jsm/inspector/extensions/color-grading/LUTMath.js +788 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/BrightnessModule.js +72 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ColorWheelModule.js +112 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ContrastModule.js +82 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/CurvesModule.js +109 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ExposureHueModule.js +110 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ExposureModule.js +73 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/HueModule.js +78 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ImportedCubeModule.js +89 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/Module.js +285 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/OutputModule.js +101 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/RendererModule.js +225 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/SatVibranceModule.js +102 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/SaturationModule.js +76 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/VibranceModule.js +76 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/WhiteBalanceModule.js +86 -0
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts +20 -0
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.js +911 -0
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts +11 -0
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.js +282 -0
- package/examples/jsm/inspector/tabs/Console.js +420 -0
- package/examples/jsm/inspector/tabs/Memory.js +134 -0
- package/examples/jsm/inspector/tabs/Parameters.d.ts +122 -0
- package/examples/jsm/inspector/tabs/Parameters.js +440 -0
- package/examples/jsm/inspector/tabs/Performance.js +283 -0
- package/examples/jsm/inspector/tabs/Settings.js +310 -0
- package/examples/jsm/inspector/tabs/Timeline.js +1748 -0
- package/examples/jsm/inspector/tabs/Viewer.js +1374 -0
- package/examples/jsm/inspector/ui/Graph.js +232 -0
- package/examples/jsm/inspector/ui/Item.d.ts +5 -0
- package/examples/jsm/inspector/ui/Item.js +249 -0
- package/examples/jsm/inspector/ui/List.js +81 -0
- package/examples/jsm/inspector/ui/Profiler.js +2273 -0
- package/examples/jsm/inspector/ui/Style.js +2300 -0
- package/examples/jsm/inspector/ui/Tab.d.ts +9 -0
- package/examples/jsm/inspector/ui/Tab.js +269 -0
- package/examples/jsm/inspector/ui/Values.d.ts +103 -0
- package/examples/jsm/inspector/ui/Values.js +553 -0
- package/examples/jsm/inspector/ui/utils.js +189 -0
- package/examples/jsm/interaction/InteractionManager.d.ts +18 -0
- package/examples/jsm/interaction/InteractionManager.js +226 -0
- package/examples/jsm/interactive/HTMLMesh.d.ts +13 -0
- package/examples/jsm/interactive/HTMLMesh.js +617 -0
- package/examples/jsm/interactive/InteractiveGroup.d.ts +28 -0
- package/examples/jsm/interactive/InteractiveGroup.js +224 -0
- package/examples/jsm/interactive/SelectionBox.d.ts +16 -0
- package/examples/jsm/interactive/SelectionBox.js +324 -0
- package/examples/jsm/interactive/SelectionHelper.d.ts +17 -0
- package/examples/jsm/interactive/SelectionHelper.js +150 -0
- package/examples/jsm/libs/basis/README.md +45 -0
- package/examples/jsm/libs/basis/basis_transcoder.js +19 -0
- package/examples/jsm/libs/basis/basis_transcoder.wasm +0 -0
- package/examples/jsm/libs/chevrotain.module.min.js +141 -0
- package/examples/jsm/libs/demuxer_mp4.js +109 -0
- package/examples/jsm/libs/draco/README.md +31 -0
- package/examples/jsm/libs/draco/draco_decoder.js +34 -0
- package/examples/jsm/libs/draco/draco_decoder.wasm +0 -0
- package/examples/jsm/libs/draco/draco_wasm_wrapper.js +117 -0
- package/examples/jsm/libs/draco/gltf/draco_decoder.js +33 -0
- package/examples/jsm/libs/draco/gltf/draco_decoder.wasm +0 -0
- package/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.js +116 -0
- package/examples/jsm/libs/fflate.module.d.ts +1 -0
- package/examples/jsm/libs/fflate.module.js +2672 -0
- package/examples/jsm/libs/ktx-parse.module.js +1 -0
- package/examples/jsm/libs/lil-gui.module.min.d.ts +608 -0
- package/examples/jsm/libs/lil-gui.module.min.js +8 -0
- package/examples/jsm/libs/meshopt_clusterizer.module.js +421 -0
- package/examples/jsm/libs/meshopt_decoder.module.d.ts +1 -0
- package/examples/jsm/libs/meshopt_decoder.module.js +196 -0
- package/examples/jsm/libs/meshopt_simplifier.module.js +627 -0
- package/examples/jsm/libs/mikktspace.module.d.ts +19 -0
- package/examples/jsm/libs/mikktspace.module.js +153 -0
- package/examples/jsm/libs/motion-controllers.module.js +397 -0
- package/examples/jsm/libs/potpack.module.js +125 -0
- package/examples/jsm/libs/stats.module.d.ts +3 -0
- package/examples/jsm/libs/stats.module.js +167 -0
- package/examples/jsm/libs/surfaceNet.js +201 -0
- package/examples/jsm/libs/tween.module.d.ts +2 -0
- package/examples/jsm/libs/tween.module.js +876 -0
- package/examples/jsm/libs/utif.module.js +1665 -0
- package/examples/jsm/libs/zstddec.module.d.ts +5 -0
- package/examples/jsm/libs/zstddec.module.js +1 -0
- package/examples/jsm/lighting/ClusteredLighting.d.ts +45 -0
- package/examples/jsm/lighting/ClusteredLighting.js +55 -0
- package/examples/jsm/lighting/DynamicLighting.d.ts +16 -0
- package/examples/jsm/lighting/DynamicLighting.js +82 -0
- package/examples/jsm/lighting/LightProbeGrid.d.ts +177 -0
- package/examples/jsm/lighting/LightProbeGrid.js +820 -0
- package/examples/jsm/lighting/LightProbeGridUtils.js +107 -0
- package/examples/jsm/lighting/LightProbeGridWebGL.d.ts +178 -0
- package/examples/jsm/lighting/LightProbeGridWebGL.js +830 -0
- package/examples/jsm/lighting/vxgi/VXGIConeTracer.js +194 -0
- package/examples/jsm/lighting/vxgi/VXGINode.d.ts +100 -0
- package/examples/jsm/lighting/vxgi/VXGINode.js +660 -0
- package/examples/jsm/lighting/vxgi/VXGISceneCollector.js +478 -0
- package/examples/jsm/lighting/vxgi/VXGIVolume.d.ts +245 -0
- package/examples/jsm/lighting/vxgi/VXGIVolume.js +1430 -0
- package/examples/jsm/lights/LightProbeGenerator.d.ts +16 -0
- package/examples/jsm/lights/LightProbeGenerator.js +337 -0
- package/examples/jsm/lights/RectAreaLightTexturesLib.d.ts +7 -0
- package/examples/jsm/lights/RectAreaLightTexturesLib.js +127 -0
- package/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +5 -0
- package/examples/jsm/lights/RectAreaLightUniformsLib.js +40 -0
- package/examples/jsm/lights/SunLight.d.ts +53 -0
- package/examples/jsm/lights/SunLight.js +95 -0
- package/examples/jsm/lights/SunLightNode.d.ts +25 -0
- package/examples/jsm/lights/SunLightNode.js +56 -0
- package/examples/jsm/lights/SunLightShadow.d.ts +57 -0
- package/examples/jsm/lights/SunLightShadow.js +319 -0
- package/examples/jsm/lights/SunShadowNode.d.ts +53 -0
- package/examples/jsm/lights/SunShadowNode.js +312 -0
- package/examples/jsm/lines/Line2.d.ts +25 -0
- package/examples/jsm/lines/Line2.js +56 -0
- package/examples/jsm/lines/LineGeometry.d.ts +27 -0
- package/examples/jsm/lines/LineGeometry.js +157 -0
- package/examples/jsm/lines/LineMaterial.d.ts +82 -0
- package/examples/jsm/lines/LineMaterial.js +726 -0
- package/examples/jsm/lines/LineSegments2.d.ts +39 -0
- package/examples/jsm/lines/LineSegments2.js +434 -0
- package/examples/jsm/lines/LineSegmentsGeometry.d.ts +53 -0
- package/examples/jsm/lines/LineSegmentsGeometry.js +298 -0
- package/examples/jsm/lines/Wireframe.d.ts +14 -0
- package/examples/jsm/lines/Wireframe.js +108 -0
- package/examples/jsm/lines/WireframeGeometry2.d.ts +8 -0
- package/examples/jsm/lines/WireframeGeometry2.js +49 -0
- package/examples/jsm/lines/webgpu/Line2.d.ts +14 -0
- package/examples/jsm/lines/webgpu/Line2.js +46 -0
- package/examples/jsm/lines/webgpu/LineSegments2.d.ts +15 -0
- package/examples/jsm/lines/webgpu/LineSegments2.js +419 -0
- package/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
- package/examples/jsm/lines/webgpu/Wireframe.js +86 -0
- package/examples/jsm/loaders/3DMLoader.d.ts +12 -0
- package/examples/jsm/loaders/3DMLoader.js +1937 -0
- package/examples/jsm/loaders/3MFLoader.d.ts +9 -0
- package/examples/jsm/loaders/3MFLoader.js +1822 -0
- package/examples/jsm/loaders/AMFLoader.d.ts +7 -0
- package/examples/jsm/loaders/AMFLoader.js +541 -0
- package/examples/jsm/loaders/BVHLoader.d.ts +14 -0
- package/examples/jsm/loaders/BVHLoader.js +484 -0
- package/examples/jsm/loaders/ColladaLoader.d.ts +35 -0
- package/examples/jsm/loaders/ColladaLoader.js +153 -0
- package/examples/jsm/loaders/DDSLoader.d.ts +22 -0
- package/examples/jsm/loaders/DDSLoader.js +385 -0
- package/examples/jsm/loaders/DRACOLoader.d.ts +39 -0
- package/examples/jsm/loaders/DRACOLoader.js +772 -0
- package/examples/jsm/loaders/EXRLoader.d.ts +24 -0
- package/examples/jsm/loaders/EXRLoader.js +3395 -0
- package/examples/jsm/loaders/FBXLoader.d.ts +8 -0
- package/examples/jsm/loaders/FBXLoader.js +4656 -0
- package/examples/jsm/loaders/FontLoader.d.ts +41 -0
- package/examples/jsm/loaders/FontLoader.js +260 -0
- package/examples/jsm/loaders/GCodeLoader.d.ts +8 -0
- package/examples/jsm/loaders/GCodeLoader.js +318 -0
- package/examples/jsm/loaders/GLTFGaussianSplatLoaderExtension.d.ts +14 -0
- package/examples/jsm/loaders/GLTFGaussianSplatLoaderExtension.js +330 -0
- package/examples/jsm/loaders/GLTFLoader.d.ts +153 -0
- package/examples/jsm/loaders/GLTFLoader.js +4925 -0
- package/examples/jsm/loaders/GaussianSplatPLYLoader.d.ts +9 -0
- package/examples/jsm/loaders/GaussianSplatPLYLoader.js +386 -0
- package/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +18 -0
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +164 -0
- package/examples/jsm/loaders/HDRLoader.d.ts +12 -0
- package/examples/jsm/loaders/HDRLoader.js +463 -0
- package/examples/jsm/loaders/IESLoader.d.ts +5 -0
- package/examples/jsm/loaders/IESLoader.js +379 -0
- package/examples/jsm/loaders/KMZLoader.d.ts +9 -0
- package/examples/jsm/loaders/KMZLoader.js +163 -0
- package/examples/jsm/loaders/KSPLATLoader.d.ts +9 -0
- package/examples/jsm/loaders/KSPLATLoader.js +463 -0
- package/examples/jsm/loaders/KTX2Loader.d.ts +58 -0
- package/examples/jsm/loaders/KTX2Loader.js +1276 -0
- package/examples/jsm/loaders/KTXLoader.d.ts +22 -0
- package/examples/jsm/loaders/KTXLoader.js +197 -0
- package/examples/jsm/loaders/LDrawLoader.d.ts +38 -0
- package/examples/jsm/loaders/LDrawLoader.js +2510 -0
- package/examples/jsm/loaders/LUT3dlLoader.d.ts +39 -0
- package/examples/jsm/loaders/LUT3dlLoader.js +205 -0
- package/examples/jsm/loaders/LUTCubeLoader.d.ts +42 -0
- package/examples/jsm/loaders/LUTCubeLoader.js +190 -0
- package/examples/jsm/loaders/LUTImageLoader.d.ts +18 -0
- package/examples/jsm/loaders/LUTImageLoader.js +190 -0
- package/examples/jsm/loaders/LWOLoader.d.ts +25 -0
- package/examples/jsm/loaders/LWOLoader.js +1051 -0
- package/examples/jsm/loaders/MD2Loader.d.ts +7 -0
- package/examples/jsm/loaders/MD2Loader.js +435 -0
- package/examples/jsm/loaders/MDDLoader.d.ts +12 -0
- package/examples/jsm/loaders/MDDLoader.js +147 -0
- package/examples/jsm/loaders/MTLLoader.d.ts +95 -0
- package/examples/jsm/loaders/MTLLoader.js +593 -0
- package/examples/jsm/loaders/MaterialXLoader.d.ts +70 -0
- package/examples/jsm/loaders/MaterialXLoader.js +227 -0
- package/examples/jsm/loaders/NRRDLoader.d.ts +15 -0
- package/examples/jsm/loaders/NRRDLoader.js +718 -0
- package/examples/jsm/loaders/OBJLoader.d.ts +10 -0
- package/examples/jsm/loaders/OBJLoader.js +955 -0
- package/examples/jsm/loaders/PCDLoader.d.ts +8 -0
- package/examples/jsm/loaders/PCDLoader.js +620 -0
- package/examples/jsm/loaders/PDBLoader.d.ts +15 -0
- package/examples/jsm/loaders/PDBLoader.js +272 -0
- package/examples/jsm/loaders/PLYLoader.d.ts +11 -0
- package/examples/jsm/loaders/PLYLoader.js +968 -0
- package/examples/jsm/loaders/PVRLoader.d.ts +16 -0
- package/examples/jsm/loaders/PVRLoader.js +270 -0
- package/examples/jsm/loaders/RGBELoader.d.ts +7 -0
- package/examples/jsm/loaders/RGBELoader.js +18 -0
- package/examples/jsm/loaders/SPLATLoader.d.ts +9 -0
- package/examples/jsm/loaders/SPLATLoader.js +139 -0
- package/examples/jsm/loaders/SPZLoader.d.ts +18 -0
- package/examples/jsm/loaders/SPZLoader.js +561 -0
- package/examples/jsm/loaders/STLLoader.d.ts +7 -0
- package/examples/jsm/loaders/STLLoader.js +421 -0
- package/examples/jsm/loaders/SVGLoader.d.ts +67 -0
- package/examples/jsm/loaders/SVGLoader.js +3319 -0
- package/examples/jsm/loaders/TDSLoader.d.ts +35 -0
- package/examples/jsm/loaders/TDSLoader.js +1142 -0
- package/examples/jsm/loaders/TGALoader.d.ts +7 -0
- package/examples/jsm/loaders/TGALoader.js +538 -0
- package/examples/jsm/loaders/TIFFLoader.d.ts +7 -0
- package/examples/jsm/loaders/TIFFLoader.js +59 -0
- package/examples/jsm/loaders/TTFLoader.d.ts +10 -0
- package/examples/jsm/loaders/TTFLoader.js +261 -0
- package/examples/jsm/loaders/USDLoader.d.ts +14 -0
- package/examples/jsm/loaders/USDLoader.js +303 -0
- package/examples/jsm/loaders/USDZLoader.d.ts +14 -0
- package/examples/jsm/loaders/USDZLoader.js +16 -0
- package/examples/jsm/loaders/UltraHDRLoader.d.ts +28 -0
- package/examples/jsm/loaders/UltraHDRLoader.js +755 -0
- package/examples/jsm/loaders/VOXLoader.d.ts +38 -0
- package/examples/jsm/loaders/VOXLoader.js +919 -0
- package/examples/jsm/loaders/VRMLLoader.d.ts +7 -0
- package/examples/jsm/loaders/VRMLLoader.js +3646 -0
- package/examples/jsm/loaders/VTKLoader.d.ts +13 -0
- package/examples/jsm/loaders/VTKLoader.js +1293 -0
- package/examples/jsm/loaders/XYZLoader.d.ts +7 -0
- package/examples/jsm/loaders/XYZLoader.js +143 -0
- package/examples/jsm/loaders/collada/ColladaComposer.js +3044 -0
- package/examples/jsm/loaders/collada/ColladaParser.js +1977 -0
- package/examples/jsm/loaders/lwo/IFFParser.js +1217 -0
- package/examples/jsm/loaders/lwo/LWO2Parser.js +414 -0
- package/examples/jsm/loaders/lwo/LWO3Parser.js +373 -0
- package/examples/jsm/loaders/materialx/MaterialXArchive.js +108 -0
- package/examples/jsm/loaders/materialx/MaterialXDocument.js +878 -0
- package/examples/jsm/loaders/materialx/MaterialXHextile.d.ts +24 -0
- package/examples/jsm/loaders/materialx/MaterialXHextile.js +183 -0
- package/examples/jsm/loaders/materialx/MaterialXInterfaceValidation.d.ts +8 -0
- package/examples/jsm/loaders/materialx/MaterialXInterfaceValidation.js +376 -0
- package/examples/jsm/loaders/materialx/MaterialXLog.d.ts +33 -0
- package/examples/jsm/loaders/materialx/MaterialXLog.js +75 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeInterfaceRegistry.js +4 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeLibrary.js +1021 -0
- package/examples/jsm/loaders/materialx/MaterialXSurfaceMappings.js +661 -0
- package/examples/jsm/loaders/materialx/MaterialXUtils.js +57 -0
- package/examples/jsm/loaders/materialx/compile/MaterialXCompileRegistry.js +997 -0
- package/examples/jsm/loaders/materialx/parse/MaterialXParser.js +28 -0
- package/examples/jsm/loaders/usd/USDAParser.js +914 -0
- package/examples/jsm/loaders/usd/USDCParser.js +1875 -0
- package/examples/jsm/loaders/usd/USDComposer.js +4665 -0
- package/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
- package/examples/jsm/materials/LDrawConditionalLineMaterial.js +183 -0
- package/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
- package/examples/jsm/materials/LDrawConditionalLineNodeMaterial.js +154 -0
- package/examples/jsm/materials/WoodNodeMaterial.d.ts +75 -0
- package/examples/jsm/materials/WoodNodeMaterial.js +431 -0
- package/examples/jsm/math/Capsule.d.ts +26 -0
- package/examples/jsm/math/Capsule.js +159 -0
- package/examples/jsm/math/ColorConverter.d.ts +19 -0
- package/examples/jsm/math/ColorConverter.js +58 -0
- package/examples/jsm/math/ColorSpaces.d.ts +15 -0
- package/examples/jsm/math/ColorSpaces.js +147 -0
- package/examples/jsm/math/ConvexHull.d.ts +89 -0
- package/examples/jsm/math/ConvexHull.js +1695 -0
- package/examples/jsm/math/ImprovedNoise.d.ts +4 -0
- package/examples/jsm/math/ImprovedNoise.js +88 -0
- package/examples/jsm/math/Lut.d.ts +27 -0
- package/examples/jsm/math/Lut.js +317 -0
- package/examples/jsm/math/MeshSurfaceSampler.d.ts +21 -0
- package/examples/jsm/math/MeshSurfaceSampler.js +315 -0
- package/examples/jsm/math/OBB.d.ts +24 -0
- package/examples/jsm/math/OBB.js +535 -0
- package/examples/jsm/math/Octree.d.ts +54 -0
- package/examples/jsm/math/Octree.js +822 -0
- package/examples/jsm/math/SimplexNoise.d.ts +9 -0
- package/examples/jsm/math/SimplexNoise.js +470 -0
- package/examples/jsm/misc/ConvexObjectBreaker.d.ts +25 -0
- package/examples/jsm/misc/ConvexObjectBreaker.js +539 -0
- package/examples/jsm/misc/GPUComputationRenderer.d.ts +55 -0
- package/examples/jsm/misc/GPUComputationRenderer.js +508 -0
- package/examples/jsm/misc/Gyroscope.d.ts +5 -0
- package/examples/jsm/misc/Gyroscope.js +78 -0
- package/examples/jsm/misc/MD2Character.d.ts +33 -0
- package/examples/jsm/misc/MD2Character.js +391 -0
- package/examples/jsm/misc/MD2CharacterComplex.d.ts +55 -0
- package/examples/jsm/misc/MD2CharacterComplex.js +740 -0
- package/examples/jsm/misc/MorphAnimMesh.d.ts +13 -0
- package/examples/jsm/misc/MorphAnimMesh.js +119 -0
- package/examples/jsm/misc/MorphBlendMesh.d.ts +21 -0
- package/examples/jsm/misc/MorphBlendMesh.js +425 -0
- package/examples/jsm/misc/ProgressiveLightMap.d.ts +58 -0
- package/examples/jsm/misc/ProgressiveLightMap.js +370 -0
- package/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
- package/examples/jsm/misc/ProgressiveLightMapGPU.js +322 -0
- package/examples/jsm/misc/RollerCoaster.d.ts +26 -0
- package/examples/jsm/misc/RollerCoaster.js +661 -0
- package/examples/jsm/misc/SculptGL.LICENSE.txt +21 -0
- package/examples/jsm/misc/Sculptor.d.ts +259 -0
- package/examples/jsm/misc/Sculptor.js +1679 -0
- package/examples/jsm/misc/SculptorMesh.js +1504 -0
- package/examples/jsm/misc/SculptorTools.js +1180 -0
- package/examples/jsm/misc/SculptorUtils.js +345 -0
- package/examples/jsm/misc/TileCreasedNormalsPlugin.d.ts +49 -0
- package/examples/jsm/misc/TileCreasedNormalsPlugin.js +270 -0
- package/examples/jsm/misc/TubePainter.d.ts +10 -0
- package/examples/jsm/misc/TubePainter.js +611 -0
- package/examples/jsm/misc/Volume.d.ts +37 -0
- package/examples/jsm/misc/Volume.js +520 -0
- package/examples/jsm/misc/VolumeSlice.d.ts +28 -0
- package/examples/jsm/misc/VolumeSlice.js +275 -0
- package/examples/jsm/modifiers/CurveModifier.d.ts +41 -0
- package/examples/jsm/modifiers/CurveModifier.js +374 -0
- package/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
- package/examples/jsm/modifiers/CurveModifierGPU.js +256 -0
- package/examples/jsm/modifiers/EdgeSplitModifier.d.ts +26 -0
- package/examples/jsm/modifiers/EdgeSplitModifier.js +299 -0
- package/examples/jsm/modifiers/SimplifyModifier.d.ts +6 -0
- package/examples/jsm/modifiers/SimplifyModifier.js +139 -0
- package/examples/jsm/modifiers/TessellateModifier.d.ts +9 -0
- package/examples/jsm/modifiers/TessellateModifier.js +340 -0
- package/examples/jsm/objects/GaussianSplat.d.ts +35 -0
- package/examples/jsm/objects/GaussianSplat.js +1039 -0
- package/examples/jsm/objects/GroundedSkybox.d.ts +5 -0
- package/examples/jsm/objects/GroundedSkybox.js +69 -0
- package/examples/jsm/objects/Lensflare.d.ts +21 -0
- package/examples/jsm/objects/Lensflare.js +489 -0
- package/examples/jsm/objects/LensflareMesh.d.ts +21 -0
- package/examples/jsm/objects/LensflareMesh.js +376 -0
- package/examples/jsm/objects/MarchingCubes.d.ts +76 -0
- package/examples/jsm/objects/MarchingCubes.js +1261 -0
- package/examples/jsm/objects/Reflector.d.ts +54 -0
- package/examples/jsm/objects/Reflector.js +385 -0
- package/examples/jsm/objects/ReflectorForSSRPass.d.ts +62 -0
- package/examples/jsm/objects/ReflectorForSSRPass.js +393 -0
- package/examples/jsm/objects/Refractor.d.ts +21 -0
- package/examples/jsm/objects/Refractor.js +389 -0
- package/examples/jsm/objects/ShadowMesh.d.ts +10 -0
- package/examples/jsm/objects/ShadowMesh.js +130 -0
- package/examples/jsm/objects/Sky.d.ts +28 -0
- package/examples/jsm/objects/Sky.js +342 -0
- package/examples/jsm/objects/SkyMesh.d.ts +26 -0
- package/examples/jsm/objects/SkyMesh.js +396 -0
- package/examples/jsm/objects/Water.d.ts +22 -0
- package/examples/jsm/objects/Water.js +374 -0
- package/examples/jsm/objects/Water2.d.ts +21 -0
- package/examples/jsm/objects/Water2.js +403 -0
- package/examples/jsm/objects/Water2Mesh.d.ts +53 -0
- package/examples/jsm/objects/Water2Mesh.js +199 -0
- package/examples/jsm/objects/WaterMesh.d.ts +40 -0
- package/examples/jsm/objects/WaterMesh.js +194 -0
- package/examples/jsm/offscreen/jank.js +45 -0
- package/examples/jsm/offscreen/offscreen.js +8 -0
- package/examples/jsm/offscreen/scene.js +86 -0
- package/examples/jsm/physics/AmmoPhysics.d.ts +9 -0
- package/examples/jsm/physics/AmmoPhysics.js +366 -0
- package/examples/jsm/physics/JoltPhysics.d.ts +10 -0
- package/examples/jsm/physics/JoltPhysics.js +334 -0
- package/examples/jsm/physics/RapierPhysics.d.ts +26 -0
- package/examples/jsm/physics/RapierPhysics.js +461 -0
- package/examples/jsm/postprocessing/AfterimagePass.d.ts +17 -0
- package/examples/jsm/postprocessing/AfterimagePass.js +187 -0
- package/examples/jsm/postprocessing/BloomPass.d.ts +14 -0
- package/examples/jsm/postprocessing/BloomPass.js +274 -0
- package/examples/jsm/postprocessing/BokehPass.d.ts +23 -0
- package/examples/jsm/postprocessing/BokehPass.js +218 -0
- package/examples/jsm/postprocessing/ClearPass.d.ts +9 -0
- package/examples/jsm/postprocessing/ClearPass.js +97 -0
- package/examples/jsm/postprocessing/CubeTexturePass.d.ts +14 -0
- package/examples/jsm/postprocessing/CubeTexturePass.js +146 -0
- package/examples/jsm/postprocessing/DotScreenPass.d.ts +10 -0
- package/examples/jsm/postprocessing/DotScreenPass.js +114 -0
- package/examples/jsm/postprocessing/EffectComposer.d.ts +30 -0
- package/examples/jsm/postprocessing/EffectComposer.js +365 -0
- package/examples/jsm/postprocessing/FXAAPass.d.ts +7 -0
- package/examples/jsm/postprocessing/FXAAPass.js +40 -0
- package/examples/jsm/postprocessing/FilmPass.d.ts +10 -0
- package/examples/jsm/postprocessing/FilmPass.js +113 -0
- package/examples/jsm/postprocessing/GTAOPass.d.ts +121 -0
- package/examples/jsm/postprocessing/GTAOPass.js +727 -0
- package/examples/jsm/postprocessing/GlitchPass.d.ts +16 -0
- package/examples/jsm/postprocessing/GlitchPass.js +177 -0
- package/examples/jsm/postprocessing/HalftonePass.d.ts +37 -0
- package/examples/jsm/postprocessing/HalftonePass.js +134 -0
- package/examples/jsm/postprocessing/LUTPass.d.ts +13 -0
- package/examples/jsm/postprocessing/LUTPass.js +138 -0
- package/examples/jsm/postprocessing/MaskPass.d.ts +14 -0
- package/examples/jsm/postprocessing/MaskPass.js +195 -0
- package/examples/jsm/postprocessing/OutlinePass.d.ts +64 -0
- package/examples/jsm/postprocessing/OutlinePass.js +776 -0
- package/examples/jsm/postprocessing/OutputPass.d.ts +14 -0
- package/examples/jsm/postprocessing/OutputPass.js +148 -0
- package/examples/jsm/postprocessing/Pass.d.ts +31 -0
- package/examples/jsm/postprocessing/Pass.js +191 -0
- package/examples/jsm/postprocessing/RenderPass.d.ts +28 -0
- package/examples/jsm/postprocessing/RenderPass.js +193 -0
- package/examples/jsm/postprocessing/RenderPixelatedPass.d.ts +30 -0
- package/examples/jsm/postprocessing/RenderPixelatedPass.js +314 -0
- package/examples/jsm/postprocessing/RenderTransitionPass.d.ts +33 -0
- package/examples/jsm/postprocessing/RenderTransitionPass.js +267 -0
- package/examples/jsm/postprocessing/SAOPass.d.ts +70 -0
- package/examples/jsm/postprocessing/SAOPass.js +407 -0
- package/examples/jsm/postprocessing/SMAAPass.d.ts +21 -0
- package/examples/jsm/postprocessing/SMAAPass.js +230 -0
- package/examples/jsm/postprocessing/SSAARenderPass.d.ts +26 -0
- package/examples/jsm/postprocessing/SSAARenderPass.js +313 -0
- package/examples/jsm/postprocessing/SSAOPass.d.ts +68 -0
- package/examples/jsm/postprocessing/SSAOPass.js +527 -0
- package/examples/jsm/postprocessing/SSRPass.d.ts +99 -0
- package/examples/jsm/postprocessing/SSRPass.js +858 -0
- package/examples/jsm/postprocessing/SavePass.d.ts +12 -0
- package/examples/jsm/postprocessing/SavePass.js +132 -0
- package/examples/jsm/postprocessing/ShaderPass.d.ts +11 -0
- package/examples/jsm/postprocessing/ShaderPass.js +135 -0
- package/examples/jsm/postprocessing/TAARenderPass.d.ts +8 -0
- package/examples/jsm/postprocessing/TAARenderPass.js +243 -0
- package/examples/jsm/postprocessing/TexturePass.d.ts +12 -0
- package/examples/jsm/postprocessing/TexturePass.js +131 -0
- package/examples/jsm/postprocessing/UnrealBloomPass.d.ts +26 -0
- package/examples/jsm/postprocessing/UnrealBloomPass.js +541 -0
- package/examples/jsm/renderers/CSS2DRenderer.d.ts +29 -0
- package/examples/jsm/renderers/CSS2DRenderer.js +352 -0
- package/examples/jsm/renderers/CSS3DRenderer.d.ts +26 -0
- package/examples/jsm/renderers/CSS3DRenderer.js +454 -0
- package/examples/jsm/renderers/Projector.d.ts +60 -0
- package/examples/jsm/renderers/Projector.js +1154 -0
- package/examples/jsm/renderers/SVGRenderer.d.ts +26 -0
- package/examples/jsm/renderers/SVGRenderer.js +799 -0
- package/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +11 -0
- package/examples/jsm/shaders/ACESFilmicToneMappingShader.js +96 -0
- package/examples/jsm/shaders/AfterimageShader.d.ts +12 -0
- package/examples/jsm/shaders/AfterimageShader.js +63 -0
- package/examples/jsm/shaders/BasicShader.d.ts +6 -0
- package/examples/jsm/shaders/BasicShader.js +36 -0
- package/examples/jsm/shaders/BleachBypassShader.d.ts +10 -0
- package/examples/jsm/shaders/BleachBypassShader.js +68 -0
- package/examples/jsm/shaders/BlendShader.d.ts +13 -0
- package/examples/jsm/shaders/BlendShader.js +56 -0
- package/examples/jsm/shaders/BokehShader.d.ts +21 -0
- package/examples/jsm/shaders/BokehShader.js +151 -0
- package/examples/jsm/shaders/BokehShader2.d.ts +44 -0
- package/examples/jsm/shaders/BokehShader2.js +404 -0
- package/examples/jsm/shaders/BrightnessContrastShader.d.ts +12 -0
- package/examples/jsm/shaders/BrightnessContrastShader.js +62 -0
- package/examples/jsm/shaders/ColorCorrectionShader.d.ts +13 -0
- package/examples/jsm/shaders/ColorCorrectionShader.js +59 -0
- package/examples/jsm/shaders/ColorifyShader.d.ts +10 -0
- package/examples/jsm/shaders/ColorifyShader.js +57 -0
- package/examples/jsm/shaders/ConvolutionShader.d.ts +17 -0
- package/examples/jsm/shaders/ConvolutionShader.js +74 -0
- package/examples/jsm/shaders/CopyShader.d.ts +10 -0
- package/examples/jsm/shaders/CopyShader.js +52 -0
- package/examples/jsm/shaders/DOFMipMapShader.d.ts +13 -0
- package/examples/jsm/shaders/DOFMipMapShader.js +63 -0
- package/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +28 -0
- package/examples/jsm/shaders/DepthLimitedBlurShader.js +183 -0
- package/examples/jsm/shaders/DigitalGlitch.d.ts +19 -0
- package/examples/jsm/shaders/DigitalGlitch.js +104 -0
- package/examples/jsm/shaders/DotScreenShader.d.ts +13 -0
- package/examples/jsm/shaders/DotScreenShader.js +75 -0
- package/examples/jsm/shaders/ExposureShader.d.ts +11 -0
- package/examples/jsm/shaders/ExposureShader.js +51 -0
- package/examples/jsm/shaders/FXAAShader.d.ts +11 -0
- package/examples/jsm/shaders/FXAAShader.js +298 -0
- package/examples/jsm/shaders/FilmShader.d.ts +12 -0
- package/examples/jsm/shaders/FilmShader.js +73 -0
- package/examples/jsm/shaders/FocusShader.d.ts +14 -0
- package/examples/jsm/shaders/FocusShader.js +94 -0
- package/examples/jsm/shaders/FreiChenShader.d.ts +11 -0
- package/examples/jsm/shaders/FreiChenShader.js +103 -0
- package/examples/jsm/shaders/GTAOShader.d.ts +59 -0
- package/examples/jsm/shaders/GTAOShader.js +434 -0
- package/examples/jsm/shaders/GammaCorrectionShader.d.ts +9 -0
- package/examples/jsm/shaders/GammaCorrectionShader.js +52 -0
- package/examples/jsm/shaders/HalftoneShader.d.ts +22 -0
- package/examples/jsm/shaders/HalftoneShader.js +332 -0
- package/examples/jsm/shaders/HorizontalBlurShader.d.ts +10 -0
- package/examples/jsm/shaders/HorizontalBlurShader.js +68 -0
- package/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +12 -0
- package/examples/jsm/shaders/HorizontalTiltShiftShader.js +70 -0
- package/examples/jsm/shaders/HueSaturationShader.d.ts +12 -0
- package/examples/jsm/shaders/HueSaturationShader.js +74 -0
- package/examples/jsm/shaders/KaleidoShader.d.ts +12 -0
- package/examples/jsm/shaders/KaleidoShader.js +65 -0
- package/examples/jsm/shaders/LuminosityHighPassShader.d.ts +15 -0
- package/examples/jsm/shaders/LuminosityHighPassShader.js +68 -0
- package/examples/jsm/shaders/LuminosityShader.d.ts +10 -0
- package/examples/jsm/shaders/LuminosityShader.js +54 -0
- package/examples/jsm/shaders/MirrorShader.d.ts +11 -0
- package/examples/jsm/shaders/MirrorShader.js +62 -0
- package/examples/jsm/shaders/NormalMapShader.d.ts +13 -0
- package/examples/jsm/shaders/NormalMapShader.js +60 -0
- package/examples/jsm/shaders/OutputShader.d.ts +11 -0
- package/examples/jsm/shaders/OutputShader.js +103 -0
- package/examples/jsm/shaders/PoissonDenoiseShader.d.ts +28 -0
- package/examples/jsm/shaders/PoissonDenoiseShader.js +239 -0
- package/examples/jsm/shaders/RGBShiftShader.d.ts +11 -0
- package/examples/jsm/shaders/RGBShiftShader.js +61 -0
- package/examples/jsm/shaders/SAOShader.d.ts +29 -0
- package/examples/jsm/shaders/SAOShader.js +201 -0
- package/examples/jsm/shaders/SMAAShader.d.ts +43 -0
- package/examples/jsm/shaders/SMAAShader.js +489 -0
- package/examples/jsm/shaders/SSAOShader.d.ts +49 -0
- package/examples/jsm/shaders/SSAOShader.js +331 -0
- package/examples/jsm/shaders/SSRShader.d.ts +62 -0
- package/examples/jsm/shaders/SSRShader.js +396 -0
- package/examples/jsm/shaders/SepiaShader.d.ts +10 -0
- package/examples/jsm/shaders/SepiaShader.js +57 -0
- package/examples/jsm/shaders/SobelOperatorShader.d.ts +11 -0
- package/examples/jsm/shaders/SobelOperatorShader.js +98 -0
- package/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +38 -0
- package/examples/jsm/shaders/SubsurfaceScatteringShader.js +95 -0
- package/examples/jsm/shaders/TechnicolorShader.d.ts +10 -0
- package/examples/jsm/shaders/TechnicolorShader.js +51 -0
- package/examples/jsm/shaders/ToonShader.d.ts +54 -0
- package/examples/jsm/shaders/ToonShader.js +349 -0
- package/examples/jsm/shaders/TriangleBlurShader.d.ts +11 -0
- package/examples/jsm/shaders/TriangleBlurShader.js +79 -0
- package/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +11 -0
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +60 -0
- package/examples/jsm/shaders/VelocityShader.d.ts +16 -0
- package/examples/jsm/shaders/VelocityShader.js +137 -0
- package/examples/jsm/shaders/VerticalBlurShader.d.ts +10 -0
- package/examples/jsm/shaders/VerticalBlurShader.js +66 -0
- package/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +12 -0
- package/examples/jsm/shaders/VerticalTiltShiftShader.js +70 -0
- package/examples/jsm/shaders/VignetteShader.d.ts +11 -0
- package/examples/jsm/shaders/VignetteShader.js +56 -0
- package/examples/jsm/shaders/VolumeShader.d.ts +14 -0
- package/examples/jsm/shaders/VolumeShader.js +285 -0
- package/examples/jsm/shaders/WaterRefractionShader.d.ts +14 -0
- package/examples/jsm/shaders/WaterRefractionShader.js +106 -0
- package/examples/jsm/textures/FlakesTexture.d.ts +3 -0
- package/examples/jsm/textures/FlakesTexture.js +54 -0
- package/examples/jsm/transpiler/AST.d.ts +293 -0
- package/examples/jsm/transpiler/AST.js +694 -0
- package/examples/jsm/transpiler/GLSLDecoder.d.ts +7 -0
- package/examples/jsm/transpiler/GLSLDecoder.js +1718 -0
- package/examples/jsm/transpiler/Linker.js +327 -0
- package/examples/jsm/transpiler/ShaderToyDecoder.d.ts +3 -0
- package/examples/jsm/transpiler/ShaderToyDecoder.js +51 -0
- package/examples/jsm/transpiler/TSLEncoder.d.ts +51 -0
- package/examples/jsm/transpiler/TSLEncoder.js +1055 -0
- package/examples/jsm/transpiler/Transpiler.d.ts +5 -0
- package/examples/jsm/transpiler/Transpiler.js +67 -0
- package/examples/jsm/transpiler/TranspilerUtils.js +29 -0
- package/examples/jsm/transpiler/WGSLEncoder.js +868 -0
- package/examples/jsm/tsl/WebGLNodesHandler.d.ts +17 -0
- package/examples/jsm/tsl/WebGLNodesHandler.js +595 -0
- package/examples/jsm/tsl/display/AfterImageNode.d.ts +15 -0
- package/examples/jsm/tsl/display/AfterImageNode.js +256 -0
- package/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +42 -0
- package/examples/jsm/tsl/display/AnaglyphPassNode.js +550 -0
- package/examples/jsm/tsl/display/BilateralBlurNode.d.ts +27 -0
- package/examples/jsm/tsl/display/BilateralBlurNode.js +377 -0
- package/examples/jsm/tsl/display/BleachBypass.d.ts +3 -0
- package/examples/jsm/tsl/display/BleachBypass.js +33 -0
- package/examples/jsm/tsl/display/BloomNode.d.ts +44 -0
- package/examples/jsm/tsl/display/BloomNode.js +599 -0
- package/examples/jsm/tsl/display/CRT.d.ts +22 -0
- package/examples/jsm/tsl/display/CRT.js +150 -0
- package/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +19 -0
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +174 -0
- package/examples/jsm/tsl/display/DenoiseNode.d.ts +26 -0
- package/examples/jsm/tsl/display/DenoiseNode.js +354 -0
- package/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +28 -0
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +572 -0
- package/examples/jsm/tsl/display/DotScreenNode.d.ts +17 -0
- package/examples/jsm/tsl/display/DotScreenNode.js +104 -0
- package/examples/jsm/tsl/display/FSR1Node.d.ts +17 -0
- package/examples/jsm/tsl/display/FSR1Node.js +481 -0
- package/examples/jsm/tsl/display/FXAANode.d.ts +11 -0
- package/examples/jsm/tsl/display/FXAANode.js +364 -0
- package/examples/jsm/tsl/display/FilmNode.d.ts +17 -0
- package/examples/jsm/tsl/display/FilmNode.js +101 -0
- package/examples/jsm/tsl/display/GTAONode.d.ts +37 -0
- package/examples/jsm/tsl/display/GTAONode.js +719 -0
- package/examples/jsm/tsl/display/GaussianBlurNode.d.ts +56 -0
- package/examples/jsm/tsl/display/GaussianBlurNode.js +412 -0
- package/examples/jsm/tsl/display/GodraysNode.d.ts +20 -0
- package/examples/jsm/tsl/display/GodraysNode.js +618 -0
- package/examples/jsm/tsl/display/ImportanceSampledEnvironment.d.ts +84 -0
- package/examples/jsm/tsl/display/ImportanceSampledEnvironment.js +560 -0
- package/examples/jsm/tsl/display/LensflareNode.d.ts +34 -0
- package/examples/jsm/tsl/display/LensflareNode.js +282 -0
- package/examples/jsm/tsl/display/Lut3DNode.d.ts +19 -0
- package/examples/jsm/tsl/display/Lut3DNode.js +109 -0
- package/examples/jsm/tsl/display/MotionBlur.d.ts +7 -0
- package/examples/jsm/tsl/display/MotionBlur.js +33 -0
- package/examples/jsm/tsl/display/OITPassNode.d.ts +64 -0
- package/examples/jsm/tsl/display/OITPassNode.js +352 -0
- package/examples/jsm/tsl/display/OutlineNode.d.ts +31 -0
- package/examples/jsm/tsl/display/OutlineNode.js +814 -0
- package/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +12 -0
- package/examples/jsm/tsl/display/ParallaxBarrierPassNode.js +90 -0
- package/examples/jsm/tsl/display/PixelationPassNode.d.ts +27 -0
- package/examples/jsm/tsl/display/PixelationPassNode.js +335 -0
- package/examples/jsm/tsl/display/RGBShiftNode.d.ts +15 -0
- package/examples/jsm/tsl/display/RGBShiftNode.js +96 -0
- package/examples/jsm/tsl/display/RecurrentDenoiseNode.d.ts +89 -0
- package/examples/jsm/tsl/display/RecurrentDenoiseNode.js +915 -0
- package/examples/jsm/tsl/display/RetroPassNode.d.ts +17 -0
- package/examples/jsm/tsl/display/RetroPassNode.js +263 -0
- package/examples/jsm/tsl/display/SMAANode.d.ts +17 -0
- package/examples/jsm/tsl/display/SMAANode.js +729 -0
- package/examples/jsm/tsl/display/SSAAPassNode.d.ts +18 -0
- package/examples/jsm/tsl/display/SSAAPassNode.js +344 -0
- package/examples/jsm/tsl/display/SSAONode.d.ts +116 -0
- package/examples/jsm/tsl/display/SSAONode.js +436 -0
- package/examples/jsm/tsl/display/SSGINode.d.ts +33 -0
- package/examples/jsm/tsl/display/SSGINode.js +691 -0
- package/examples/jsm/tsl/display/SSRNode.d.ts +315 -0
- package/examples/jsm/tsl/display/SSRNode.js +1358 -0
- package/examples/jsm/tsl/display/SSSNode.d.ts +20 -0
- package/examples/jsm/tsl/display/SSSNode.js +493 -0
- package/examples/jsm/tsl/display/Sepia.d.ts +3 -0
- package/examples/jsm/tsl/display/Sepia.js +24 -0
- package/examples/jsm/tsl/display/Shape.d.ts +3 -0
- package/examples/jsm/tsl/display/Shape.js +29 -0
- package/examples/jsm/tsl/display/SharpenNode.d.ts +22 -0
- package/examples/jsm/tsl/display/SharpenNode.js +284 -0
- package/examples/jsm/tsl/display/SobelOperatorNode.d.ts +11 -0
- package/examples/jsm/tsl/display/SobelOperatorNode.js +168 -0
- package/examples/jsm/tsl/display/StereoCompositePassNode.d.ts +13 -0
- package/examples/jsm/tsl/display/StereoCompositePassNode.js +190 -0
- package/examples/jsm/tsl/display/StereoPassNode.d.ts +13 -0
- package/examples/jsm/tsl/display/StereoPassNode.js +117 -0
- package/examples/jsm/tsl/display/TAAUNode.d.ts +31 -0
- package/examples/jsm/tsl/display/TAAUNode.js +732 -0
- package/examples/jsm/tsl/display/TRAANode.d.ts +26 -0
- package/examples/jsm/tsl/display/TRAANode.js +641 -0
- package/examples/jsm/tsl/display/TemporalReprojectNode.d.ts +64 -0
- package/examples/jsm/tsl/display/TemporalReprojectNode.js +1029 -0
- package/examples/jsm/tsl/display/TransitionNode.d.ts +31 -0
- package/examples/jsm/tsl/display/TransitionNode.js +141 -0
- package/examples/jsm/tsl/display/boxBlur.d.ts +10 -0
- package/examples/jsm/tsl/display/boxBlur.js +65 -0
- package/examples/jsm/tsl/display/depthAwareBlend.d.ts +15 -0
- package/examples/jsm/tsl/display/depthAwareBlend.js +80 -0
- package/examples/jsm/tsl/display/depthAwareBlur.d.ts +10 -0
- package/examples/jsm/tsl/display/depthAwareBlur.js +63 -0
- package/examples/jsm/tsl/display/hashBlur.d.ts +12 -0
- package/examples/jsm/tsl/display/hashBlur.js +55 -0
- package/examples/jsm/tsl/display/radialBlur.d.ts +12 -0
- package/examples/jsm/tsl/display/radialBlur.js +68 -0
- package/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +54 -0
- package/examples/jsm/tsl/lighting/ClusteredLightsNode.js +633 -0
- package/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts +21 -0
- package/examples/jsm/tsl/lighting/DynamicLightsNode.js +300 -0
- package/examples/jsm/tsl/lighting/LightProbeGridNode.js +136 -0
- package/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts +9 -0
- package/examples/jsm/tsl/lighting/data/AmbientLightDataNode.js +61 -0
- package/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts +9 -0
- package/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.js +111 -0
- package/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts +9 -0
- package/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.js +99 -0
- package/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts +9 -0
- package/examples/jsm/tsl/lighting/data/PointLightDataNode.js +134 -0
- package/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts +9 -0
- package/examples/jsm/tsl/lighting/data/SpotLightDataNode.js +161 -0
- package/examples/jsm/tsl/math/Bayer.d.ts +5 -0
- package/examples/jsm/tsl/math/Bayer.js +84 -0
- package/examples/jsm/tsl/math/curlNoise.d.ts +38 -0
- package/examples/jsm/tsl/math/curlNoise.js +107 -0
- package/examples/jsm/tsl/math/voronoiNoise.d.ts +52 -0
- package/examples/jsm/tsl/math/voronoiNoise.js +112 -0
- package/examples/jsm/tsl/shadows/TileShadowNode.d.ts +14 -0
- package/examples/jsm/tsl/shadows/TileShadowNode.js +454 -0
- package/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts +14 -0
- package/examples/jsm/tsl/shadows/TileShadowNodeHelper.js +212 -0
- package/examples/jsm/tsl/utils/GroundedSkybox.d.ts +17 -0
- package/examples/jsm/tsl/utils/GroundedSkybox.js +62 -0
- package/examples/jsm/tsl/utils/RNoise.d.ts +12 -0
- package/examples/jsm/tsl/utils/RNoise.js +51 -0
- package/examples/jsm/tsl/utils/Raymarching.d.ts +8 -0
- package/examples/jsm/tsl/utils/Raymarching.js +70 -0
- package/examples/jsm/tsl/utils/SoftParticles.d.ts +21 -0
- package/examples/jsm/tsl/utils/SoftParticles.js +60 -0
- package/examples/jsm/tsl/utils/SpecularHelpers.d.ts +20 -0
- package/examples/jsm/tsl/utils/SpecularHelpers.js +325 -0
- package/examples/jsm/tsl/utils/TAAUtils.js +195 -0
- package/examples/jsm/utils/BufferGeometryUtils.d.ts +37 -0
- package/examples/jsm/utils/BufferGeometryUtils.js +1501 -0
- package/examples/jsm/utils/CameraUtils.d.ts +9 -0
- package/examples/jsm/utils/CameraUtils.js +82 -0
- package/examples/jsm/utils/ColorUtils.d.ts +5 -0
- package/examples/jsm/utils/ColorUtils.js +76 -0
- package/examples/jsm/utils/GaussianSplatUtils.d.ts +68 -0
- package/examples/jsm/utils/GaussianSplatUtils.js +229 -0
- package/examples/jsm/utils/GeometryCompressionUtils.d.ts +21 -0
- package/examples/jsm/utils/GeometryCompressionUtils.js +547 -0
- package/examples/jsm/utils/GeometryUtils.d.ts +25 -0
- package/examples/jsm/utils/GeometryUtils.js +226 -0
- package/examples/jsm/utils/LDrawUtils.d.ts +5 -0
- package/examples/jsm/utils/LDrawUtils.js +211 -0
- package/examples/jsm/utils/SceneOptimizer.d.ts +18 -0
- package/examples/jsm/utils/SceneOptimizer.js +458 -0
- package/examples/jsm/utils/SceneUtils.d.ts +57 -0
- package/examples/jsm/utils/SceneUtils.js +363 -0
- package/examples/jsm/utils/ShadowMapViewer.d.ts +26 -0
- package/examples/jsm/utils/ShadowMapViewer.js +244 -0
- package/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
- package/examples/jsm/utils/ShadowMapViewerGPU.js +233 -0
- package/examples/jsm/utils/SkeletonUtils.d.ts +32 -0
- package/examples/jsm/utils/SkeletonUtils.js +496 -0
- package/examples/jsm/utils/SortUtils.d.ts +7 -0
- package/examples/jsm/utils/SortUtils.js +175 -0
- package/examples/jsm/utils/UVsDebug.d.ts +3 -0
- package/examples/jsm/utils/UVsDebug.js +173 -0
- package/examples/jsm/utils/WebGLTextureUtils.d.ts +3 -0
- package/examples/jsm/utils/WebGLTextureUtils.js +115 -0
- package/examples/jsm/utils/WebGPUTextureUtils.d.ts +3 -0
- package/examples/jsm/utils/WebGPUTextureUtils.js +81 -0
- package/examples/jsm/utils/WorkerPool.d.ts +26 -0
- package/examples/jsm/utils/WorkerPool.js +167 -0
- package/examples/jsm/webxr/ARButton.d.ts +9 -0
- package/examples/jsm/webxr/ARButton.js +251 -0
- package/examples/jsm/webxr/OculusHandModel.d.ts +23 -0
- package/examples/jsm/webxr/OculusHandModel.js +194 -0
- package/examples/jsm/webxr/OculusHandPointerModel.d.ts +67 -0
- package/examples/jsm/webxr/OculusHandPointerModel.js +539 -0
- package/examples/jsm/webxr/Text2D.d.ts +3 -0
- package/examples/jsm/webxr/Text2D.js +52 -0
- package/examples/jsm/webxr/VRButton.d.ts +7 -0
- package/examples/jsm/webxr/VRButton.js +264 -0
- package/examples/jsm/webxr/WebGLXRFallback.d.ts +14 -0
- package/examples/jsm/webxr/WebGLXRFallback.js +75 -0
- package/examples/jsm/webxr/XRButton.d.ts +7 -0
- package/examples/jsm/webxr/XRButton.js +246 -0
- package/examples/jsm/webxr/XRControllerModelFactory.d.ts +23 -0
- package/examples/jsm/webxr/XRControllerModelFactory.js +415 -0
- package/examples/jsm/webxr/XREstimatedLight.d.ts +69 -0
- package/examples/jsm/webxr/XREstimatedLight.js +254 -0
- package/examples/jsm/webxr/XRHandMeshModel.d.ts +20 -0
- package/examples/jsm/webxr/XRHandMeshModel.js +177 -0
- package/examples/jsm/webxr/XRHandModelFactory.d.ts +32 -0
- package/examples/jsm/webxr/XRHandModelFactory.js +198 -0
- package/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +24 -0
- package/examples/jsm/webxr/XRHandPrimitiveModel.js +147 -0
- package/examples/jsm/webxr/XRPlanes.d.ts +5 -0
- package/examples/jsm/webxr/XRPlanes.js +118 -0
- package/index.d.ts +6 -0
- package/package.json +68 -4
- package/src/Three.Core.d.ts +176 -0
- package/src/Three.Core.js +189 -0
- package/src/Three.Legacy.js +0 -0
- package/src/Three.TSL.d.ts +686 -0
- package/src/Three.TSL.js +684 -0
- package/src/Three.WebGPU.Nodes.d.ts +36 -0
- package/src/Three.WebGPU.Nodes.js +33 -0
- package/src/Three.WebGPU.d.ts +44 -0
- package/src/Three.WebGPU.js +43 -0
- package/src/Three.d.ts +47 -0
- package/src/Three.js +10 -0
- package/src/animation/AnimationAction.d.ts +286 -0
- package/src/animation/AnimationAction.js +946 -0
- package/src/animation/AnimationClip.d.ts +168 -0
- package/src/animation/AnimationClip.js +502 -0
- package/src/animation/AnimationMixer.d.ts +175 -0
- package/src/animation/AnimationMixer.js +860 -0
- package/src/animation/AnimationObjectGroup.d.ts +58 -0
- package/src/animation/AnimationObjectGroup.js +423 -0
- package/src/animation/AnimationUtils.d.ts +182 -0
- package/src/animation/AnimationUtils.js +521 -0
- package/src/animation/KeyframeTrack.d.ts +197 -0
- package/src/animation/KeyframeTrack.js +673 -0
- package/src/animation/PropertyBinding.d.ts +101 -0
- package/src/animation/PropertyBinding.js +794 -0
- package/src/animation/PropertyMixer.d.ts +75 -0
- package/src/animation/PropertyMixer.js +385 -0
- package/src/animation/tracks/BooleanKeyframeTrack.d.ts +18 -0
- package/src/animation/tracks/BooleanKeyframeTrack.js +55 -0
- package/src/animation/tracks/ColorKeyframeTrack.d.ts +17 -0
- package/src/animation/tracks/ColorKeyframeTrack.js +36 -0
- package/src/animation/tracks/NumberKeyframeTrack.d.ts +17 -0
- package/src/animation/tracks/NumberKeyframeTrack.js +36 -0
- package/src/animation/tracks/QuaternionKeyframeTrack.d.ts +17 -0
- package/src/animation/tracks/QuaternionKeyframeTrack.js +51 -0
- package/src/animation/tracks/StringKeyframeTrack.d.ts +18 -0
- package/src/animation/tracks/StringKeyframeTrack.js +55 -0
- package/src/animation/tracks/VectorKeyframeTrack.d.ts +17 -0
- package/src/animation/tracks/VectorKeyframeTrack.js +36 -0
- package/src/audio/Audio.d.ts +340 -0
- package/src/audio/Audio.js +778 -0
- package/src/audio/AudioAnalyser.d.ts +63 -0
- package/src/audio/AudioAnalyser.js +97 -0
- package/src/audio/AudioContext.d.ts +19 -0
- package/src/audio/AudioContext.js +40 -0
- package/src/audio/AudioListener.d.ts +75 -0
- package/src/audio/AudioListener.js +218 -0
- package/src/audio/PositionalAudio.d.ts +108 -0
- package/src/audio/PositionalAudio.js +253 -0
- package/src/cameras/ArrayCamera.d.ts +35 -0
- package/src/cameras/ArrayCamera.js +54 -0
- package/src/cameras/Camera.d.ts +42 -0
- package/src/cameras/Camera.js +160 -0
- package/src/cameras/CubeCamera.d.ts +89 -0
- package/src/cameras/CubeCamera.js +259 -0
- package/src/cameras/OrthographicCamera.d.ts +144 -0
- package/src/cameras/OrthographicCamera.js +245 -0
- package/src/cameras/PerspectiveCamera.d.ts +241 -0
- package/src/cameras/PerspectiveCamera.js +407 -0
- package/src/cameras/StereoCamera.d.ts +44 -0
- package/src/cameras/StereoCamera.js +149 -0
- package/src/constants.d.ts +976 -0
- package/src/constants.js +1782 -0
- package/src/core/BufferAttribute.d.ts +650 -0
- package/src/core/BufferAttribute.js +1057 -0
- package/src/core/BufferGeometry.d.ts +442 -0
- package/src/core/BufferGeometry.js +1480 -0
- package/src/core/Clock.d.ts +73 -0
- package/src/core/Clock.js +135 -0
- package/src/core/EventDispatcher.d.ts +82 -0
- package/src/core/EventDispatcher.js +131 -0
- package/src/core/GLBufferAttribute.d.ts +138 -0
- package/src/core/GLBufferAttribute.js +171 -0
- package/src/core/InstancedBufferAttribute.d.ts +32 -0
- package/src/core/InstancedBufferAttribute.js +68 -0
- package/src/core/InstancedBufferGeometry.d.ts +37 -0
- package/src/core/InstancedBufferGeometry.js +60 -0
- package/src/core/InstancedInterleavedBuffer.d.ts +22 -0
- package/src/core/InstancedInterleavedBuffer.js +74 -0
- package/src/core/InterleavedBuffer.d.ts +162 -0
- package/src/core/InterleavedBuffer.js +295 -0
- package/src/core/InterleavedBufferAttribute.d.ts +201 -0
- package/src/core/InterleavedBufferAttribute.js +549 -0
- package/src/core/Layers.d.ts +72 -0
- package/src/core/Layers.js +121 -0
- package/src/core/Object3D.d.ts +725 -0
- package/src/core/Object3D.js +1709 -0
- package/src/core/Raycaster.d.ts +212 -0
- package/src/core/Raycaster.js +266 -0
- package/src/core/RenderTarget.d.ts +153 -0
- package/src/core/RenderTarget.js +495 -0
- package/src/core/RenderTarget3D.d.ts +9 -0
- package/src/core/RenderTarget3D.js +52 -0
- package/src/core/Timer.d.ts +77 -0
- package/src/core/Timer.js +184 -0
- package/src/core/Uniform.d.ts +38 -0
- package/src/core/Uniform.js +46 -0
- package/src/core/UniformsGroup.d.ts +39 -0
- package/src/core/UniformsGroup.js +180 -0
- package/src/extras/Controls.d.ts +59 -0
- package/src/extras/Controls.js +112 -0
- package/src/extras/DataUtils.d.ts +22 -0
- package/src/extras/DataUtils.js +217 -0
- package/src/extras/Earcut.d.ts +17 -0
- package/src/extras/Earcut.js +28 -0
- package/src/extras/ImageUtils.d.ts +33 -0
- package/src/extras/ImageUtils.js +137 -0
- package/src/extras/PMREMGenerator.d.ts +95 -0
- package/src/extras/PMREMGenerator.js +1063 -0
- package/src/extras/ShapeUtils.d.ts +25 -0
- package/src/extras/ShapeUtils.js +114 -0
- package/src/extras/TextureUtils.d.ts +42 -0
- package/src/extras/TextureUtils.js +297 -0
- package/src/extras/core/Curve.d.ts +162 -0
- package/src/extras/core/Curve.js +517 -0
- package/src/extras/core/CurvePath.d.ts +77 -0
- package/src/extras/core/CurvePath.js +296 -0
- package/src/extras/core/Interpolations.d.ts +36 -0
- package/src/extras/core/Interpolations.js +111 -0
- package/src/extras/core/Path.d.ts +166 -0
- package/src/extras/core/Path.js +329 -0
- package/src/extras/core/Shape.d.ts +86 -0
- package/src/extras/core/Shape.js +165 -0
- package/src/extras/core/ShapePath.d.ts +94 -0
- package/src/extras/core/ShapePath.js +356 -0
- package/src/extras/curves/ArcCurve.d.ts +41 -0
- package/src/extras/curves/ArcCurve.js +39 -0
- package/src/extras/curves/CatmullRomCurve3.d.ts +77 -0
- package/src/extras/curves/CatmullRomCurve3.js +327 -0
- package/src/extras/curves/CubicBezierCurve.d.ts +72 -0
- package/src/extras/curves/CubicBezierCurve.js +145 -0
- package/src/extras/curves/CubicBezierCurve3.d.ts +72 -0
- package/src/extras/curves/CubicBezierCurve3.js +129 -0
- package/src/extras/curves/Curves.d.ts +10 -0
- package/src/extras/curves/Curves.js +10 -0
- package/src/extras/curves/EllipseCurve.d.ts +115 -0
- package/src/extras/curves/EllipseCurve.js +258 -0
- package/src/extras/curves/LineCurve.d.ts +42 -0
- package/src/extras/curves/LineCurve.js +128 -0
- package/src/extras/curves/LineCurve3.d.ts +42 -0
- package/src/extras/curves/LineCurve3.js +128 -0
- package/src/extras/curves/QuadraticBezierCurve.d.ts +64 -0
- package/src/extras/curves/QuadraticBezierCurve.js +133 -0
- package/src/extras/curves/QuadraticBezierCurve3.d.ts +64 -0
- package/src/extras/curves/QuadraticBezierCurve3.js +118 -0
- package/src/extras/curves/SplineCurve.d.ts +52 -0
- package/src/extras/curves/SplineCurve.js +145 -0
- package/src/extras/lib/earcut.js +685 -0
- package/src/geometries/BoxGeometry.d.ts +59 -0
- package/src/geometries/BoxGeometry.js +219 -0
- package/src/geometries/CapsuleGeometry.d.ts +56 -0
- package/src/geometries/CapsuleGeometry.js +218 -0
- package/src/geometries/CircleGeometry.d.ts +51 -0
- package/src/geometries/CircleGeometry.js +142 -0
- package/src/geometries/ConeGeometry.d.ts +64 -0
- package/src/geometries/ConeGeometry.js +70 -0
- package/src/geometries/CylinderGeometry.d.ts +64 -0
- package/src/geometries/CylinderGeometry.js +333 -0
- package/src/geometries/DodecahedronGeometry.d.ts +25 -0
- package/src/geometries/DodecahedronGeometry.js +99 -0
- package/src/geometries/EdgesGeometry.d.ts +41 -0
- package/src/geometries/EdgesGeometry.js +180 -0
- package/src/geometries/ExtrudeGeometry.d.ts +138 -0
- package/src/geometries/ExtrudeGeometry.js +910 -0
- package/src/geometries/Geometries.d.ts +21 -0
- package/src/geometries/Geometries.js +21 -0
- package/src/geometries/IcosahedronGeometry.d.ts +26 -0
- package/src/geometries/IcosahedronGeometry.js +75 -0
- package/src/geometries/LatheGeometry.d.ts +55 -0
- package/src/geometries/LatheGeometry.js +230 -0
- package/src/geometries/OctahedronGeometry.d.ts +25 -0
- package/src/geometries/OctahedronGeometry.js +70 -0
- package/src/geometries/PlaneGeometry.d.ts +48 -0
- package/src/geometries/PlaneGeometry.js +133 -0
- package/src/geometries/PolyhedronGeometry.d.ts +54 -0
- package/src/geometries/PolyhedronGeometry.js +348 -0
- package/src/geometries/RingGeometry.d.ts +59 -0
- package/src/geometries/RingGeometry.js +165 -0
- package/src/geometries/ShapeGeometry.d.ts +53 -0
- package/src/geometries/ShapeGeometry.js +233 -0
- package/src/geometries/SphereGeometry.d.ts +67 -0
- package/src/geometries/SphereGeometry.js +180 -0
- package/src/geometries/TetrahedronGeometry.d.ts +25 -0
- package/src/geometries/TetrahedronGeometry.js +67 -0
- package/src/geometries/TorusGeometry.d.ts +69 -0
- package/src/geometries/TorusGeometry.js +161 -0
- package/src/geometries/TorusKnotGeometry.d.ts +59 -0
- package/src/geometries/TorusKnotGeometry.js +206 -0
- package/src/geometries/TubeGeometry.d.ts +86 -0
- package/src/geometries/TubeGeometry.js +253 -0
- package/src/geometries/WireframeGeometry.d.ts +40 -0
- package/src/geometries/WireframeGeometry.js +179 -0
- package/src/helpers/ArrowHelper.d.ts +72 -0
- package/src/helpers/ArrowHelper.js +173 -0
- package/src/helpers/AxesHelper.d.ts +33 -0
- package/src/helpers/AxesHelper.js +98 -0
- package/src/helpers/Box3Helper.d.ts +28 -0
- package/src/helpers/Box3Helper.js +85 -0
- package/src/helpers/BoxHelper.d.ts +48 -0
- package/src/helpers/BoxHelper.js +151 -0
- package/src/helpers/CameraHelper.d.ts +54 -0
- package/src/helpers/CameraHelper.js +347 -0
- package/src/helpers/DirectionalLightHelper.d.ts +55 -0
- package/src/helpers/DirectionalLightHelper.js +152 -0
- package/src/helpers/GridHelper.d.ts +28 -0
- package/src/helpers/GridHelper.js +84 -0
- package/src/helpers/HemisphereLightHelper.d.ts +44 -0
- package/src/helpers/HemisphereLightHelper.js +134 -0
- package/src/helpers/PlaneHelper.d.ts +33 -0
- package/src/helpers/PlaneHelper.js +98 -0
- package/src/helpers/PointLightHelper.d.ts +43 -0
- package/src/helpers/PointLightHelper.js +115 -0
- package/src/helpers/PolarGridHelper.d.ts +37 -0
- package/src/helpers/PolarGridHelper.js +128 -0
- package/src/helpers/SkeletonHelper.d.ts +44 -0
- package/src/helpers/SkeletonHelper.js +196 -0
- package/src/helpers/SpotLightHelper.d.ts +45 -0
- package/src/helpers/SpotLightHelper.js +156 -0
- package/src/lights/AmbientLight.d.ts +28 -0
- package/src/lights/AmbientLight.js +42 -0
- package/src/lights/DirectionalLight.d.ts +68 -0
- package/src/lights/DirectionalLight.js +113 -0
- package/src/lights/DirectionalLightShadow.d.ts +18 -0
- package/src/lights/DirectionalLightShadow.js +31 -0
- package/src/lights/HemisphereLight.d.ts +41 -0
- package/src/lights/HemisphereLight.js +76 -0
- package/src/lights/Light.d.ts +39 -0
- package/src/lights/Light.js +75 -0
- package/src/lights/LightProbe.d.ts +46 -0
- package/src/lights/LightProbe.js +75 -0
- package/src/lights/LightShadow.d.ts +201 -0
- package/src/lights/LightShadow.js +378 -0
- package/src/lights/PointLight.d.ts +72 -0
- package/src/lights/PointLight.js +131 -0
- package/src/lights/PointLightShadow.d.ts +18 -0
- package/src/lights/PointLightShadow.js +31 -0
- package/src/lights/RectAreaLight.d.ts +62 -0
- package/src/lights/RectAreaLight.js +115 -0
- package/src/lights/SpotLight.d.ts +124 -0
- package/src/lights/SpotLight.js +194 -0
- package/src/lights/SpotLightShadow.d.ts +44 -0
- package/src/lights/SpotLightShadow.js +98 -0
- package/src/lights/webgpu/IESSpotLight.d.ts +18 -0
- package/src/lights/webgpu/IESSpotLight.js +47 -0
- package/src/lights/webgpu/ProjectorLight.d.ts +16 -0
- package/src/lights/webgpu/ProjectorLight.js +46 -0
- package/src/loaders/AnimationLoader.d.ts +9 -0
- package/src/loaders/AnimationLoader.js +98 -0
- package/src/loaders/AudioLoader.d.ts +6 -0
- package/src/loaders/AudioLoader.js +108 -0
- package/src/loaders/BufferGeometryLoader.d.ts +10 -0
- package/src/loaders/BufferGeometryLoader.js +247 -0
- package/src/loaders/Cache.d.ts +21 -0
- package/src/loaders/Cache.js +115 -0
- package/src/loaders/CompressedTextureLoader.d.ts +14 -0
- package/src/loaders/CompressedTextureLoader.js +167 -0
- package/src/loaders/CubeTextureLoader.d.ts +14 -0
- package/src/loaders/CubeTextureLoader.js +103 -0
- package/src/loaders/DataTextureLoader.d.ts +48 -0
- package/src/loaders/DataTextureLoader.js +205 -0
- package/src/loaders/FileLoader.d.ts +19 -0
- package/src/loaders/FileLoader.js +367 -0
- package/src/loaders/ImageBitmapLoader.d.ts +22 -0
- package/src/loaders/ImageBitmapLoader.js +225 -0
- package/src/loaders/ImageLoader.d.ts +17 -0
- package/src/loaders/ImageLoader.js +168 -0
- package/src/loaders/Loader.d.ts +51 -0
- package/src/loaders/Loader.js +222 -0
- package/src/loaders/LoaderUtils.d.ts +5 -0
- package/src/loaders/LoaderUtils.js +59 -0
- package/src/loaders/LoadingManager.d.ts +73 -0
- package/src/loaders/LoadingManager.js +334 -0
- package/src/loaders/MaterialLoader.d.ts +29 -0
- package/src/loaders/MaterialLoader.js +209 -0
- package/src/loaders/ObjectLoader.d.ts +35 -0
- package/src/loaders/ObjectLoader.js +1309 -0
- package/src/loaders/TextureLoader.d.ts +18 -0
- package/src/loaders/TextureLoader.js +74 -0
- package/src/loaders/nodes/NodeLoader.d.ts +21 -0
- package/src/loaders/nodes/NodeLoader.js +194 -0
- package/src/loaders/nodes/NodeMaterialLoader.d.ts +11 -0
- package/src/loaders/nodes/NodeMaterialLoader.js +108 -0
- package/src/loaders/nodes/NodeObjectLoader.d.ts +22 -0
- package/src/loaders/nodes/NodeObjectLoader.js +169 -0
- package/src/materials/LineBasicMaterial.d.ts +93 -0
- package/src/materials/LineBasicMaterial.js +126 -0
- package/src/materials/LineDashedMaterial.d.ts +56 -0
- package/src/materials/LineDashedMaterial.js +86 -0
- package/src/materials/Material.d.ts +663 -0
- package/src/materials/Material.js +1235 -0
- package/src/materials/Materials.d.ts +18 -0
- package/src/materials/Materials.js +39 -0
- package/src/materials/MeshBasicMaterial.d.ts +204 -0
- package/src/materials/MeshBasicMaterial.js +274 -0
- package/src/materials/MeshDepthMaterial.d.ts +119 -0
- package/src/materials/MeshDepthMaterial.js +158 -0
- package/src/materials/MeshDistanceMaterial.d.ts +102 -0
- package/src/materials/MeshDistanceMaterial.js +129 -0
- package/src/materials/MeshLambertMaterial.d.ts +331 -0
- package/src/materials/MeshLambertMaterial.js +441 -0
- package/src/materials/MeshMatcapMaterial.d.ts +199 -0
- package/src/materials/MeshMatcapMaterial.js +269 -0
- package/src/materials/MeshNormalMaterial.d.ts +134 -0
- package/src/materials/MeshNormalMaterial.js +183 -0
- package/src/materials/MeshPhongMaterial.d.ts +343 -0
- package/src/materials/MeshPhongMaterial.js +460 -0
- package/src/materials/MeshPhysicalMaterial.d.ts +353 -0
- package/src/materials/MeshPhysicalMaterial.js +606 -0
- package/src/materials/MeshStandardMaterial.d.ts +352 -0
- package/src/materials/MeshStandardMaterial.js +466 -0
- package/src/materials/MeshToonMaterial.d.ts +265 -0
- package/src/materials/MeshToonMaterial.js +354 -0
- package/src/materials/PointsMaterial.d.ts +113 -0
- package/src/materials/PointsMaterial.js +146 -0
- package/src/materials/RawShaderMaterial.d.ts +17 -0
- package/src/materials/RawShaderMaterial.js +42 -0
- package/src/materials/ShaderMaterial.d.ts +268 -0
- package/src/materials/ShaderMaterial.js +499 -0
- package/src/materials/ShadowMaterial.d.ts +61 -0
- package/src/materials/ShadowMaterial.js +91 -0
- package/src/materials/SpriteMaterial.d.ts +100 -0
- package/src/materials/SpriteMaterial.js +143 -0
- package/src/materials/nodes/Line2NodeMaterial.d.ts +102 -0
- package/src/materials/nodes/Line2NodeMaterial.js +634 -0
- package/src/materials/nodes/LineBasicNodeMaterial.d.ts +38 -0
- package/src/materials/nodes/LineBasicNodeMaterial.js +46 -0
- package/src/materials/nodes/LineDashedNodeMaterial.d.ts +88 -0
- package/src/materials/nodes/LineDashedNodeMaterial.js +132 -0
- package/src/materials/nodes/MeshBasicNodeMaterial.d.ts +55 -0
- package/src/materials/nodes/MeshBasicNodeMaterial.js +134 -0
- package/src/materials/nodes/MeshLambertNodeMaterial.d.ts +55 -0
- package/src/materials/nodes/MeshLambertNodeMaterial.js +82 -0
- package/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +45 -0
- package/src/materials/nodes/MeshMatcapNodeMaterial.js +77 -0
- package/src/materials/nodes/MeshNormalNodeMaterial.d.ts +41 -0
- package/src/materials/nodes/MeshNormalNodeMaterial.js +67 -0
- package/src/materials/nodes/MeshPhongNodeMaterial.d.ts +77 -0
- package/src/materials/nodes/MeshPhongNodeMaterial.js +132 -0
- package/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +286 -0
- package/src/materials/nodes/MeshPhysicalNodeMaterial.js +528 -0
- package/src/materials/nodes/MeshSSSNodeMaterial.d.ts +110 -0
- package/src/materials/nodes/MeshSSSNodeMaterial.js +162 -0
- package/src/materials/nodes/MeshStandardNodeMaterial.d.ts +93 -0
- package/src/materials/nodes/MeshStandardNodeMaterial.js +176 -0
- package/src/materials/nodes/MeshToonNodeMaterial.d.ts +45 -0
- package/src/materials/nodes/MeshToonNodeMaterial.js +66 -0
- package/src/materials/nodes/NodeMaterial.d.ts +503 -0
- package/src/materials/nodes/NodeMaterial.js +1380 -0
- package/src/materials/nodes/NodeMaterials.d.ts +18 -0
- package/src/materials/nodes/NodeMaterials.js +21 -0
- package/src/materials/nodes/PointsNodeMaterial.d.ts +60 -0
- package/src/materials/nodes/PointsNodeMaterial.js +212 -0
- package/src/materials/nodes/ShadowNodeMaterial.d.ts +45 -0
- package/src/materials/nodes/ShadowNodeMaterial.js +76 -0
- package/src/materials/nodes/SpriteNodeMaterial.d.ts +74 -0
- package/src/materials/nodes/SpriteNodeMaterial.js +176 -0
- package/src/materials/nodes/VolumeNodeMaterial.d.ts +56 -0
- package/src/materials/nodes/VolumeNodeMaterial.js +81 -0
- package/src/materials/nodes/manager/NodeMaterialObserver.d.ts +58 -0
- package/src/materials/nodes/manager/NodeMaterialObserver.js +973 -0
- package/src/math/Box2.d.ts +48 -0
- package/src/math/Box2.js +381 -0
- package/src/math/Box3.d.ts +310 -0
- package/src/math/Box3.js +810 -0
- package/src/math/Color.d.ts +376 -0
- package/src/math/Color.js +967 -0
- package/src/math/ColorManagement.d.ts +59 -0
- package/src/math/ColorManagement.js +215 -0
- package/src/math/Cylindrical.d.ts +26 -0
- package/src/math/Cylindrical.js +120 -0
- package/src/math/Euler.d.ts +50 -0
- package/src/math/Euler.js +449 -0
- package/src/math/Frustum.d.ts +30 -0
- package/src/math/Frustum.js +294 -0
- package/src/math/FrustumArray.d.ts +86 -0
- package/src/math/FrustumArray.js +228 -0
- package/src/math/Interpolant.d.ts +113 -0
- package/src/math/Interpolant.js +320 -0
- package/src/math/Line3.d.ts +30 -0
- package/src/math/Line3.js +337 -0
- package/src/math/MathUtils.d.ts +153 -0
- package/src/math/MathUtils.js +753 -0
- package/src/math/Matrix2.d.ts +53 -0
- package/src/math/Matrix2.js +128 -0
- package/src/math/Matrix3.d.ts +193 -0
- package/src/math/Matrix3.js +628 -0
- package/src/math/Matrix4.d.ts +506 -0
- package/src/math/Matrix4.js +1332 -0
- package/src/math/Plane.d.ts +55 -0
- package/src/math/Plane.js +397 -0
- package/src/math/Quaternion.d.ts +189 -0
- package/src/math/Quaternion.js +908 -0
- package/src/math/Ray.d.ts +60 -0
- package/src/math/Ray.js +705 -0
- package/src/math/Sphere.d.ts +55 -0
- package/src/math/Sphere.js +420 -0
- package/src/math/Spherical.d.ts +27 -0
- package/src/math/Spherical.js +147 -0
- package/src/math/SphericalHarmonics3.d.ts +50 -0
- package/src/math/SphericalHarmonics3.js +341 -0
- package/src/math/Triangle.d.ts +110 -0
- package/src/math/Triangle.js +537 -0
- package/src/math/Vector2.d.ts +321 -0
- package/src/math/Vector2.js +870 -0
- package/src/math/Vector3.d.ts +301 -0
- package/src/math/Vector3.js +1263 -0
- package/src/math/Vector4.d.ts +241 -0
- package/src/math/Vector4.js +1063 -0
- package/src/math/interpolants/BezierInterpolant.d.ts +23 -0
- package/src/math/interpolants/BezierInterpolant.js +119 -0
- package/src/math/interpolants/CubicInterpolant.d.ts +22 -0
- package/src/math/interpolants/CubicInterpolant.js +159 -0
- package/src/math/interpolants/DiscreteInterpolant.d.ts +12 -0
- package/src/math/interpolants/DiscreteInterpolant.js +34 -0
- package/src/math/interpolants/LinearInterpolant.d.ts +11 -0
- package/src/math/interpolants/LinearInterpolant.js +51 -0
- package/src/math/interpolants/QuaternionLinearInterpolant.d.ts +11 -0
- package/src/math/interpolants/QuaternionLinearInterpolant.js +48 -0
- package/src/nodes/Nodes.d.ts +170 -0
- package/src/nodes/Nodes.js +165 -0
- package/src/nodes/TSL.d.ts +183 -0
- package/src/nodes/TSL.js +183 -0
- package/src/nodes/accessors/AccessorsUtils.d.ts +8 -0
- package/src/nodes/accessors/AccessorsUtils.js +53 -0
- package/src/nodes/accessors/Arrays.d.ts +22 -0
- package/src/nodes/accessors/Arrays.js +68 -0
- package/src/nodes/accessors/Batch.d.ts +25 -0
- package/src/nodes/accessors/Batch.js +180 -0
- package/src/nodes/accessors/Bitangent.d.ts +6 -0
- package/src/nodes/accessors/Bitangent.js +82 -0
- package/src/nodes/accessors/BufferAttributeNode.d.ts +247 -0
- package/src/nodes/accessors/BufferAttributeNode.js +452 -0
- package/src/nodes/accessors/BufferNode.d.ts +33 -0
- package/src/nodes/accessors/BufferNode.js +138 -0
- package/src/nodes/accessors/BuiltinNode.d.ts +13 -0
- package/src/nodes/accessors/BuiltinNode.js +63 -0
- package/src/nodes/accessors/Camera.d.ts +16 -0
- package/src/nodes/accessors/Camera.js +403 -0
- package/src/nodes/accessors/ClippingNode.d.ts +19 -0
- package/src/nodes/accessors/ClippingNode.js +255 -0
- package/src/nodes/accessors/CubeTextureNode.d.ts +38 -0
- package/src/nodes/accessors/CubeTextureNode.js +215 -0
- package/src/nodes/accessors/Instance.d.ts +32 -0
- package/src/nodes/accessors/Instance.js +349 -0
- package/src/nodes/accessors/Lights.d.ts +17 -0
- package/src/nodes/accessors/Lights.js +139 -0
- package/src/nodes/accessors/MaterialNode.d.ts +134 -0
- package/src/nodes/accessors/MaterialNode.js +808 -0
- package/src/nodes/accessors/MaterialProperties.d.ts +8 -0
- package/src/nodes/accessors/MaterialProperties.js +57 -0
- package/src/nodes/accessors/MaterialReferenceNode.d.ts +15 -0
- package/src/nodes/accessors/MaterialReferenceNode.js +84 -0
- package/src/nodes/accessors/ModelNode.d.ts +49 -0
- package/src/nodes/accessors/ModelNode.js +260 -0
- package/src/nodes/accessors/ModelViewProjectionNode.d.ts +3 -0
- package/src/nodes/accessors/ModelViewProjectionNode.js +13 -0
- package/src/nodes/accessors/Morph.d.ts +11 -0
- package/src/nodes/accessors/Morph.js +297 -0
- package/src/nodes/accessors/Normal.d.ts +36 -0
- package/src/nodes/accessors/Normal.js +243 -0
- package/src/nodes/accessors/Object3DNode.d.ts +42 -0
- package/src/nodes/accessors/Object3DNode.js +268 -0
- package/src/nodes/accessors/PointUVNode.d.ts +9 -0
- package/src/nodes/accessors/PointUVNode.js +55 -0
- package/src/nodes/accessors/Position.d.ts +11 -0
- package/src/nodes/accessors/Position.js +126 -0
- package/src/nodes/accessors/ReferenceBaseNode.d.ts +26 -0
- package/src/nodes/accessors/ReferenceBaseNode.js +288 -0
- package/src/nodes/accessors/ReferenceElementNode.d.ts +15 -0
- package/src/nodes/accessors/ReferenceElementNode.js +72 -0
- package/src/nodes/accessors/ReferenceNode.d.ts +37 -0
- package/src/nodes/accessors/ReferenceNode.js +356 -0
- package/src/nodes/accessors/ReflectVector.d.ts +7 -0
- package/src/nodes/accessors/ReflectVector.js +36 -0
- package/src/nodes/accessors/RendererReferenceNode.d.ts +14 -0
- package/src/nodes/accessors/RendererReferenceNode.js +78 -0
- package/src/nodes/accessors/SceneProperties.d.ts +5 -0
- package/src/nodes/accessors/SceneProperties.js +47 -0
- package/src/nodes/accessors/Skinning.d.ts +23 -0
- package/src/nodes/accessors/Skinning.js +375 -0
- package/src/nodes/accessors/StorageBufferNode.d.ts +82 -0
- package/src/nodes/accessors/StorageBufferNode.js +405 -0
- package/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
- package/src/nodes/accessors/StorageTexture3DNode.js +100 -0
- package/src/nodes/accessors/StorageTextureNode.d.ts +47 -0
- package/src/nodes/accessors/StorageTextureNode.js +331 -0
- package/src/nodes/accessors/Tangent.d.ts +6 -0
- package/src/nodes/accessors/Tangent.js +60 -0
- package/src/nodes/accessors/TangentUtils.d.ts +21 -0
- package/src/nodes/accessors/TangentUtils.js +46 -0
- package/src/nodes/accessors/Texture3DNode.d.ts +29 -0
- package/src/nodes/accessors/Texture3DNode.js +196 -0
- package/src/nodes/accessors/TextureBicubic.d.ts +6 -0
- package/src/nodes/accessors/TextureBicubic.js +92 -0
- package/src/nodes/accessors/TextureNode.d.ts +104 -0
- package/src/nodes/accessors/TextureNode.js +1056 -0
- package/src/nodes/accessors/TextureSizeNode.d.ts +17 -0
- package/src/nodes/accessors/TextureSizeNode.js +79 -0
- package/src/nodes/accessors/UV.d.ts +3 -0
- package/src/nodes/accessors/UV.js +11 -0
- package/src/nodes/accessors/UniformArrayNode.d.ts +29 -0
- package/src/nodes/accessors/UniformArrayNode.js +375 -0
- package/src/nodes/accessors/UserDataNode.d.ts +14 -0
- package/src/nodes/accessors/UserDataNode.js +76 -0
- package/src/nodes/accessors/VelocityNode.d.ts +19 -0
- package/src/nodes/accessors/VelocityNode.js +224 -0
- package/src/nodes/accessors/VertexColorNode.d.ts +11 -0
- package/src/nodes/accessors/VertexColorNode.js +109 -0
- package/src/nodes/code/CodeNode.d.ts +22 -0
- package/src/nodes/code/CodeNode.js +181 -0
- package/src/nodes/code/ExpressionNode.d.ts +9 -0
- package/src/nodes/code/ExpressionNode.js +68 -0
- package/src/nodes/code/FunctionCallNode.d.ts +27 -0
- package/src/nodes/code/FunctionCallNode.js +187 -0
- package/src/nodes/code/FunctionNode.d.ts +40 -0
- package/src/nodes/code/FunctionNode.js +178 -0
- package/src/nodes/core/ArrayNode.d.ts +33 -0
- package/src/nodes/core/ArrayNode.js +174 -0
- package/src/nodes/core/AssignNode.d.ts +15 -0
- package/src/nodes/core/AssignNode.js +202 -0
- package/src/nodes/core/AttributeNode.d.ts +21 -0
- package/src/nodes/core/AttributeNode.js +168 -0
- package/src/nodes/core/BypassNode.d.ts +17 -0
- package/src/nodes/core/BypassNode.js +93 -0
- package/src/nodes/core/ConstNode.d.ts +16 -0
- package/src/nodes/core/ConstNode.js +67 -0
- package/src/nodes/core/ContextNode.d.ts +65 -0
- package/src/nodes/core/ContextNode.js +336 -0
- package/src/nodes/core/IndexNode.d.ts +33 -0
- package/src/nodes/core/IndexNode.js +230 -0
- package/src/nodes/core/InputNode.d.ts +23 -0
- package/src/nodes/core/InputNode.js +136 -0
- package/src/nodes/core/InspectorNode.d.ts +15 -0
- package/src/nodes/core/InspectorNode.js +128 -0
- package/src/nodes/core/IsolateNode.d.ts +31 -0
- package/src/nodes/core/IsolateNode.js +133 -0
- package/src/nodes/core/LightingModel.d.ts +33 -0
- package/src/nodes/core/LightingModel.js +77 -0
- package/src/nodes/core/MRTNode.d.ts +38 -0
- package/src/nodes/core/MRTNode.js +243 -0
- package/src/nodes/core/Node.d.ts +622 -0
- package/src/nodes/core/Node.js +1220 -0
- package/src/nodes/core/NodeAttribute.d.ts +47 -0
- package/src/nodes/core/NodeAttribute.js +53 -0
- package/src/nodes/core/NodeBuilder.d.ts +25 -0
- package/src/nodes/core/NodeBuilder.js +3476 -0
- package/src/nodes/core/NodeCache.d.ts +50 -0
- package/src/nodes/core/NodeCache.js +75 -0
- package/src/nodes/core/NodeCode.d.ts +4 -0
- package/src/nodes/core/NodeCode.js +46 -0
- package/src/nodes/core/NodeError.d.ts +9 -0
- package/src/nodes/core/NodeError.js +28 -0
- package/src/nodes/core/NodeFrame.d.ts +36 -0
- package/src/nodes/core/NodeFrame.js +322 -0
- package/src/nodes/core/NodeFunction.d.ts +13 -0
- package/src/nodes/core/NodeFunction.js +69 -0
- package/src/nodes/core/NodeFunctionInput.d.ts +7 -0
- package/src/nodes/core/NodeFunctionInput.js +61 -0
- package/src/nodes/core/NodeParser.d.ts +18 -0
- package/src/nodes/core/NodeParser.js +23 -0
- package/src/nodes/core/NodeUniform.d.ts +66 -0
- package/src/nodes/core/NodeUniform.js +91 -0
- package/src/nodes/core/NodeUtils.d.ts +26 -0
- package/src/nodes/core/NodeUtils.js +496 -0
- package/src/nodes/core/NodeVar.d.ts +51 -0
- package/src/nodes/core/NodeVar.js +60 -0
- package/src/nodes/core/NodeVarying.d.ts +59 -0
- package/src/nodes/core/NodeVarying.js +63 -0
- package/src/nodes/core/OutputStructNode.d.ts +11 -0
- package/src/nodes/core/OutputStructNode.js +105 -0
- package/src/nodes/core/OverrideContextNode.d.ts +92 -0
- package/src/nodes/core/OverrideContextNode.js +153 -0
- package/src/nodes/core/ParameterNode.d.ts +18 -0
- package/src/nodes/core/ParameterNode.js +94 -0
- package/src/nodes/core/PropertyNode.d.ts +66 -0
- package/src/nodes/core/PropertyNode.js +421 -0
- package/src/nodes/core/StackNode.d.ts +25 -0
- package/src/nodes/core/StackNode.js +447 -0
- package/src/nodes/core/StackTrace.d.ts +9 -0
- package/src/nodes/core/StackTrace.js +139 -0
- package/src/nodes/core/StructNode.d.ts +37 -0
- package/src/nodes/core/StructNode.js +133 -0
- package/src/nodes/core/StructType.d.ts +10 -0
- package/src/nodes/core/StructType.js +13 -0
- package/src/nodes/core/StructTypeNode.d.ts +57 -0
- package/src/nodes/core/StructTypeNode.js +148 -0
- package/src/nodes/core/SubBuildNode.d.ts +14 -0
- package/src/nodes/core/SubBuildNode.js +89 -0
- package/src/nodes/core/TempNode.d.ts +16 -0
- package/src/nodes/core/TempNode.js +88 -0
- package/src/nodes/core/UniformGroupNode.d.ts +22 -0
- package/src/nodes/core/UniformGroupNode.js +168 -0
- package/src/nodes/core/UniformNode.d.ts +162 -0
- package/src/nodes/core/UniformNode.js +273 -0
- package/src/nodes/core/VarNode.d.ts +45 -0
- package/src/nodes/core/VarNode.js +374 -0
- package/src/nodes/core/VaryingNode.d.ts +36 -0
- package/src/nodes/core/VaryingNode.js +220 -0
- package/src/nodes/core/constants.d.ts +72 -0
- package/src/nodes/core/constants.js +68 -0
- package/src/nodes/display/BlendModes.d.ts +76 -0
- package/src/nodes/display/BlendModes.js +131 -0
- package/src/nodes/display/BumpMapNode.d.ts +16 -0
- package/src/nodes/display/BumpMapNode.js +122 -0
- package/src/nodes/display/ColorAdjustment.d.ts +54 -0
- package/src/nodes/display/ColorAdjustment.js +159 -0
- package/src/nodes/display/ColorSpaceFunctions.d.ts +5 -0
- package/src/nodes/display/ColorSpaceFunctions.js +54 -0
- package/src/nodes/display/ColorSpaceNode.d.ts +54 -0
- package/src/nodes/display/ColorSpaceNode.js +164 -0
- package/src/nodes/display/FrontFacingNode.d.ts +71 -0
- package/src/nodes/display/FrontFacingNode.js +131 -0
- package/src/nodes/display/NormalMapNode.d.ts +18 -0
- package/src/nodes/display/NormalMapNode.js +153 -0
- package/src/nodes/display/PassNode.d.ts +124 -0
- package/src/nodes/display/PassNode.js +1108 -0
- package/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
- package/src/nodes/display/PremultiplyAlphaFunctions.js +39 -0
- package/src/nodes/display/RenderOutputNode.d.ts +29 -0
- package/src/nodes/display/RenderOutputNode.js +159 -0
- package/src/nodes/display/ScreenNode.d.ts +44 -0
- package/src/nodes/display/ScreenNode.js +249 -0
- package/src/nodes/display/ToneMappingFunctions.d.ts +13 -0
- package/src/nodes/display/ToneMappingFunctions.js +242 -0
- package/src/nodes/display/ToneMappingNode.d.ts +29 -0
- package/src/nodes/display/ToneMappingNode.js +147 -0
- package/src/nodes/display/ToonOutlinePassNode.d.ts +23 -0
- package/src/nodes/display/ToonOutlinePassNode.js +191 -0
- package/src/nodes/display/ViewportDepthNode.d.ts +41 -0
- package/src/nodes/display/ViewportDepthNode.js +342 -0
- package/src/nodes/display/ViewportDepthTextureNode.d.ts +14 -0
- package/src/nodes/display/ViewportDepthTextureNode.js +63 -0
- package/src/nodes/display/ViewportSharedTextureNode.d.ts +16 -0
- package/src/nodes/display/ViewportSharedTextureNode.js +73 -0
- package/src/nodes/display/ViewportTextureNode.d.ts +33 -0
- package/src/nodes/display/ViewportTextureNode.js +256 -0
- package/src/nodes/fog/Fog.d.ts +27 -0
- package/src/nodes/fog/Fog.js +97 -0
- package/src/nodes/functions/BSDF/BRDF_GGX.d.ts +15 -0
- package/src/nodes/functions/BSDF/BRDF_GGX.js +55 -0
- package/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
- package/src/nodes/functions/BSDF/BRDF_Lambert.js +9 -0
- package/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +6 -0
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +57 -0
- package/src/nodes/functions/BSDF/DFGLUT.d.ts +13 -0
- package/src/nodes/functions/BSDF/DFGLUT.js +57 -0
- package/src/nodes/functions/BSDF/D_GGX.d.ts +9 -0
- package/src/nodes/functions/BSDF/D_GGX.js +23 -0
- package/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +9 -0
- package/src/nodes/functions/BSDF/D_GGX_Anisotropic.js +28 -0
- package/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts +8 -0
- package/src/nodes/functions/BSDF/EnvironmentBRDF.js +13 -0
- package/src/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
- package/src/nodes/functions/BSDF/F_Schlick.js +16 -0
- package/src/nodes/functions/BSDF/LTC.d.ts +13 -0
- package/src/nodes/functions/BSDF/LTC.js +175 -0
- package/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +9 -0
- package/src/nodes/functions/BSDF/Schlick_to_F0.js +21 -0
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +10 -0
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.js +26 -0
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +15 -0
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.js +29 -0
- package/src/nodes/functions/BasicLightingModel.d.ts +7 -0
- package/src/nodes/functions/BasicLightingModel.js +100 -0
- package/src/nodes/functions/PhongLightingModel.d.ts +7 -0
- package/src/nodes/functions/PhongLightingModel.js +99 -0
- package/src/nodes/functions/PhysicalLightingModel.d.ts +40 -0
- package/src/nodes/functions/PhysicalLightingModel.js +936 -0
- package/src/nodes/functions/ShadowMaskModel.d.ts +8 -0
- package/src/nodes/functions/ShadowMaskModel.js +58 -0
- package/src/nodes/functions/ToonLightingModel.d.ts +4 -0
- package/src/nodes/functions/ToonLightingModel.js +70 -0
- package/src/nodes/functions/VolumetricLightingModel.d.ts +6 -0
- package/src/nodes/functions/VolumetricLightingModel.js +216 -0
- package/src/nodes/functions/material/getAlphaHashThreshold.d.ts +5 -0
- package/src/nodes/functions/material/getAlphaHashThreshold.js +68 -0
- package/src/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
- package/src/nodes/functions/material/getGeometryRoughness.js +19 -0
- package/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +9 -0
- package/src/nodes/functions/material/getParallaxCorrectNormal.js +37 -0
- package/src/nodes/functions/material/getRoughness.d.ts +6 -0
- package/src/nodes/functions/material/getRoughness.js +18 -0
- package/src/nodes/functions/material/getShIrradianceAt.d.ts +5 -0
- package/src/nodes/functions/material/getShIrradianceAt.js +28 -0
- package/src/nodes/geometry/RangeNode.d.ts +62 -0
- package/src/nodes/geometry/RangeNode.js +210 -0
- package/src/nodes/gpgpu/AtomicFunctionNode.d.ts +91 -0
- package/src/nodes/gpgpu/AtomicFunctionNode.js +325 -0
- package/src/nodes/gpgpu/BarrierNode.d.ts +15 -0
- package/src/nodes/gpgpu/BarrierNode.js +107 -0
- package/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +22 -0
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +227 -0
- package/src/nodes/gpgpu/ComputeNode.d.ts +50 -0
- package/src/nodes/gpgpu/ComputeNode.js +313 -0
- package/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +99 -0
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +583 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +24 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +272 -0
- package/src/nodes/lighting/AONode.d.ts +8 -0
- package/src/nodes/lighting/AONode.js +45 -0
- package/src/nodes/lighting/AmbientLightNode.d.ts +8 -0
- package/src/nodes/lighting/AmbientLightNode.js +35 -0
- package/src/nodes/lighting/AnalyticLightNode.d.ts +32 -0
- package/src/nodes/lighting/AnalyticLightNode.js +309 -0
- package/src/nodes/lighting/BasicEnvironmentNode.d.ts +10 -0
- package/src/nodes/lighting/BasicEnvironmentNode.js +49 -0
- package/src/nodes/lighting/BasicLightMapNode.d.ts +8 -0
- package/src/nodes/lighting/BasicLightMapNode.js +49 -0
- package/src/nodes/lighting/DirectionalLightNode.d.ts +8 -0
- package/src/nodes/lighting/DirectionalLightNode.js +39 -0
- package/src/nodes/lighting/EnvironmentNode.d.ts +8 -0
- package/src/nodes/lighting/EnvironmentNode.js +214 -0
- package/src/nodes/lighting/HemisphereLightNode.d.ts +14 -0
- package/src/nodes/lighting/HemisphereLightNode.js +87 -0
- package/src/nodes/lighting/IESSpotLightNode.d.ts +5 -0
- package/src/nodes/lighting/IESSpotLightNode.js +87 -0
- package/src/nodes/lighting/IrradianceNode.d.ts +8 -0
- package/src/nodes/lighting/IrradianceNode.js +44 -0
- package/src/nodes/lighting/LightProbeNode.d.ts +11 -0
- package/src/nodes/lighting/LightProbeNode.js +73 -0
- package/src/nodes/lighting/LightUtils.d.ts +8 -0
- package/src/nodes/lighting/LightUtils.js +25 -0
- package/src/nodes/lighting/LightingContextNode.d.ts +41 -0
- package/src/nodes/lighting/LightingContextNode.js +123 -0
- package/src/nodes/lighting/LightingNode.d.ts +7 -0
- package/src/nodes/lighting/LightingNode.js +36 -0
- package/src/nodes/lighting/LightsNode.d.ts +48 -0
- package/src/nodes/lighting/LightsNode.js +501 -0
- package/src/nodes/lighting/PointLightNode.d.ts +23 -0
- package/src/nodes/lighting/PointLightNode.js +102 -0
- package/src/nodes/lighting/PointShadowNode.d.ts +25 -0
- package/src/nodes/lighting/PointShadowNode.js +330 -0
- package/src/nodes/lighting/ProjectorLightNode.d.ts +5 -0
- package/src/nodes/lighting/ProjectorLightNode.js +91 -0
- package/src/nodes/lighting/RectAreaLightNode.d.ts +21 -0
- package/src/nodes/lighting/RectAreaLightNode.js +133 -0
- package/src/nodes/lighting/ShadowBaseNode.d.ts +47 -0
- package/src/nodes/lighting/ShadowBaseNode.js +238 -0
- package/src/nodes/lighting/ShadowFilterNode.d.ts +17 -0
- package/src/nodes/lighting/ShadowFilterNode.js +129 -0
- package/src/nodes/lighting/ShadowNode.d.ts +11 -0
- package/src/nodes/lighting/ShadowNode.js +841 -0
- package/src/nodes/lighting/SpotLightNode.d.ts +22 -0
- package/src/nodes/lighting/SpotLightNode.js +168 -0
- package/src/nodes/materialx/DISCLAIMER.md +199 -0
- package/src/nodes/materialx/MaterialXColor.d.ts +5 -0
- package/src/nodes/materialx/MaterialXColor.js +124 -0
- package/src/nodes/materialx/MaterialXColorTransform.d.ts +3 -0
- package/src/nodes/materialx/MaterialXColorTransform.js +20 -0
- package/src/nodes/materialx/MaterialXCore.d.ts +5 -0
- package/src/nodes/materialx/MaterialXCore.js +37 -0
- package/src/nodes/materialx/MaterialXNodes.d.ts +206 -0
- package/src/nodes/materialx/MaterialXNodes.js +189 -0
- package/src/nodes/materialx/MaterialXNoise.d.ts +415 -0
- package/src/nodes/materialx/MaterialXNoise.js +1720 -0
- package/src/nodes/math/BitcastNode.d.ts +24 -0
- package/src/nodes/math/BitcastNode.js +156 -0
- package/src/nodes/math/BitcountNode.d.ts +23 -0
- package/src/nodes/math/BitcountNode.js +453 -0
- package/src/nodes/math/ConditionalNode.d.ts +51 -0
- package/src/nodes/math/ConditionalNode.js +245 -0
- package/src/nodes/math/Hash.d.ts +3 -0
- package/src/nodes/math/Hash.js +21 -0
- package/src/nodes/math/MathNode.d.ts +895 -0
- package/src/nodes/math/MathNode.js +1230 -0
- package/src/nodes/math/MathUtils.d.ts +10 -0
- package/src/nodes/math/MathUtils.js +65 -0
- package/src/nodes/math/OperatorNode.d.ts +709 -0
- package/src/nodes/math/OperatorNode.js +752 -0
- package/src/nodes/math/PackFloatNode.d.ts +24 -0
- package/src/nodes/math/PackFloatNode.js +126 -0
- package/src/nodes/math/Packed4x8IntegerNode.d.ts +49 -0
- package/src/nodes/math/Packed4x8IntegerNode.js +433 -0
- package/src/nodes/math/TriNoise3D.d.ts +11 -0
- package/src/nodes/math/TriNoise3D.js +71 -0
- package/src/nodes/math/UnpackFloatNode.d.ts +21 -0
- package/src/nodes/math/UnpackFloatNode.js +124 -0
- package/src/nodes/parsers/GLSLNodeFunction.d.ts +9 -0
- package/src/nodes/parsers/GLSLNodeFunction.js +168 -0
- package/src/nodes/parsers/GLSLNodeParser.d.ts +8 -0
- package/src/nodes/parsers/GLSLNodeParser.js +25 -0
- package/src/nodes/pmrem/PMREMNode.d.ts +21 -0
- package/src/nodes/pmrem/PMREMNode.js +428 -0
- package/src/nodes/pmrem/PMREMUtils.d.ts +21 -0
- package/src/nodes/pmrem/PMREMUtils.js +354 -0
- package/src/nodes/procedural/Checker.d.ts +3 -0
- package/src/nodes/procedural/Checker.js +22 -0
- package/src/nodes/shapes/Shapes.d.ts +3 -0
- package/src/nodes/shapes/Shapes.js +33 -0
- package/src/nodes/tsl/TSLBase.d.ts +30 -0
- package/src/nodes/tsl/TSLBase.js +36 -0
- package/src/nodes/tsl/TSLCore.d.ts +2420 -0
- package/src/nodes/tsl/TSLCore.js +1265 -0
- package/src/nodes/utils/ArrayElementNode.d.ts +15 -0
- package/src/nodes/utils/ArrayElementNode.js +90 -0
- package/src/nodes/utils/ConvertNode.d.ts +14 -0
- package/src/nodes/utils/ConvertNode.js +100 -0
- package/src/nodes/utils/CubeMapNode.d.ts +12 -0
- package/src/nodes/utils/CubeMapNode.js +237 -0
- package/src/nodes/utils/DebugNode.d.ts +22 -0
- package/src/nodes/utils/DebugNode.js +83 -0
- package/src/nodes/utils/Discard.d.ts +10 -0
- package/src/nodes/utils/Discard.js +24 -0
- package/src/nodes/utils/EquirectUV.d.ts +33 -0
- package/src/nodes/utils/EquirectUV.js +52 -0
- package/src/nodes/utils/EventNode.d.ts +41 -0
- package/src/nodes/utils/EventNode.js +223 -0
- package/src/nodes/utils/FlipNode.d.ts +11 -0
- package/src/nodes/utils/FlipNode.js +106 -0
- package/src/nodes/utils/FunctionOverloadingNode.d.ts +12 -0
- package/src/nodes/utils/FunctionOverloadingNode.js +170 -0
- package/src/nodes/utils/JoinNode.d.ts +14 -0
- package/src/nodes/utils/JoinNode.js +117 -0
- package/src/nodes/utils/LoopNode.d.ts +43 -0
- package/src/nodes/utils/LoopNode.js +390 -0
- package/src/nodes/utils/MatcapUV.d.ts +3 -0
- package/src/nodes/utils/MatcapUV.js +22 -0
- package/src/nodes/utils/MaxMipLevelNode.d.ts +13 -0
- package/src/nodes/utils/MaxMipLevelNode.js +103 -0
- package/src/nodes/utils/MemberNode.d.ts +11 -0
- package/src/nodes/utils/MemberNode.js +120 -0
- package/src/nodes/utils/Oscillators.d.ts +6 -0
- package/src/nodes/utils/Oscillators.js +41 -0
- package/src/nodes/utils/Packing.d.ts +52 -0
- package/src/nodes/utils/Packing.js +64 -0
- package/src/nodes/utils/PostProcessingUtils.d.ts +56 -0
- package/src/nodes/utils/PostProcessingUtils.js +175 -0
- package/src/nodes/utils/RTTNode.d.ts +46 -0
- package/src/nodes/utils/RTTNode.js +370 -0
- package/src/nodes/utils/ReflectorNode.d.ts +61 -0
- package/src/nodes/utils/ReflectorNode.js +634 -0
- package/src/nodes/utils/Remap.d.ts +223 -0
- package/src/nodes/utils/Remap.js +48 -0
- package/src/nodes/utils/RotateNode.d.ts +26 -0
- package/src/nodes/utils/RotateNode.js +180 -0
- package/src/nodes/utils/SampleNode.d.ts +26 -0
- package/src/nodes/utils/SampleNode.js +91 -0
- package/src/nodes/utils/SetNode.d.ts +11 -0
- package/src/nodes/utils/SetNode.js +108 -0
- package/src/nodes/utils/SplitNode.d.ts +14 -0
- package/src/nodes/utils/SplitNode.js +179 -0
- package/src/nodes/utils/SpriteSheetUV.d.ts +7 -0
- package/src/nodes/utils/SpriteSheetUV.js +35 -0
- package/src/nodes/utils/SpriteUtils.d.ts +5 -0
- package/src/nodes/utils/SpriteUtils.js +98 -0
- package/src/nodes/utils/StorageArrayElementNode.d.ts +28 -0
- package/src/nodes/utils/StorageArrayElementNode.js +143 -0
- package/src/nodes/utils/Timer.d.ts +5 -0
- package/src/nodes/utils/Timer.js +26 -0
- package/src/nodes/utils/TriplanarTextures.d.ts +19 -0
- package/src/nodes/utils/TriplanarTextures.js +65 -0
- package/src/nodes/utils/UVUtils.d.ts +19 -0
- package/src/nodes/utils/UVUtils.js +67 -0
- package/src/nodes/utils/ViewportUtils.d.ts +3 -0
- package/src/nodes/utils/ViewportUtils.js +26 -0
- package/src/objects/BatchedMesh.d.ts +280 -0
- package/src/objects/BatchedMesh.js +1696 -0
- package/src/objects/Bone.d.ts +36 -0
- package/src/objects/Bone.js +41 -0
- package/src/objects/ClippingGroup.d.ts +41 -0
- package/src/objects/ClippingGroup.js +68 -0
- package/src/objects/Group.d.ts +37 -0
- package/src/objects/Group.js +41 -0
- package/src/objects/InstancedMesh.d.ts +175 -0
- package/src/objects/InstancedMesh.js +411 -0
- package/src/objects/LOD.d.ts +112 -0
- package/src/objects/LOD.js +329 -0
- package/src/objects/Line.d.ts +96 -0
- package/src/objects/Line.js +341 -0
- package/src/objects/LineLoop.d.ts +40 -0
- package/src/objects/LineLoop.js +37 -0
- package/src/objects/LineSegments.d.ts +41 -0
- package/src/objects/LineSegments.js +74 -0
- package/src/objects/Mesh.d.ts +111 -0
- package/src/objects/Mesh.js +508 -0
- package/src/objects/Points.d.ts +75 -0
- package/src/objects/Points.js +240 -0
- package/src/objects/Skeleton.d.ts +120 -0
- package/src/objects/Skeleton.js +383 -0
- package/src/objects/SkinnedMesh.d.ts +163 -0
- package/src/objects/SkinnedMesh.js +370 -0
- package/src/objects/Sprite.d.ts +82 -0
- package/src/objects/Sprite.js +257 -0
- package/src/renderers/WebGL3DRenderTarget.d.ts +29 -0
- package/src/renderers/WebGL3DRenderTarget.js +48 -0
- package/src/renderers/WebGLArrayRenderTarget.d.ts +29 -0
- package/src/renderers/WebGLArrayRenderTarget.js +48 -0
- package/src/renderers/WebGLCubeRenderTarget.d.ts +18 -0
- package/src/renderers/WebGLCubeRenderTarget.js +182 -0
- package/src/renderers/WebGLRenderTarget.d.ts +8 -0
- package/src/renderers/WebGLRenderTarget.js +34 -0
- package/src/renderers/WebGLRenderer.d.ts +489 -0
- package/src/renderers/WebGLRenderer.js +3769 -0
- package/src/renderers/common/Animation.js +169 -0
- package/src/renderers/common/Attributes.js +187 -0
- package/src/renderers/common/Backend.d.ts +29 -0
- package/src/renderers/common/Backend.js +841 -0
- package/src/renderers/common/Background.js +225 -0
- package/src/renderers/common/BindGroup.js +45 -0
- package/src/renderers/common/Binding.js +71 -0
- package/src/renderers/common/Bindings.js +535 -0
- package/src/renderers/common/BlendMode.d.ts +22 -0
- package/src/renderers/common/BlendMode.js +143 -0
- package/src/renderers/common/Buffer.js +136 -0
- package/src/renderers/common/BufferUtils.d.ts +28 -0
- package/src/renderers/common/BufferUtils.js +58 -0
- package/src/renderers/common/BundleGroup.d.ts +46 -0
- package/src/renderers/common/BundleGroup.js +87 -0
- package/src/renderers/common/CanvasTarget.d.ts +158 -0
- package/src/renderers/common/CanvasTarget.js +341 -0
- package/src/renderers/common/CapabilityTier.js +18 -0
- package/src/renderers/common/ChainMap.js +122 -0
- package/src/renderers/common/ClippingContext.d.ts +134 -0
- package/src/renderers/common/ClippingContext.js +280 -0
- package/src/renderers/common/Color4.d.ts +53 -0
- package/src/renderers/common/Color4.js +86 -0
- package/src/renderers/common/ComputePipeline.js +41 -0
- package/src/renderers/common/Constants.d.ts +9 -0
- package/src/renderers/common/Constants.js +10 -0
- package/src/renderers/common/CubeRenderTarget.d.ts +47 -0
- package/src/renderers/common/CubeRenderTarget.js +147 -0
- package/src/renderers/common/DataMap.js +90 -0
- package/src/renderers/common/DirectRenderPipeline.d.ts +20 -0
- package/src/renderers/common/DirectRenderPipeline.js +233 -0
- package/src/renderers/common/GPUInstanceCuller.d.ts +43 -0
- package/src/renderers/common/GPUInstanceCuller.js +372 -0
- package/src/renderers/common/GPUTimings.js +66 -0
- package/src/renderers/common/Geometries.js +485 -0
- package/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
- package/src/renderers/common/IndirectStorageBufferAttribute.js +38 -0
- package/src/renderers/common/Info.d.ts +194 -0
- package/src/renderers/common/Info.js +542 -0
- package/src/renderers/common/InspectorBase.d.ts +129 -0
- package/src/renderers/common/InspectorBase.js +180 -0
- package/src/renderers/common/Lighting.d.ts +55 -0
- package/src/renderers/common/Lighting.js +112 -0
- package/src/renderers/common/Pipeline.js +35 -0
- package/src/renderers/common/Pipelines.js +500 -0
- package/src/renderers/common/PostProcessing.d.ts +21 -0
- package/src/renderers/common/PostProcessing.js +28 -0
- package/src/renderers/common/ProgrammableStage.js +78 -0
- package/src/renderers/common/QuadMesh.d.ts +19 -0
- package/src/renderers/common/QuadMesh.js +126 -0
- package/src/renderers/common/ReadbackBuffer.d.ts +63 -0
- package/src/renderers/common/ReadbackBuffer.js +78 -0
- package/src/renderers/common/RenderBundle.js +26 -0
- package/src/renderers/common/RenderBundles.js +71 -0
- package/src/renderers/common/RenderContext.js +289 -0
- package/src/renderers/common/RenderContexts.js +100 -0
- package/src/renderers/common/RenderList.js +475 -0
- package/src/renderers/common/RenderLists.js +125 -0
- package/src/renderers/common/RenderObject.js +989 -0
- package/src/renderers/common/RenderObjectPipeline.js +40 -0
- package/src/renderers/common/RenderObjects.js +245 -0
- package/src/renderers/common/RenderPipeline.d.ts +26 -0
- package/src/renderers/common/RenderPipeline.js +263 -0
- package/src/renderers/common/Renderer.d.ts +1209 -0
- package/src/renderers/common/Renderer.js +4115 -0
- package/src/renderers/common/RendererUtils.d.ts +77 -0
- package/src/renderers/common/RendererUtils.js +200 -0
- package/src/renderers/common/SampledTexture.js +152 -0
- package/src/renderers/common/Sampler.js +133 -0
- package/src/renderers/common/Storage3DTexture.d.ts +42 -0
- package/src/renderers/common/Storage3DTexture.js +116 -0
- package/src/renderers/common/StorageArrayTexture.d.ts +31 -0
- package/src/renderers/common/StorageArrayTexture.js +84 -0
- package/src/renderers/common/StorageBuffer.js +53 -0
- package/src/renderers/common/StorageBufferAttribute.d.ts +7 -0
- package/src/renderers/common/StorageBufferAttribute.js +46 -0
- package/src/renderers/common/StorageInstancedBufferAttribute.d.ts +8 -0
- package/src/renderers/common/StorageInstancedBufferAttribute.js +46 -0
- package/src/renderers/common/StorageTexture.d.ts +7 -0
- package/src/renderers/common/StorageTexture.js +86 -0
- package/src/renderers/common/Textures.js +656 -0
- package/src/renderers/common/TimestampQueryPool.d.ts +120 -0
- package/src/renderers/common/TimestampQueryPool.js +173 -0
- package/src/renderers/common/Uniform.js +375 -0
- package/src/renderers/common/UniformBuffer.js +34 -0
- package/src/renderers/common/UniformsGroup.js +570 -0
- package/src/renderers/common/XRManager.d.ts +293 -0
- package/src/renderers/common/XRManager.js +2009 -0
- package/src/renderers/common/XRRenderTarget.js +91 -0
- package/src/renderers/common/extras/PMREMGenerator.d.ts +52 -0
- package/src/renderers/common/extras/PMREMGenerator.js +951 -0
- package/src/renderers/common/nodes/NodeBuilderState.js +160 -0
- package/src/renderers/common/nodes/NodeLibrary.d.ts +129 -0
- package/src/renderers/common/nodes/NodeLibrary.js +196 -0
- package/src/renderers/common/nodes/NodeManager.js +1170 -0
- package/src/renderers/common/nodes/NodeSampledTexture.js +140 -0
- package/src/renderers/common/nodes/NodeSampler.js +62 -0
- package/src/renderers/common/nodes/NodeStorageBuffer.js +74 -0
- package/src/renderers/common/nodes/NodeUniform.js +418 -0
- package/src/renderers/common/nodes/NodeUniformBuffer.js +120 -0
- package/src/renderers/common/nodes/NodeUniformsGroup.js +51 -0
- package/src/renderers/shaders/DFGLUTData.js +50 -0
- package/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.js +68 -0
- package/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.js +16 -0
- package/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.js +26 -0
- package/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.js +8 -0
- package/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.js +49 -0
- package/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/bsdfs.glsl.js +33 -0
- package/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.js +43 -0
- package/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.js +10 -0
- package/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.js +21 -0
- package/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.js +78 -0
- package/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/color_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/color_vertex.glsl.js +29 -0
- package/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.js +3 -0
- package/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.js +15 -0
- package/src/renderers/shaders/ShaderChunk/common.glsl.js +134 -0
- package/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js +186 -0
- package/src/renderers/shaders/ShaderChunk/default_fragment.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk/default_vertex.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js +59 -0
- package/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.js +20 -0
- package/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.js +17 -0
- package/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js +14 -0
- package/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js +58 -0
- package/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.js +21 -0
- package/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.js +22 -0
- package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +117 -0
- package/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.js +37 -0
- package/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.js +17 -0
- package/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.js +19 -0
- package/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.js +27 -0
- package/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.js +120 -0
- package/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.js +14 -0
- package/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.js +8 -0
- package/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.js +80 -0
- package/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js +262 -0
- package/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.js +19 -0
- package/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js +62 -0
- package/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.js +5 -0
- package/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.js +28 -0
- package/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.js +236 -0
- package/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.js +32 -0
- package/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js +167 -0
- package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +660 -0
- package/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.js +4 -0
- package/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.js +26 -0
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js +8 -0
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js +8 -0
- package/src/renderers/shaders/ShaderChunk/map_fragment.glsl.js +17 -0
- package/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.js +27 -0
- package/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.js +27 -0
- package/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.js +12 -0
- package/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.js +24 -0
- package/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.js +14 -0
- package/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.js +16 -0
- package/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.js +26 -0
- package/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.js +16 -0
- package/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.js +76 -0
- package/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.js +40 -0
- package/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.js +14 -0
- package/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.js +14 -0
- package/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.js +20 -0
- package/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.js +43 -0
- package/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.js +11 -0
- package/src/renderers/shaders/ShaderChunk/packing.glsl.js +116 -0
- package/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/project_vertex.glsl.js +19 -0
- package/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.js +12 -0
- package/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +458 -0
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.js +80 -0
- package/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.js +85 -0
- package/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.js +81 -0
- package/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.js +10 -0
- package/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.js +25 -0
- package/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.js +15 -0
- package/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.js +20 -0
- package/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.js +14 -0
- package/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.js +7 -0
- package/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.js +200 -0
- package/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js +36 -0
- package/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.js +235 -0
- package/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.js +119 -0
- package/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.js +145 -0
- package/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.js +122 -0
- package/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.js +21 -0
- package/src/renderers/shaders/ShaderChunk.d.ts +144 -0
- package/src/renderers/shaders/ShaderChunk.js +272 -0
- package/src/renderers/shaders/ShaderLib/background.glsl.js +40 -0
- package/src/renderers/shaders/ShaderLib/backgroundCube.glsl.js +62 -0
- package/src/renderers/shaders/ShaderLib/cube.glsl.js +36 -0
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +117 -0
- package/src/renderers/shaders/ShaderLib/distance.glsl.js +77 -0
- package/src/renderers/shaders/ShaderLib/equirect.glsl.js +35 -0
- package/src/renderers/shaders/ShaderLib/linedashed.glsl.js +76 -0
- package/src/renderers/shaders/ShaderLib/meshbasic.glsl.js +116 -0
- package/src/renderers/shaders/ShaderLib/meshlambert.glsl.js +126 -0
- package/src/renderers/shaders/ShaderLib/meshmatcap.glsl.js +112 -0
- package/src/renderers/shaders/ShaderLib/meshnormal.glsl.js +86 -0
- package/src/renderers/shaders/ShaderLib/meshphong.glsl.js +128 -0
- package/src/renderers/shaders/ShaderLib/meshphysical.glsl.js +228 -0
- package/src/renderers/shaders/ShaderLib/meshtoon.glsl.js +118 -0
- package/src/renderers/shaders/ShaderLib/points.glsl.js +87 -0
- package/src/renderers/shaders/ShaderLib/shadow.glsl.js +58 -0
- package/src/renderers/shaders/ShaderLib/sprite.glsl.js +79 -0
- package/src/renderers/shaders/ShaderLib/vsm.glsl.js +51 -0
- package/src/renderers/shaders/ShaderLib.d.ts +29 -0
- package/src/renderers/shaders/ShaderLib.js +363 -0
- package/src/renderers/shaders/UniformsLib.d.ts +209 -0
- package/src/renderers/shaders/UniformsLib.js +250 -0
- package/src/renderers/shaders/UniformsUtils.d.ts +14 -0
- package/src/renderers/shaders/UniformsUtils.js +154 -0
- package/src/renderers/webgl/WebGLAnimation.js +54 -0
- package/src/renderers/webgl/WebGLAttributes.d.ts +23 -0
- package/src/renderers/webgl/WebGLAttributes.js +237 -0
- package/src/renderers/webgl/WebGLBackground.js +303 -0
- package/src/renderers/webgl/WebGLBindingStates.d.ts +26 -0
- package/src/renderers/webgl/WebGLBindingStates.js +666 -0
- package/src/renderers/webgl/WebGLBufferRenderer.d.ts +15 -0
- package/src/renderers/webgl/WebGLBufferRenderer.js +57 -0
- package/src/renderers/webgl/WebGLCapabilities.d.ts +48 -0
- package/src/renderers/webgl/WebGLCapabilities.js +150 -0
- package/src/renderers/webgl/WebGLClipping.d.ts +26 -0
- package/src/renderers/webgl/WebGLClipping.js +171 -0
- package/src/renderers/webgl/WebGLEnvironments.d.ts +8 -0
- package/src/renderers/webgl/WebGLEnvironments.js +228 -0
- package/src/renderers/webgl/WebGLExtensions.d.ts +7 -0
- package/src/renderers/webgl/WebGLExtensions.js +61 -0
- package/src/renderers/webgl/WebGLGeometries.d.ts +13 -0
- package/src/renderers/webgl/WebGLGeometries.js +186 -0
- package/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +13 -0
- package/src/renderers/webgl/WebGLIndexedBufferRenderer.js +68 -0
- package/src/renderers/webgl/WebGLInfo.d.ts +39 -0
- package/src/renderers/webgl/WebGLInfo.js +73 -0
- package/src/renderers/webgl/WebGLLights.d.ts +57 -0
- package/src/renderers/webgl/WebGLLights.js +654 -0
- package/src/renderers/webgl/WebGLMaterials.js +608 -0
- package/src/renderers/webgl/WebGLMorphtargets.js +168 -0
- package/src/renderers/webgl/WebGLObjects.d.ts +19 -0
- package/src/renderers/webgl/WebGLObjects.js +94 -0
- package/src/renderers/webgl/WebGLOutput.js +283 -0
- package/src/renderers/webgl/WebGLProgram.d.ts +22 -0
- package/src/renderers/webgl/WebGLProgram.js +1035 -0
- package/src/renderers/webgl/WebGLPrograms.d.ts +242 -0
- package/src/renderers/webgl/WebGLPrograms.js +694 -0
- package/src/renderers/webgl/WebGLProperties.d.ts +9 -0
- package/src/renderers/webgl/WebGLProperties.js +55 -0
- package/src/renderers/webgl/WebGLRenderLists.d.ts +68 -0
- package/src/renderers/webgl/WebGLRenderLists.js +257 -0
- package/src/renderers/webgl/WebGLRenderStates.js +124 -0
- package/src/renderers/webgl/WebGLShader.d.ts +1 -0
- package/src/renderers/webgl/WebGLShader.js +12 -0
- package/src/renderers/webgl/WebGLShaderCache.js +118 -0
- package/src/renderers/webgl/WebGLShadowMap.d.ts +33 -0
- package/src/renderers/webgl/WebGLShadowMap.js +611 -0
- package/src/renderers/webgl/WebGLState.d.ts +399 -0
- package/src/renderers/webgl/WebGLState.js +1370 -0
- package/src/renderers/webgl/WebGLTextures.d.ts +31 -0
- package/src/renderers/webgl/WebGLTextures.js +2519 -0
- package/src/renderers/webgl/WebGLUniforms.d.ts +5 -0
- package/src/renderers/webgl/WebGLUniforms.js +1203 -0
- package/src/renderers/webgl/WebGLUniformsGroups.d.ts +17 -0
- package/src/renderers/webgl/WebGLUniformsGroups.js +441 -0
- package/src/renderers/webgl/WebGLUtils.d.ts +11 -0
- package/src/renderers/webgl/WebGLUtils.js +217 -0
- package/src/renderers/webgl-fallback/WebGLBackend.d.ts +16 -0
- package/src/renderers/webgl-fallback/WebGLBackend.js +2950 -0
- package/src/renderers/webgl-fallback/WebGLBufferRenderer.js +99 -0
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +9 -0
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +1860 -0
- package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +359 -0
- package/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts +51 -0
- package/src/renderers/webgl-fallback/utils/WebGLCapabilities.js +105 -0
- package/src/renderers/webgl-fallback/utils/WebGLConstants.js +13 -0
- package/src/renderers/webgl-fallback/utils/WebGLExtensions.js +83 -0
- package/src/renderers/webgl-fallback/utils/WebGLState.js +1507 -0
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +1381 -0
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +406 -0
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +319 -0
- package/src/renderers/webgpu/WebGPUBackend.d.ts +32 -0
- package/src/renderers/webgpu/WebGPUBackend.js +3321 -0
- package/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
- package/src/renderers/webgpu/WebGPURenderer.Nodes.js +69 -0
- package/src/renderers/webgpu/WebGPURenderer.d.ts +17 -0
- package/src/renderers/webgpu/WebGPURenderer.js +107 -0
- package/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.js +48 -0
- package/src/renderers/webgpu/descriptors/GPUBufferDescriptor.js +57 -0
- package/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.js +30 -0
- package/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.js +38 -0
- package/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.js +48 -0
- package/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.js +47 -0
- package/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.js +50 -0
- package/src/renderers/webgpu/descriptors/GPUExtent3D.js +51 -0
- package/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.js +39 -0
- package/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.js +47 -0
- package/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.js +74 -0
- package/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.js +72 -0
- package/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.js +99 -0
- package/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.js +72 -0
- package/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.js +49 -0
- package/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.js +130 -0
- package/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.js +119 -0
- package/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.js +46 -0
- package/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.js +57 -0
- package/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.js +48 -0
- package/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.js +61 -0
- package/src/renderers/webgpu/descriptors/GPUTextureDescriptor.js +99 -0
- package/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.js +108 -0
- package/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +13 -0
- package/src/renderers/webgpu/nodes/BasicNodeLibrary.js +66 -0
- package/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +91 -0
- package/src/renderers/webgpu/nodes/StandardNodeLibrary.js +99 -0
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +9 -0
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +2759 -0
- package/src/renderers/webgpu/nodes/WGSLNodeFunction.js +188 -0
- package/src/renderers/webgpu/nodes/WGSLNodeParser.js +25 -0
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +573 -0
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +683 -0
- package/src/renderers/webgpu/utils/WebGPUCapabilities.js +149 -0
- package/src/renderers/webgpu/utils/WebGPUConstants.d.ts +348 -0
- package/src/renderers/webgpu/utils/WebGPUConstants.js +354 -0
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +1007 -0
- package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +452 -0
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +1884 -0
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +337 -0
- package/src/renderers/webgpu/utils/WebGPUUniformArena.js +240 -0
- package/src/renderers/webgpu/utils/WebGPUUtils.js +342 -0
- package/src/renderers/webxr/WebXRController.d.ts +67 -0
- package/src/renderers/webxr/WebXRController.js +440 -0
- package/src/renderers/webxr/WebXRDepthSensing.d.ts +21 -0
- package/src/renderers/webxr/WebXRDepthSensing.js +155 -0
- package/src/renderers/webxr/WebXRManager.d.ts +89 -0
- package/src/renderers/webxr/WebXRManager.js +1126 -0
- package/src/scenes/Fog.d.ts +71 -0
- package/src/scenes/Fog.js +98 -0
- package/src/scenes/FogExp2.d.ts +61 -0
- package/src/scenes/FogExp2.js +86 -0
- package/src/scenes/Scene.d.ts +104 -0
- package/src/scenes/Scene.js +165 -0
- package/src/textures/CanvasTexture.d.ts +51 -0
- package/src/textures/CanvasTexture.js +45 -0
- package/src/textures/CompressedArrayTexture.d.ts +65 -0
- package/src/textures/CompressedArrayTexture.js +105 -0
- package/src/textures/CompressedCubeTexture.d.ts +13 -0
- package/src/textures/CompressedCubeTexture.js +48 -0
- package/src/textures/CompressedTexture.d.ts +92 -0
- package/src/textures/CompressedTexture.js +86 -0
- package/src/textures/CubeDepthTexture.d.ts +40 -0
- package/src/textures/CubeDepthTexture.js +76 -0
- package/src/textures/CubeTexture.d.ts +82 -0
- package/src/textures/CubeTexture.js +81 -0
- package/src/textures/Data3DTexture.d.ts +94 -0
- package/src/textures/Data3DTexture.js +128 -0
- package/src/textures/DataArrayTexture.d.ts +123 -0
- package/src/textures/DataArrayTexture.js +150 -0
- package/src/textures/DataTexture.d.ts +112 -0
- package/src/textures/DataTexture.js +87 -0
- package/src/textures/DepthTexture.d.ts +105 -0
- package/src/textures/DepthTexture.js +104 -0
- package/src/textures/ExternalTexture.d.ts +14 -0
- package/src/textures/ExternalTexture.js +53 -0
- package/src/textures/FramebufferTexture.d.ts +67 -0
- package/src/textures/FramebufferTexture.js +85 -0
- package/src/textures/HTMLTexture.d.ts +27 -0
- package/src/textures/HTMLTexture.js +74 -0
- package/src/textures/Texture.d.ts +565 -0
- package/src/textures/Texture.js +812 -0
- package/src/textures/TextureSource.d.ts +99 -0
- package/src/textures/TextureSource.js +261 -0
- package/src/textures/VideoFrameTexture.d.ts +27 -0
- package/src/textures/VideoFrameTexture.js +72 -0
- package/src/textures/VideoTexture.d.ts +90 -0
- package/src/textures/VideoTexture.js +127 -0
- package/src/upe.d.ts +5 -0
- package/src/upe.js +17 -0
- package/src/utils.d.ts +36 -0
- package/src/utils.js +493 -0
|
@@ -0,0 +1,1358 @@
|
|
|
1
|
+
import { Break, Continue, Fn, If, Loop, abs, bool, cross, distance, div, dot, float, getScreenPosition, getViewPosition, int, logarithmicDepthToViewZ, luminance, max, min, mix, mul, nodeObject, normalize, orthographicDepthToViewZ, passTexture, perspectiveDepthToViewZ, reference, reflect, sub, texture, trunc, uniform, uv, vec2, vec3, vec4, viewZToPerspectiveDepth, context } from 'three/tsl';
|
|
2
|
+
import { HalfFloatType, LinearFilter, LinearMipmapLinearFilter, Matrix4, NodeMaterial, NodeUpdateType, QuadMesh, RenderTarget, RendererUtils, TempNode, Vector2, Vector3 } from 'three/webgpu';
|
|
3
|
+
import { bindAnalyticNoise } from '../utils/RNoise.js';
|
|
4
|
+
import { ENV_RAY_LENGTH, getSpecularDominantFactor, ggxReflectionSample } from '../utils/SpecularHelpers.js';
|
|
5
|
+
import { boxBlur } from './boxBlur.js';
|
|
6
|
+
import ImportanceSampledEnvironment from './ImportanceSampledEnvironment.js';
|
|
7
|
+
|
|
8
|
+
const _quadMesh = /*@__PURE__*/ new QuadMesh();
|
|
9
|
+
const _size = /*@__PURE__*/ new Vector2();
|
|
10
|
+
let _rendererState;
|
|
11
|
+
|
|
12
|
+
// Maximum ray-march step count; `quality` (0..1) scales it to a fixed per-ray count.
|
|
13
|
+
const MAX_STEPS = 64;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {Object} SSRNodeOptions
|
|
17
|
+
* @property {boolean} [stochastic=false] - When `false`, traces a single mirror reflection and softens roughness with a blur pass (first-generation SSR). When `true`, varies the reflection direction per pixel with stochastic GGX rays (second-generation SSR); higher quality on rough/glossy surfaces but noisier, so it expects a temporal/spatial denoiser downstream.
|
|
18
|
+
* @property {Node<float>} [metalnessNode=null] - Per-pixel metalness. Drives GGX reflection sampling and, with `reflectNonMetals=false`, the non-metal early-out.
|
|
19
|
+
* @property {Node<float>} [roughnessNode=null] - Per-pixel roughness. Drives GGX sampling and the blur mip selection.
|
|
20
|
+
* @property {boolean} [reflectNonMetals=false] - Only used when `stochastic=false`. When `false`, non-metallic surfaces are discarded for a noticeable performance gain; set `true` to also reflect dielectrics (e.g. marble, polished wood, plastic).
|
|
21
|
+
* @property {Texture} [environmentNode=null] - Equirectangular HDR environment map with CPU-side `image.data` (e.g. from RGBELoader). Not compatible with PMREM / `scene.environment` cubemaps.
|
|
22
|
+
* @property {boolean} [envImportanceSampling=false] - When `true`, precomputes env-luminance CDF tables and uses MIS for environment misses. Build-time only.
|
|
23
|
+
* @property {Node} [diffuseNode=null] - Scene diffuse / base color. Defaults to `vec3(1)` in the shader when omitted.
|
|
24
|
+
* @property {boolean} [binaryRefine=false] - Sub-step binary-search refinement of detected hits. Compile-time constant (baked into the shader at construction).
|
|
25
|
+
* @property {Camera} [camera=null] - Camera the scene is rendered with. Inferred from the color pass when omitted.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Post processing node for computing screen space reflections (SSR).
|
|
30
|
+
*
|
|
31
|
+
* Reference: {@link https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html}
|
|
32
|
+
*
|
|
33
|
+
* @augments TempNode
|
|
34
|
+
* @three_import import { ssr } from 'three/addons/tsl/display/SSRNode.js';
|
|
35
|
+
*/
|
|
36
|
+
class SSRNode extends TempNode {
|
|
37
|
+
|
|
38
|
+
static get type() {
|
|
39
|
+
|
|
40
|
+
return 'SSRNode';
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Constructs a new SSR node.
|
|
46
|
+
*
|
|
47
|
+
* @param {Node<vec4>} colorNode - The node that represents the beauty pass.
|
|
48
|
+
* @param {Node<float>} depthNode - A node that represents the beauty pass's depth.
|
|
49
|
+
* @param {Node<vec3>} normalNode - A node that represents the beauty pass's normals.
|
|
50
|
+
* @param {SSRNodeOptions} [options] - Optional inputs for material and environment data.
|
|
51
|
+
*/
|
|
52
|
+
constructor( colorNode, depthNode, normalNode, options = {} ) {
|
|
53
|
+
|
|
54
|
+
super( 'vec4' );
|
|
55
|
+
|
|
56
|
+
const {
|
|
57
|
+
stochastic = false,
|
|
58
|
+
metalnessNode = null,
|
|
59
|
+
roughnessNode = null,
|
|
60
|
+
reflectNonMetals = false,
|
|
61
|
+
environmentNode = null,
|
|
62
|
+
envImportanceSampling = false,
|
|
63
|
+
diffuseNode = null,
|
|
64
|
+
binaryRefine = false
|
|
65
|
+
} = options;
|
|
66
|
+
|
|
67
|
+
let camera = options.camera ?? null;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* When `true`, the reflection direction is varied per pixel with stochastic GGX rays
|
|
71
|
+
* (second-generation SSR). When `false`, a single mirror reflection is traced and
|
|
72
|
+
* roughness is softened with a blur pass (first-generation SSR).
|
|
73
|
+
*
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
*/
|
|
76
|
+
this.stochastic = stochastic;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* When `true`, env-luminance CDF tables are built and MIS is used for environment misses.
|
|
80
|
+
* Fixed at construction time.
|
|
81
|
+
*
|
|
82
|
+
* @type {boolean}
|
|
83
|
+
*/
|
|
84
|
+
this.envImportanceSampling = envImportanceSampling;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The node that represents the beauty pass.
|
|
88
|
+
*
|
|
89
|
+
* @type {Node<vec4>}
|
|
90
|
+
*/
|
|
91
|
+
this.colorNode = colorNode;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A node that represents the scene's diffuse color (typically the MRT `diffuseColor` attachment).
|
|
95
|
+
* When `null`, the shader uses `vec3(1)`.
|
|
96
|
+
*
|
|
97
|
+
* @type {?Node<vec4>}
|
|
98
|
+
*/
|
|
99
|
+
this.diffuseNode = diffuseNode !== null ? nodeObject( diffuseNode ) : null;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* A node that represents the beauty pass's depth.
|
|
103
|
+
*
|
|
104
|
+
* @type {Node<float>}
|
|
105
|
+
*/
|
|
106
|
+
this.depthNode = depthNode;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* A node that represents the beauty pass's normals.
|
|
110
|
+
*
|
|
111
|
+
* @type {Node<vec3>}
|
|
112
|
+
*/
|
|
113
|
+
this.normalNode = normalNode;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Per-pixel metalness, used to drive the GGX reflection sampling and the non-metal
|
|
117
|
+
* early-out. When `null`, the shader treats surfaces as non-metallic.
|
|
118
|
+
*
|
|
119
|
+
* @type {?Node<float>}
|
|
120
|
+
*/
|
|
121
|
+
this.metalnessNode = metalnessNode;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Per-pixel roughness, used to drive the GGX reflection sampling and the blur mip
|
|
125
|
+
* selection. When `null`, the shader treats surfaces as fully smooth.
|
|
126
|
+
*
|
|
127
|
+
* @type {?Node<float>}
|
|
128
|
+
*/
|
|
129
|
+
this.roughnessNode = roughnessNode;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Only used when {@link SSRNode#stochastic} is `false`. When `false`, non-metallic
|
|
133
|
+
* surfaces are discarded for a noticeable performance gain; set `true` to also
|
|
134
|
+
* reflect dielectrics. Baked into the shader as a compile-time constant; assigning a
|
|
135
|
+
* new value recompiles the SSR material.
|
|
136
|
+
*
|
|
137
|
+
* @type {boolean}
|
|
138
|
+
* @default false
|
|
139
|
+
*/
|
|
140
|
+
this._reflectNonMetals = reflectNonMetals;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The resolution scale. Valid values are in the range
|
|
144
|
+
* `[0,1]`. `1` means best quality but also results in
|
|
145
|
+
* more computational overhead. Setting to `0.5` means
|
|
146
|
+
* the effect is computed in half-resolution.
|
|
147
|
+
*
|
|
148
|
+
* @type {number}
|
|
149
|
+
* @default 1
|
|
150
|
+
*/
|
|
151
|
+
this.resolutionScale = 1;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The `updateBeforeType` is set to `NodeUpdateType.FRAME` since the node renders
|
|
155
|
+
* its effect once per frame in `updateBefore()`.
|
|
156
|
+
*
|
|
157
|
+
* @type {string}
|
|
158
|
+
* @default 'frame'
|
|
159
|
+
*/
|
|
160
|
+
this.updateBeforeType = NodeUpdateType.FRAME;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Controls how far a fragment can reflect. Increasing this value result in more
|
|
164
|
+
* computational overhead but also increases the reflection distance.
|
|
165
|
+
*
|
|
166
|
+
* @type {UniformNode<float>}
|
|
167
|
+
*/
|
|
168
|
+
this.maxDistance = uniform( 1 );
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Controls the cutoff between what counts as a possible reflection hit and what does not.
|
|
172
|
+
*
|
|
173
|
+
* @type {UniformNode<float>}
|
|
174
|
+
*/
|
|
175
|
+
this.thickness = uniform( 0.1 );
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* A multiplier for the overall reflection intensity. `1` leaves the
|
|
179
|
+
* reflections unchanged, lower values dim them and higher values boost them.
|
|
180
|
+
*
|
|
181
|
+
* @type {UniformNode<float>}
|
|
182
|
+
* @default 1
|
|
183
|
+
*/
|
|
184
|
+
this.intensity = uniform( 1 );
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Screen-edge fade width, in UV units. As a screen-space hit approaches a screen
|
|
188
|
+
* border, the reflection is faded over this distance — either toward the environment
|
|
189
|
+
* reflection ({@link SSRNode#screenEdgeFadeBlack} `false`) or to zero intensity
|
|
190
|
+
* (`true`). `0` disables it.
|
|
191
|
+
*
|
|
192
|
+
* @type {UniformNode<float>}
|
|
193
|
+
* @default 0.2
|
|
194
|
+
*/
|
|
195
|
+
this.screenEdgeFade = uniform( 0.2 );
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* When `true`, SSR fades to zero near screen borders instead of blending toward
|
|
199
|
+
* the environment map. Hits are faded by the reflection sample UV; misses are
|
|
200
|
+
* faded by the surface pixel UV.
|
|
201
|
+
*
|
|
202
|
+
* Baked into the shader as a compile-time constant so the unused fade branch is
|
|
203
|
+
* eliminated; assigning a new value recompiles the SSR material.
|
|
204
|
+
*
|
|
205
|
+
* @type {boolean}
|
|
206
|
+
* @default false
|
|
207
|
+
*/
|
|
208
|
+
this._screenEdgeFadeBlack = false;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Absolute env luminance cap. HDR env samples above this are scaled down (hue preserved).
|
|
212
|
+
*
|
|
213
|
+
* @type {UniformNode<float>}
|
|
214
|
+
* @default 10
|
|
215
|
+
*/
|
|
216
|
+
this.maxLuminance = uniform( 10 );
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* This parameter controls how detailed the raymarching process works.
|
|
220
|
+
* The value ranges is `[0,1]` where `1` means best quality (the maximum number
|
|
221
|
+
* of raymarching iterations/samples) and `0` means no samples at all.
|
|
222
|
+
*
|
|
223
|
+
* A quality of `0.5` is usually sufficient for most use cases. Try to keep
|
|
224
|
+
* this parameter as low as possible. Larger values result in noticeable more
|
|
225
|
+
* overhead.
|
|
226
|
+
*
|
|
227
|
+
* @type {UniformNode<float>}
|
|
228
|
+
*/
|
|
229
|
+
this.quality = uniform( 0.5 );
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Mirror bias for the stochastic GGX sampling. Concentrates the reflected rays toward
|
|
233
|
+
* the lobe's narrow (near-mirror) core, trading a small amount of bias for less noise.
|
|
234
|
+
* `0` samples the full VNDF lobe; values toward `1` tighten the cone. Range `[0,1]`.
|
|
235
|
+
*
|
|
236
|
+
* @type {UniformNode<float>}
|
|
237
|
+
* @default 0.5
|
|
238
|
+
*/
|
|
239
|
+
this.mirrorBias = uniform( 0.5 );
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* The quality of the blur. Must be an integer in the range `[1,3]`.
|
|
243
|
+
*
|
|
244
|
+
* Baked into the blur shader as a compile-time constant so the `(size*2+1)²`
|
|
245
|
+
* sample loop unrolls; assigning a new value recompiles the blur material.
|
|
246
|
+
*
|
|
247
|
+
* @type {number}
|
|
248
|
+
* @default 2
|
|
249
|
+
*/
|
|
250
|
+
this._blurQuality = 2;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Enables sub-step binary-search refinement of a detected hit. When on, a coarse
|
|
254
|
+
* crossing is bisected toward the exact intersection (sharper hits, less step
|
|
255
|
+
* aliasing) at the cost of extra depth samples. Baked into the shader as a
|
|
256
|
+
* compile-time constant; assigning a new value rebuilds the SSR material.
|
|
257
|
+
*
|
|
258
|
+
* @type {boolean}
|
|
259
|
+
* @default false
|
|
260
|
+
*/
|
|
261
|
+
this._binaryRefine = binaryRefine;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Non-linear step distribution exponent. `1` = uniform steps; `> 1` concentrates
|
|
265
|
+
* samples near the ray origin — where most short-range reflections are missed — and
|
|
266
|
+
* spaces them out toward maxDistance, as `s = (i / steps) ^ stepExponent`.
|
|
267
|
+
*
|
|
268
|
+
* Baked into the shader as a compile-time constant so `pow()` folds to a few
|
|
269
|
+
* multiplies; assigning a new value recompiles the SSR material. Only used by the
|
|
270
|
+
* stochastic reflection path.
|
|
271
|
+
*
|
|
272
|
+
* @type {number}
|
|
273
|
+
* @default 2
|
|
274
|
+
*/
|
|
275
|
+
this._stepExponent = 2;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* HDR environment map for screen-space misses.
|
|
279
|
+
*
|
|
280
|
+
* @type {?Texture}
|
|
281
|
+
*/
|
|
282
|
+
this.environmentNode = environmentNode;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* A node that represents the history texture for multi-bounce reflections.
|
|
286
|
+
*
|
|
287
|
+
* @type {?Texture}
|
|
288
|
+
*/
|
|
289
|
+
this.historyTexture = null;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* A node that represents the velocity texture for reprojection.
|
|
293
|
+
*
|
|
294
|
+
* @type {?Node<vec2>}
|
|
295
|
+
*/
|
|
296
|
+
this.velocityTexture = null;
|
|
297
|
+
|
|
298
|
+
//
|
|
299
|
+
|
|
300
|
+
if ( camera === null ) {
|
|
301
|
+
|
|
302
|
+
if ( this.colorNode.passNode && this.colorNode.passNode.isPassNode === true ) {
|
|
303
|
+
|
|
304
|
+
camera = this.colorNode.passNode.camera;
|
|
305
|
+
|
|
306
|
+
} else {
|
|
307
|
+
|
|
308
|
+
throw new Error( 'THREE.SSRNode: No camera found. ssr() requires a camera.' );
|
|
309
|
+
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* The camera the scene is rendered with.
|
|
316
|
+
*
|
|
317
|
+
* @type {Camera}
|
|
318
|
+
*/
|
|
319
|
+
this.camera = camera;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The spread of the blur. Automatically set when generating mips.
|
|
323
|
+
*
|
|
324
|
+
* @private
|
|
325
|
+
* @type {UniformNode<int>}
|
|
326
|
+
*/
|
|
327
|
+
this._blurSpread = uniform( 1 );
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Represents the projection matrix of the scene's camera.
|
|
331
|
+
*
|
|
332
|
+
* @private
|
|
333
|
+
* @type {UniformNode<mat4>}
|
|
334
|
+
*/
|
|
335
|
+
this._cameraProjectionMatrix = uniform( camera.projectionMatrix );
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Represents the inverse projection matrix of the scene's camera.
|
|
339
|
+
*
|
|
340
|
+
* @private
|
|
341
|
+
* @type {UniformNode<mat4>}
|
|
342
|
+
*/
|
|
343
|
+
this._cameraProjectionMatrixInverse = uniform( camera.projectionMatrixInverse );
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Represents the near value of the scene's camera.
|
|
347
|
+
*
|
|
348
|
+
* @private
|
|
349
|
+
* @type {ReferenceNode<float>}
|
|
350
|
+
*/
|
|
351
|
+
this._cameraNear = reference( 'near', 'float', camera );
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Represents the far value of the scene's camera.
|
|
355
|
+
*
|
|
356
|
+
* @private
|
|
357
|
+
* @type {ReferenceNode<float>}
|
|
358
|
+
*/
|
|
359
|
+
this._cameraFar = reference( 'far', 'float', camera );
|
|
360
|
+
|
|
361
|
+
this._cameraWorldMatrix = uniform( new Matrix4().copy( camera.matrixWorld ) );
|
|
362
|
+
this._cameraWorldPosition = uniform( new Vector3().copy( camera.position ) );
|
|
363
|
+
|
|
364
|
+
this._cameraViewMatrix = uniform( new Matrix4().copy( camera.matrixWorld ) );
|
|
365
|
+
this._cameraViewMatrixInverse = uniform( new Matrix4().copy( camera.matrixWorldInverse ) );
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* The resolution of the pass.
|
|
369
|
+
*
|
|
370
|
+
* @private
|
|
371
|
+
* @type {UniformNode<vec2>}
|
|
372
|
+
*/
|
|
373
|
+
this._resolution = uniform( new Vector2() );
|
|
374
|
+
|
|
375
|
+
this._noiseIndex = uniform( 0 );
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* CDF-backed environment sampler. Created when {@link setEnvMap} is called.
|
|
379
|
+
*
|
|
380
|
+
* @private
|
|
381
|
+
* @type {?ImportanceSampledEnvironment}
|
|
382
|
+
*/
|
|
383
|
+
this._importanceEnvironment = null;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Intensity multiplier applied to environment-map reflections on screen-space
|
|
387
|
+
* misses and at screen edges. Defaults to π to match the former hardcoded multiplier.
|
|
388
|
+
*
|
|
389
|
+
* @type {UniformNode<float>}
|
|
390
|
+
* @default Math.PI
|
|
391
|
+
*/
|
|
392
|
+
this.environmentIntensity = uniform( Math.PI );
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* The render target the SSR is rendered into.
|
|
396
|
+
*
|
|
397
|
+
* @private
|
|
398
|
+
* @type {RenderTarget}
|
|
399
|
+
*/
|
|
400
|
+
this._ssrRenderTarget = new RenderTarget( 1, 1, { depthBuffer: false, type: HalfFloatType } );
|
|
401
|
+
this._ssrRenderTarget.texture.name = 'SSRNode.SSR';
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The render target for the blurred SSR reflections.
|
|
405
|
+
*
|
|
406
|
+
* @private
|
|
407
|
+
* @type {RenderTarget}
|
|
408
|
+
*/
|
|
409
|
+
this._blurRenderTarget = new RenderTarget( 1, 1, { depthBuffer: false, type: HalfFloatType, minFilter: LinearMipmapLinearFilter, magFilter: LinearFilter } );
|
|
410
|
+
this._blurRenderTarget.texture.name = 'SSRNode.Blur';
|
|
411
|
+
this._blurRenderTarget.texture.mipmaps.push( {}, {}, {}, {}, {} );
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* The material that is used to render the effect.
|
|
415
|
+
*
|
|
416
|
+
* @private
|
|
417
|
+
* @type {NodeMaterial}
|
|
418
|
+
*/
|
|
419
|
+
this._ssrMaterial = new NodeMaterial();
|
|
420
|
+
this._ssrMaterial.name = 'SSRNode.SSR';
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* The SSR fragment `Fn` and its shared context, captured in {@link SSRNode#setup}.
|
|
424
|
+
* Re-invoking the `Fn` produces a fresh node graph, which is how the baked
|
|
425
|
+
* compile-time constants are re-applied when they change (see {@link SSRNode#_buildSSRMaterial}).
|
|
426
|
+
*
|
|
427
|
+
* @private
|
|
428
|
+
*/
|
|
429
|
+
this._ssrFn = null;
|
|
430
|
+
this._sharedContext = null;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* The blur material.
|
|
434
|
+
*
|
|
435
|
+
* @private
|
|
436
|
+
* @type {NodeMaterial}
|
|
437
|
+
*/
|
|
438
|
+
this._blurMaterial = new NodeMaterial();
|
|
439
|
+
this._blurMaterial.name = 'SSRNode.Blur';
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* The copy material.
|
|
443
|
+
*
|
|
444
|
+
* @private
|
|
445
|
+
* @type {NodeMaterial}
|
|
446
|
+
*/
|
|
447
|
+
this._copyMaterial = new NodeMaterial();
|
|
448
|
+
this._copyMaterial.name = 'SSRNode.Copy';
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* The result of the effect is represented as a separate texture node.
|
|
452
|
+
*
|
|
453
|
+
* @private
|
|
454
|
+
* @type {PassTextureNode}
|
|
455
|
+
*/
|
|
456
|
+
this._textureNode = passTexture( this, this._ssrRenderTarget.texture );
|
|
457
|
+
|
|
458
|
+
let blurredTextureNode = null;
|
|
459
|
+
|
|
460
|
+
if ( this.stochastic === false && this.roughnessNode !== null ) {
|
|
461
|
+
|
|
462
|
+
const mips = this._blurRenderTarget.texture.mipmaps.length - 1;
|
|
463
|
+
const r = this.roughnessNode;
|
|
464
|
+
const lod = r.mul( r ).mul( mips ).clamp( 0, mips );
|
|
465
|
+
|
|
466
|
+
blurredTextureNode = passTexture( this, this._blurRenderTarget.texture ).level( lod );
|
|
467
|
+
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Holds the blurred SSR reflections.
|
|
472
|
+
*
|
|
473
|
+
* @private
|
|
474
|
+
* @type {?PassTextureNode}
|
|
475
|
+
*/
|
|
476
|
+
this._blurredTextureNode = blurredTextureNode;
|
|
477
|
+
|
|
478
|
+
if ( environmentNode !== null && environmentNode.isTexture === true ) {
|
|
479
|
+
|
|
480
|
+
this.setEnvMap( environmentNode );
|
|
481
|
+
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Non-linear step distribution exponent (compile-time constant). See the backing
|
|
488
|
+
* field for details. Assigning a new value recompiles the SSR material.
|
|
489
|
+
*
|
|
490
|
+
* @type {number}
|
|
491
|
+
*/
|
|
492
|
+
get stepExponent() {
|
|
493
|
+
|
|
494
|
+
return this._stepExponent;
|
|
495
|
+
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
set stepExponent( value ) {
|
|
499
|
+
|
|
500
|
+
if ( value !== this._stepExponent ) {
|
|
501
|
+
|
|
502
|
+
this._stepExponent = value;
|
|
503
|
+
this._buildSSRMaterial();
|
|
504
|
+
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Blur kernel size (compile-time constant). Assigning a new value recompiles the
|
|
511
|
+
* blur material.
|
|
512
|
+
*
|
|
513
|
+
* @type {number}
|
|
514
|
+
*/
|
|
515
|
+
get blurQuality() {
|
|
516
|
+
|
|
517
|
+
return this._blurQuality;
|
|
518
|
+
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
set blurQuality( value ) {
|
|
522
|
+
|
|
523
|
+
if ( value !== this._blurQuality ) {
|
|
524
|
+
|
|
525
|
+
this._blurQuality = value;
|
|
526
|
+
|
|
527
|
+
// The size is baked into the boxBlur node tree, so rebuild it (recompiles the material).
|
|
528
|
+
if ( this.stochastic === false ) this._buildBlurMaterial();
|
|
529
|
+
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Builds (or rebuilds) the blur material's node graph, baking the current
|
|
536
|
+
* {@link SSRNode#blurQuality} as the kernel size so the sample loop unrolls.
|
|
537
|
+
*
|
|
538
|
+
* @private
|
|
539
|
+
*/
|
|
540
|
+
_buildBlurMaterial() {
|
|
541
|
+
|
|
542
|
+
this._blurMaterial.fragmentNode = boxBlur( texture( this._ssrRenderTarget.texture ), { size: this._blurQuality, separation: this._blurSpread } );
|
|
543
|
+
this._blurMaterial.needsUpdate = true;
|
|
544
|
+
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Whether SSR fades to black near screen borders (compile-time constant). Assigning
|
|
549
|
+
* a new value recompiles the SSR material.
|
|
550
|
+
*
|
|
551
|
+
* @type {boolean}
|
|
552
|
+
*/
|
|
553
|
+
get screenEdgeFadeBlack() {
|
|
554
|
+
|
|
555
|
+
return this._screenEdgeFadeBlack;
|
|
556
|
+
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
set screenEdgeFadeBlack( value ) {
|
|
560
|
+
|
|
561
|
+
if ( value !== this._screenEdgeFadeBlack ) {
|
|
562
|
+
|
|
563
|
+
this._screenEdgeFadeBlack = value;
|
|
564
|
+
this._buildSSRMaterial();
|
|
565
|
+
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Whether sub-step binary-search hit refinement is enabled (compile-time constant).
|
|
572
|
+
* Assigning a new value rebuilds the SSR material.
|
|
573
|
+
*
|
|
574
|
+
* @type {boolean}
|
|
575
|
+
*/
|
|
576
|
+
get binaryRefine() {
|
|
577
|
+
|
|
578
|
+
return this._binaryRefine;
|
|
579
|
+
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
set binaryRefine( value ) {
|
|
583
|
+
|
|
584
|
+
if ( value !== this._binaryRefine ) {
|
|
585
|
+
|
|
586
|
+
this._binaryRefine = value;
|
|
587
|
+
this._buildSSRMaterial();
|
|
588
|
+
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Whether dielectrics are reflected in the non-stochastic path (compile-time constant).
|
|
595
|
+
* Assigning a new value rebuilds the SSR material.
|
|
596
|
+
*
|
|
597
|
+
* @type {boolean}
|
|
598
|
+
*/
|
|
599
|
+
get reflectNonMetals() {
|
|
600
|
+
|
|
601
|
+
return this._reflectNonMetals;
|
|
602
|
+
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
set reflectNonMetals( value ) {
|
|
606
|
+
|
|
607
|
+
if ( value !== this._reflectNonMetals ) {
|
|
608
|
+
|
|
609
|
+
this._reflectNonMetals = value;
|
|
610
|
+
this._buildSSRMaterial();
|
|
611
|
+
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Rebuilds the SSR material's node graph by re-invoking the fragment `Fn`, which
|
|
618
|
+
* re-bakes the compile-time constants ({@link SSRNode#binaryRefine},
|
|
619
|
+
* {@link SSRNode#stepExponent}, {@link SSRNode#screenEdgeFadeBlack}) at their current
|
|
620
|
+
* values. A no-op until {@link SSRNode#setup} has captured the `Fn`.
|
|
621
|
+
*
|
|
622
|
+
* @private
|
|
623
|
+
*/
|
|
624
|
+
_buildSSRMaterial() {
|
|
625
|
+
|
|
626
|
+
if ( this._ssrFn === null ) return;
|
|
627
|
+
|
|
628
|
+
this._ssrMaterial.contextNode = context( this._sharedContext );
|
|
629
|
+
this._ssrMaterial.fragmentNode = this._ssrFn();
|
|
630
|
+
this._ssrMaterial.needsUpdate = true;
|
|
631
|
+
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Returns the result of the effect as a texture node.
|
|
636
|
+
*
|
|
637
|
+
* @return {PassTextureNode} A texture node that represents the result of the effect.
|
|
638
|
+
*/
|
|
639
|
+
getTextureNode() {
|
|
640
|
+
|
|
641
|
+
return ( this.stochastic === false && this.roughnessNode !== null ) ? this._blurredTextureNode : this._textureNode;
|
|
642
|
+
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Sets the size of the effect.
|
|
647
|
+
*
|
|
648
|
+
* @param {number} width - The width of the effect.
|
|
649
|
+
* @param {number} height - The height of the effect.
|
|
650
|
+
*/
|
|
651
|
+
setSize( width, height ) {
|
|
652
|
+
|
|
653
|
+
width = Math.round( this.resolutionScale * width );
|
|
654
|
+
height = Math.round( this.resolutionScale * height );
|
|
655
|
+
|
|
656
|
+
this._resolution.value.set( width, height );
|
|
657
|
+
this._ssrRenderTarget.setSize( width, height );
|
|
658
|
+
this._blurRenderTarget.setSize( width, height );
|
|
659
|
+
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Wires the feedback inputs for multi-bounce reflections: the previous frame's
|
|
664
|
+
* denoised result (`history`) and the velocity buffer used to reproject it
|
|
665
|
+
* (`velocity`). `history` accepts the producing node (e.g. a
|
|
666
|
+
* {@link RecurrentDenoiseNode}) — its output render target is used — or a raw
|
|
667
|
+
* texture. Pass `null` for both to disable multi-bounce.
|
|
668
|
+
*
|
|
669
|
+
* @param {Texture} history
|
|
670
|
+
* @param {Node<vec2>} velocity
|
|
671
|
+
*/
|
|
672
|
+
setHistory( history, velocity ) {
|
|
673
|
+
|
|
674
|
+
this.historyTexture = ( history && typeof history.getRenderTarget === 'function' )
|
|
675
|
+
? history.getRenderTarget().texture
|
|
676
|
+
: history;
|
|
677
|
+
this.velocityTexture = velocity;
|
|
678
|
+
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Sets the environment map for importance-sampled env lighting when
|
|
683
|
+
* screen-space rays miss. Call this whenever the scene's env map changes.
|
|
684
|
+
*
|
|
685
|
+
* Uses {@link ImportanceSampledEnvironment} (CDF + MIS adapted from
|
|
686
|
+
* [three-gpu-pathtracer](https://github.com/gkjohnson/three-gpu-pathtracer)).
|
|
687
|
+
*
|
|
688
|
+
* @param {Texture|null} hdr - The equirectangular HDR environment map, or null to disable.
|
|
689
|
+
* @see {@link https://github.com/gkjohnson/three-gpu-pathtracer}
|
|
690
|
+
*/
|
|
691
|
+
setEnvMap( hdr ) {
|
|
692
|
+
|
|
693
|
+
if ( hdr === null ) {
|
|
694
|
+
|
|
695
|
+
if ( this._importanceEnvironment !== null ) {
|
|
696
|
+
|
|
697
|
+
this._importanceEnvironment.clear();
|
|
698
|
+
this._importanceEnvironment = null;
|
|
699
|
+
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
this._buildSSRMaterial();
|
|
703
|
+
return;
|
|
704
|
+
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
if ( hdr.image === undefined || hdr.image.data === undefined ) {
|
|
708
|
+
|
|
709
|
+
console.warn( 'SSRNode: `environmentNode` / `setEnvMap()` expects an equirectangular HDR texture with CPU-side image data (e.g. RGBELoader). PMREM cubemaps and `scene.environment` are not supported.' );
|
|
710
|
+
return;
|
|
711
|
+
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
if ( this._importanceEnvironment === null ) {
|
|
715
|
+
|
|
716
|
+
this._importanceEnvironment = new ImportanceSampledEnvironment( this.envImportanceSampling );
|
|
717
|
+
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
this._importanceEnvironment.updateFrom( hdr );
|
|
721
|
+
this._buildSSRMaterial();
|
|
722
|
+
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Intensity multiplier for the importance-sampled env contribution.
|
|
727
|
+
* Only available after {@link setEnvMap} has been called.
|
|
728
|
+
*
|
|
729
|
+
* @type {?UniformNode<float>}
|
|
730
|
+
*/
|
|
731
|
+
get envMapIntensity() {
|
|
732
|
+
|
|
733
|
+
return this._importanceEnvironment !== null ? this._importanceEnvironment.intensity : null;
|
|
734
|
+
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* This method is used to render the effect once per frame.
|
|
739
|
+
*
|
|
740
|
+
* @param {NodeFrame} frame - The current node frame.
|
|
741
|
+
*/
|
|
742
|
+
updateBefore( frame ) {
|
|
743
|
+
|
|
744
|
+
const { renderer } = frame;
|
|
745
|
+
|
|
746
|
+
this._cameraWorldMatrix.value.copy( this.camera.matrixWorld );
|
|
747
|
+
this._cameraWorldPosition.value.copy( this.camera.position );
|
|
748
|
+
|
|
749
|
+
_rendererState = RendererUtils.resetRendererState( renderer, _rendererState );
|
|
750
|
+
|
|
751
|
+
const ssrRenderTarget = this._ssrRenderTarget;
|
|
752
|
+
const blurRenderTarget = this._blurRenderTarget;
|
|
753
|
+
|
|
754
|
+
const size = renderer.getDrawingBufferSize( _size );
|
|
755
|
+
|
|
756
|
+
_quadMesh.material = this._ssrMaterial;
|
|
757
|
+
|
|
758
|
+
this.setSize( size.width, size.height );
|
|
759
|
+
|
|
760
|
+
// Advance the noise index once per frame (matches SSGI / Denoise).
|
|
761
|
+
this._noiseIndex.value = ( this._noiseIndex.value + 1 ) % 0x7fffffff;
|
|
762
|
+
|
|
763
|
+
// clear
|
|
764
|
+
|
|
765
|
+
renderer.setMRT( null );
|
|
766
|
+
renderer.setClearColor( 0x000000, 0 );
|
|
767
|
+
|
|
768
|
+
// ssr
|
|
769
|
+
|
|
770
|
+
renderer.setRenderTarget( ssrRenderTarget );
|
|
771
|
+
_quadMesh.name = 'SSR [ Reflections ]';
|
|
772
|
+
_quadMesh.render( renderer );
|
|
773
|
+
|
|
774
|
+
// blur (optional)
|
|
775
|
+
|
|
776
|
+
if ( this.stochastic === false && this.roughnessNode !== null ) {
|
|
777
|
+
|
|
778
|
+
// blur mips but leave the base mip unblurred
|
|
779
|
+
|
|
780
|
+
for ( let i = 0; i < blurRenderTarget.texture.mipmaps.length; i ++ ) {
|
|
781
|
+
|
|
782
|
+
_quadMesh.material = ( i === 0 ) ? this._copyMaterial : this._blurMaterial;
|
|
783
|
+
|
|
784
|
+
this._blurSpread.value = i;
|
|
785
|
+
renderer.setRenderTarget( blurRenderTarget, 0, i );
|
|
786
|
+
_quadMesh.name = 'SSR [ Blur Level ' + i + ' ]';
|
|
787
|
+
_quadMesh.render( renderer );
|
|
788
|
+
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
// restore
|
|
794
|
+
|
|
795
|
+
RendererUtils.restoreRendererState( renderer, _rendererState );
|
|
796
|
+
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* This method is used to setup the effect's TSL code.
|
|
801
|
+
*
|
|
802
|
+
* @param {NodeBuilder} builder - The current node builder.
|
|
803
|
+
* @return {PassTextureNode}
|
|
804
|
+
*/
|
|
805
|
+
setup( builder ) {
|
|
806
|
+
|
|
807
|
+
const uvNode = uv();
|
|
808
|
+
|
|
809
|
+
const pointToLineDistance = Fn( ( [ point, linePointA, linePointB ] ) => {
|
|
810
|
+
|
|
811
|
+
// https://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html
|
|
812
|
+
|
|
813
|
+
return cross( point.sub( linePointA ), point.sub( linePointB ) ).length().div( linePointB.sub( linePointA ).length() );
|
|
814
|
+
|
|
815
|
+
} );
|
|
816
|
+
|
|
817
|
+
const pointPlaneDistance = Fn( ( [ point, planePoint, planeNormal ] ) => {
|
|
818
|
+
|
|
819
|
+
// https://mathworld.wolfram.com/Point-PlaneDistance.html
|
|
820
|
+
// https://en.wikipedia.org/wiki/Plane_(geometry)
|
|
821
|
+
// http://paulbourke.net/geometry/pointlineplane/
|
|
822
|
+
|
|
823
|
+
// planeNormal is already normalized, so the denominator is 1.
|
|
824
|
+
const d = mul( planeNormal.x, planePoint.x ).add( mul( planeNormal.y, planePoint.y ) ).add( mul( planeNormal.z, planePoint.z ) ).negate().toVar();
|
|
825
|
+
const distance = mul( planeNormal.x, point.x ).add( mul( planeNormal.y, point.y ) ).add( mul( planeNormal.z, point.z ) ).add( d );
|
|
826
|
+
return distance;
|
|
827
|
+
|
|
828
|
+
} );
|
|
829
|
+
|
|
830
|
+
const getViewZ = Fn( ( [ depth ] ) => {
|
|
831
|
+
|
|
832
|
+
let viewZNode;
|
|
833
|
+
|
|
834
|
+
if ( this.camera.isPerspectiveCamera ) {
|
|
835
|
+
|
|
836
|
+
viewZNode = perspectiveDepthToViewZ( depth, this._cameraNear, this._cameraFar );
|
|
837
|
+
|
|
838
|
+
} else {
|
|
839
|
+
|
|
840
|
+
viewZNode = orthographicDepthToViewZ( depth, this._cameraNear, this._cameraFar );
|
|
841
|
+
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
return viewZNode;
|
|
845
|
+
|
|
846
|
+
} );
|
|
847
|
+
|
|
848
|
+
const sampleDepth = ( uv ) => {
|
|
849
|
+
|
|
850
|
+
const depth = this.depthNode.sample( uv ).r;
|
|
851
|
+
|
|
852
|
+
if ( builder.renderer.logarithmicDepthBuffer === true ) {
|
|
853
|
+
|
|
854
|
+
const viewZ = logarithmicDepthToViewZ( depth, this._cameraNear, this._cameraFar );
|
|
855
|
+
|
|
856
|
+
return viewZToPerspectiveDepth( viewZ, this._cameraNear, this._cameraFar );
|
|
857
|
+
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
return depth;
|
|
861
|
+
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
const sampleMarchNoise = this.stochastic === true ? bindAnalyticNoise( this._resolution, 47 ) : null;
|
|
865
|
+
|
|
866
|
+
const computeScreenBorderFactor = Fn( ( [ uvCoord, borderWidth ] ) => {
|
|
867
|
+
|
|
868
|
+
const border = borderWidth.max( 1e-4 );
|
|
869
|
+
|
|
870
|
+
// Distance to the nearest screen edge — uniform falloff at corners.
|
|
871
|
+
const edgeDist = min(
|
|
872
|
+
min( uvCoord.x, float( 1 ).sub( uvCoord.x ) ),
|
|
873
|
+
min( uvCoord.y, float( 1 ).sub( uvCoord.y ) )
|
|
874
|
+
);
|
|
875
|
+
|
|
876
|
+
// Two smoothsteps for a softer ease-in-out than a single ramp.
|
|
877
|
+
const t = edgeDist.smoothstep( 0, border );
|
|
878
|
+
|
|
879
|
+
return t.smoothstep( 0, 1 ).pow( 0.125 );
|
|
880
|
+
|
|
881
|
+
} ).setLayout( {
|
|
882
|
+
name: 'computeScreenBorderFactor',
|
|
883
|
+
type: 'float',
|
|
884
|
+
inputs: [
|
|
885
|
+
{ name: 'uvCoord', type: 'vec2' },
|
|
886
|
+
{ name: 'borderWidth', type: 'float' }
|
|
887
|
+
]
|
|
888
|
+
} );
|
|
889
|
+
|
|
890
|
+
const ssr = Fn( () => {
|
|
891
|
+
|
|
892
|
+
const noise = this.stochastic === true ? sampleMarchNoise( uvNode, this._noiseIndex ) : null;
|
|
893
|
+
const uvPos = uvNode.toVar();
|
|
894
|
+
|
|
895
|
+
const depth = sampleDepth( uvPos ).toVar();
|
|
896
|
+
|
|
897
|
+
// Skip background pixels (cleared far-plane depth); the target is cleared each frame.
|
|
898
|
+
depth.greaterThanEqual( 1.0 ).discard();
|
|
899
|
+
|
|
900
|
+
const viewPosition = getViewPosition( uvPos, depth, this._cameraProjectionMatrixInverse ).toVar();
|
|
901
|
+
const worldPosition = this._cameraWorldMatrix.mul( vec4( viewPosition, 1.0 ) ).xyz.toVar();
|
|
902
|
+
const viewNormal = this.normalNode.rgb.normalize().toVar();
|
|
903
|
+
|
|
904
|
+
const viewIncidentDir = ( ( this.camera.isPerspectiveCamera ) ? normalize( viewPosition ) : vec3( 0, 0, - 1 ) ).toVar();
|
|
905
|
+
|
|
906
|
+
// The node system samples the metalness/roughness textures at the current uv,
|
|
907
|
+
// so no explicit sample() is needed here.
|
|
908
|
+
const metalness = float( this.metalnessNode );
|
|
909
|
+
|
|
910
|
+
if ( this.stochastic === false && this._reflectNonMetals === false ) {
|
|
911
|
+
|
|
912
|
+
metalness.lessThanEqual( 0.0 ).discard();
|
|
913
|
+
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
const roughness = float( this.roughnessNode );
|
|
917
|
+
const glossiness = min( roughness.div( 0.25 ), 1 ).oneMinus();
|
|
918
|
+
// Only the fade-to-black miss path reads this, and that path is baked out otherwise.
|
|
919
|
+
const surfaceBorderFactor = this.screenEdgeFadeBlack ? computeScreenBorderFactor( uvPos, this.screenEdgeFade ) : null;
|
|
920
|
+
const hitBorderWidth = this.screenEdgeFade.mul( glossiness );
|
|
921
|
+
|
|
922
|
+
const V = viewIncidentDir.negate().normalize().toVar();
|
|
923
|
+
|
|
924
|
+
let viewReflectDir, finalSampleWeight, specDominantFactor;
|
|
925
|
+
const albedo = vec3( 1 ).toVar();
|
|
926
|
+
let sampleEnvReflection = null;
|
|
927
|
+
|
|
928
|
+
if ( this.stochastic === false ) {
|
|
929
|
+
|
|
930
|
+
viewReflectDir = reflect( viewIncidentDir, viewNormal ).normalize().toVar();
|
|
931
|
+
finalSampleWeight = vec3( metalness );
|
|
932
|
+
specDominantFactor = float( 1 );
|
|
933
|
+
|
|
934
|
+
} else {
|
|
935
|
+
|
|
936
|
+
const Xi = noise.toVar();
|
|
937
|
+
// Mirror-bias: pull `Xi.y` toward the cap top to tighten the GGX lobe and cut mid-roughness
|
|
938
|
+
// noise. Unbiased — bounded VNDF keeps brdf·cos/pdf ~constant (EA, "Stochastic SSR").
|
|
939
|
+
Xi.y.assign( mix( Xi.y, 0.0, this.mirrorBias.mul( Xi.w.sqrt() ) ) );
|
|
940
|
+
|
|
941
|
+
albedo.assign( ( this.diffuseNode !== null ? this.diffuseNode.sample( uvPos ).rgb : vec3( 1 ) ) );
|
|
942
|
+
const ggxSample = ggxReflectionSample( viewNormal, V, roughness, metalness, albedo, Xi ).toVar();
|
|
943
|
+
|
|
944
|
+
// Sometimes the GGX sample is facing away from the surface, so we need to re-sample.
|
|
945
|
+
If( ggxSample.get( 'reflectDir' ).dot( viewNormal ).lessThan( 0 ), () => {
|
|
946
|
+
|
|
947
|
+
ggxSample.assign( ggxReflectionSample( viewNormal, V, roughness, metalness, albedo, Xi.add( Xi.mul( 7 ) ).fract() ) );
|
|
948
|
+
|
|
949
|
+
} );
|
|
950
|
+
|
|
951
|
+
viewReflectDir = ggxSample.get( 'reflectDir' ).toVar();
|
|
952
|
+
finalSampleWeight = ggxSample.get( 'sampleWeight' ).toVar();
|
|
953
|
+
specDominantFactor = getSpecularDominantFactor( ggxSample.get( 'NdotV' ), roughness ).toVar();
|
|
954
|
+
|
|
955
|
+
sampleEnvReflection = () => {
|
|
956
|
+
|
|
957
|
+
if ( this._importanceEnvironment === null ) return vec3( 0 );
|
|
958
|
+
|
|
959
|
+
const envColor = vec3( 0 ).toVar();
|
|
960
|
+
|
|
961
|
+
if ( this.envImportanceSampling ) {
|
|
962
|
+
|
|
963
|
+
const Xi2 = bindAnalyticNoise( this._resolution, 59 )( uvPos, this._noiseIndex );
|
|
964
|
+
|
|
965
|
+
envColor.assign( this._importanceEnvironment.sampleEnvironmentMIS( {
|
|
966
|
+
cameraWorldMatrix: this._cameraWorldMatrix,
|
|
967
|
+
viewReflectDir,
|
|
968
|
+
N: viewNormal,
|
|
969
|
+
V,
|
|
970
|
+
alpha: ggxSample.get( 'alpha' ),
|
|
971
|
+
f0: ggxSample.get( 'f0' ),
|
|
972
|
+
Xi2
|
|
973
|
+
} ) );
|
|
974
|
+
|
|
975
|
+
} else {
|
|
976
|
+
|
|
977
|
+
envColor.assign( this._importanceEnvironment.sampleEnvironmentBRDF( {
|
|
978
|
+
cameraWorldMatrix: this._cameraWorldMatrix,
|
|
979
|
+
viewReflectDir,
|
|
980
|
+
N: viewNormal,
|
|
981
|
+
V,
|
|
982
|
+
alpha: ggxSample.get( 'alpha' ),
|
|
983
|
+
f0: ggxSample.get( 'f0' )
|
|
984
|
+
} ) );
|
|
985
|
+
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
return envColor;
|
|
989
|
+
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
// Multi-bounce: fold in the previous frame's reflection at the hit point, reprojected by its
|
|
995
|
+
// own motion. The (1 - history.a) decay damps the feedback. No-op until both textures are set.
|
|
996
|
+
const reprojectHitPointHistory = ( uvHit, color ) => {
|
|
997
|
+
|
|
998
|
+
if ( ! ( this.historyTexture && this.velocityTexture ) ) return color;
|
|
999
|
+
|
|
1000
|
+
const velocity = this.velocityTexture.sample( uvHit ).xy;
|
|
1001
|
+
const historyUV = uvHit.sub( velocity );
|
|
1002
|
+
const historyBounce = texture( this.historyTexture, historyUV ).toVar();
|
|
1003
|
+
const sampleDecay = historyBounce.a.oneMinus();
|
|
1004
|
+
|
|
1005
|
+
return color.add( historyBounce.rgb.mul( sampleDecay ) );
|
|
1006
|
+
|
|
1007
|
+
};
|
|
1008
|
+
|
|
1009
|
+
// Fades a screen-space hit near the screen borders, using the hit sample UV (where the
|
|
1010
|
+
// screen-space data was read). `screenEdgeFadeBlack` is baked, so the two modes branch in
|
|
1011
|
+
// JS: fade the reflection to black, or blend it toward the environment reflection.
|
|
1012
|
+
const applyHitEdgeFade = ( reflectColor, uvS, hitBorderWidth ) => {
|
|
1013
|
+
|
|
1014
|
+
if ( this.screenEdgeFadeBlack ) {
|
|
1015
|
+
|
|
1016
|
+
const hitBorderFactor = computeScreenBorderFactor( uvS, this.screenEdgeFade );
|
|
1017
|
+
reflectColor.rgb.mulAssign( hitBorderFactor );
|
|
1018
|
+
|
|
1019
|
+
} else {
|
|
1020
|
+
|
|
1021
|
+
const hitBorderFactor = computeScreenBorderFactor( uvS, hitBorderWidth );
|
|
1022
|
+
|
|
1023
|
+
If( hitBorderFactor.lessThan( 1 ), () => {
|
|
1024
|
+
|
|
1025
|
+
reflectColor.rgb.assign( mix( sampleEnvReflection().mul( this.environmentIntensity ), reflectColor.rgb, hitBorderFactor ) );
|
|
1026
|
+
|
|
1027
|
+
} );
|
|
1028
|
+
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
const maxReflectRayLen = this.maxDistance.div( dot( viewIncidentDir.negate(), viewNormal ) ).toVar();
|
|
1034
|
+
|
|
1035
|
+
const d1viewPosition = viewPosition.add( viewReflectDir.mul( maxReflectRayLen ) ).toVar();
|
|
1036
|
+
|
|
1037
|
+
// Camera type is fixed at build time, so guard the near-plane clamp with a JS branch
|
|
1038
|
+
// rather than a runtime uniform (the orthographic case compiles it out entirely).
|
|
1039
|
+
if ( this.camera.isPerspectiveCamera ) {
|
|
1040
|
+
|
|
1041
|
+
If( d1viewPosition.z.greaterThan( this._cameraNear.negate() ), () => {
|
|
1042
|
+
|
|
1043
|
+
const t = sub( this._cameraNear.negate(), viewPosition.z ).div( viewReflectDir.z );
|
|
1044
|
+
d1viewPosition.assign( viewPosition.add( viewReflectDir.mul( t ) ) );
|
|
1045
|
+
|
|
1046
|
+
} );
|
|
1047
|
+
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
const d0 = uvPos.mul( this._resolution ).xy.toVar();
|
|
1051
|
+
const d1 = getScreenPosition( d1viewPosition, this._cameraProjectionMatrix ).mul( this._resolution ).toVar();
|
|
1052
|
+
|
|
1053
|
+
const xLen = d1.x.sub( d0.x ).toVar();
|
|
1054
|
+
const yLen = d1.y.sub( d0.y ).toVar();
|
|
1055
|
+
|
|
1056
|
+
// dominant-axis ray length in texels (used for the per-step floor below)
|
|
1057
|
+
const rayLen = max( xLen.abs(), yLen.abs() ).max( 1 ).toVar();
|
|
1058
|
+
|
|
1059
|
+
// Blur traces a single mirror ray, so spend steps in proportion to the ray's screen-space
|
|
1060
|
+
// length (cheap for the short rays that dominate). Scatter needs a fixed, bounded count for
|
|
1061
|
+
// coherent stochastic sampling; each step then spans the whole ray as rayVec / totalStep.
|
|
1062
|
+
const totalStep = int( this.stochastic === false
|
|
1063
|
+
? trunc( max( abs( xLen ), abs( yLen ) ).mul( this.quality.clamp() ) ).max( int( 1 ) ).toConst()
|
|
1064
|
+
: this.quality.clamp().mul( MAX_STEPS ).max( float( 1 ) ) ).toConst();
|
|
1065
|
+
|
|
1066
|
+
const xSpan = xLen.div( totalStep ).toVar();
|
|
1067
|
+
const ySpan = yLen.div( totalStep ).toVar();
|
|
1068
|
+
|
|
1069
|
+
const stepVec = vec2( xSpan, ySpan ).toVar();
|
|
1070
|
+
const invResolution = vec2( float( 1 ), float( 1 ) ).div( this._resolution ).toVar();
|
|
1071
|
+
const uvPixelStepX = vec2( invResolution.x, float( 0 ) ).toVar();
|
|
1072
|
+
|
|
1073
|
+
const output = vec4( 0 ).toVar();
|
|
1074
|
+
const hit = float( 0 ).toVar();
|
|
1075
|
+
|
|
1076
|
+
// Reflected-ray view-space Z at ray parameter s ∈ [0,1] (linear in 1/z for perspective),
|
|
1077
|
+
// hoisted so the march and refinement evaluate it identically.
|
|
1078
|
+
const recipVPZ = float( 1 ).div( viewPosition.z ).toConst();
|
|
1079
|
+
const recipD1VPZ = float( 1 ).div( d1viewPosition.z ).toConst();
|
|
1080
|
+
|
|
1081
|
+
// Camera type is known at build time, so branch at compile time rather than via a runtime select.
|
|
1082
|
+
const reflectRayZAt = this.camera.isPerspectiveCamera
|
|
1083
|
+
? ( sVal ) => float( 1 ).div( recipVPZ.add( sVal.mul( recipD1VPZ.sub( recipVPZ ) ) ) )
|
|
1084
|
+
: ( sVal ) => viewPosition.z.add( sVal.mul( d1viewPosition.z.sub( viewPosition.z ) ) );
|
|
1085
|
+
|
|
1086
|
+
// Screen-space position along the ray for a given s ∈ [0,1].
|
|
1087
|
+
const screenPosAt = ( sVal ) => d0.add( stepVec.mul( sVal.mul( totalStep ) ) );
|
|
1088
|
+
|
|
1089
|
+
// Ray parameter s ∈ [0,1] for step `idx`. Blur marches uniformly (matching the original loop:
|
|
1090
|
+
// one ~texel step per iteration). Scatter uses an exponential remap `(idx/steps)^stepExponent`
|
|
1091
|
+
// that concentrates samples near the origin, floored to ≥1 texel/step; `jitter` dissolves banding.
|
|
1092
|
+
const sampleFraction = this.stochastic === false
|
|
1093
|
+
? ( idx ) => idx.div( totalStep )
|
|
1094
|
+
: ( idx ) => max(
|
|
1095
|
+
idx.add( noise.z.sub( 0.5 ) ).div( totalStep ).pow( this.stepExponent ),
|
|
1096
|
+
idx.div( rayLen )
|
|
1097
|
+
);
|
|
1098
|
+
|
|
1099
|
+
// Carry the hit out of the loop so refinement runs after the march, not nested inside it (a
|
|
1100
|
+
// loop-inside-a-loop tripped shader-compiler bugs on some drivers). hitSLo/hitSHi bracket s.
|
|
1101
|
+
const foundHit = bool( false ).toVar();
|
|
1102
|
+
const hitSLo = float( 0 ).toVar();
|
|
1103
|
+
const hitSHi = float( 0 ).toVar();
|
|
1104
|
+
// Carry the coarse hit's UV/depth to skip a redundant fetch when refinement is off.
|
|
1105
|
+
const hitUvS = vec2( 0 ).toVar();
|
|
1106
|
+
const hitD = float( 0 ).toVar();
|
|
1107
|
+
|
|
1108
|
+
// March from d0 toward d1, looking for an intersection with the depth buffer.
|
|
1109
|
+
Loop( { start: int( 1 ), end: totalStep }, ( { i } ) => {
|
|
1110
|
+
|
|
1111
|
+
// Exponentially-distributed ray parameter, shared by the sample position and ray depth.
|
|
1112
|
+
const s = sampleFraction( float( i ) ).toVar();
|
|
1113
|
+
|
|
1114
|
+
const xy = screenPosAt( s ).toVar();
|
|
1115
|
+
|
|
1116
|
+
If( xy.x.lessThan( 0 ).or( xy.x.greaterThan( this._resolution.x ) ).or( xy.y.lessThan( 0 ) ).or( xy.y.greaterThan( this._resolution.y ) ), () => {
|
|
1117
|
+
|
|
1118
|
+
Break();
|
|
1119
|
+
|
|
1120
|
+
} );
|
|
1121
|
+
|
|
1122
|
+
const uvS = xy.mul( invResolution ).toVar();
|
|
1123
|
+
const d = sampleDepth( uvS ).toVar();
|
|
1124
|
+
const vZ = getViewZ( d ).toVar();
|
|
1125
|
+
|
|
1126
|
+
const viewReflectRayZ = reflectRayZAt( s ).toVar();
|
|
1127
|
+
|
|
1128
|
+
If( viewReflectRayZ.lessThanEqual( vZ ), () => {
|
|
1129
|
+
|
|
1130
|
+
// Depth crossing: ray went behind the depth buffer. Gate by thickness before stopping
|
|
1131
|
+
// so an occluder gap doesn't end the march prematurely.
|
|
1132
|
+
const vP = getViewPosition( uvS, d, this._cameraProjectionMatrixInverse ).toVar();
|
|
1133
|
+
const away = pointToLineDistance( vP, viewPosition, d1viewPosition ).toVar();
|
|
1134
|
+
|
|
1135
|
+
const uvNeighbor = uvS.add( uvPixelStepX ).toVar();
|
|
1136
|
+
const vPNeighbor = getViewPosition( uvNeighbor, d, this._cameraProjectionMatrixInverse ).toVar();
|
|
1137
|
+
const minThickness = vPNeighbor.x.sub( vP.x ).mul( 3 ).toVar();
|
|
1138
|
+
const tk = max( minThickness, this.thickness ).toVar();
|
|
1139
|
+
|
|
1140
|
+
If( away.lessThanEqual( tk ), () => {
|
|
1141
|
+
|
|
1142
|
+
const vN = this.normalNode.sample( uvS ).rgb.normalize().toVar();
|
|
1143
|
+
|
|
1144
|
+
// the reflected ray is pointing towards the same side as the fragment's normal (current ray position),
|
|
1145
|
+
// which means it wouldn't reflect off the surface. The loop continues to the next step for the next ray sample.
|
|
1146
|
+
if ( this.stochastic === false ) {
|
|
1147
|
+
|
|
1148
|
+
If( dot( viewReflectDir, vN ).greaterThanEqual( 0 ), () => {
|
|
1149
|
+
|
|
1150
|
+
Continue();
|
|
1151
|
+
|
|
1152
|
+
} );
|
|
1153
|
+
|
|
1154
|
+
// this distance represents the depth of the intersection point between the reflected ray and the scene.
|
|
1155
|
+
const distance = pointPlaneDistance( vP, viewPosition, viewNormal ).toVar();
|
|
1156
|
+
|
|
1157
|
+
// Distance exceeding limit: The reflection is potentially too far away and
|
|
1158
|
+
// might not contribute significantly to the final color
|
|
1159
|
+
If( distance.greaterThan( this.maxDistance ), () => {
|
|
1160
|
+
|
|
1161
|
+
Break();
|
|
1162
|
+
|
|
1163
|
+
} );
|
|
1164
|
+
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
foundHit.assign( true );
|
|
1168
|
+
hitUvS.assign( uvS );
|
|
1169
|
+
hitD.assign( d );
|
|
1170
|
+
|
|
1171
|
+
if ( this.binaryRefine ) {
|
|
1172
|
+
|
|
1173
|
+
hitSLo.assign( sampleFraction( float( i ).sub( 1 ) ) );
|
|
1174
|
+
hitSHi.assign( s );
|
|
1175
|
+
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
Break();
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
} );
|
|
1182
|
+
|
|
1183
|
+
} );
|
|
1184
|
+
|
|
1185
|
+
} );
|
|
1186
|
+
|
|
1187
|
+
If( foundHit, () => {
|
|
1188
|
+
|
|
1189
|
+
// Bisect the bracketed crossing toward the exact intersection. Run after the march, not
|
|
1190
|
+
// nested (a loop-inside-a-loop tripped shader-compiler bugs on some drivers).
|
|
1191
|
+
if ( this.binaryRefine ) {
|
|
1192
|
+
|
|
1193
|
+
Loop( { start: int( 0 ), end: int( 8 ), type: 'int', condition: '<' }, () => {
|
|
1194
|
+
|
|
1195
|
+
const sMid = hitSLo.add( hitSHi ).mul( 0.5 ).toVar();
|
|
1196
|
+
const sceneZMid = getViewZ( sampleDepth( screenPosAt( sMid ).mul( invResolution ) ) );
|
|
1197
|
+
|
|
1198
|
+
If( reflectRayZAt( sMid ).lessThanEqual( sceneZMid ), () => {
|
|
1199
|
+
|
|
1200
|
+
hitSHi.assign( sMid );
|
|
1201
|
+
|
|
1202
|
+
} ).Else( () => {
|
|
1203
|
+
|
|
1204
|
+
hitSLo.assign( sMid );
|
|
1205
|
+
|
|
1206
|
+
} );
|
|
1207
|
+
|
|
1208
|
+
} );
|
|
1209
|
+
|
|
1210
|
+
// Refinement moved the crossing, so re-fetch UV/depth at the refined `s`.
|
|
1211
|
+
hitUvS.assign( screenPosAt( hitSHi ).mul( invResolution ) );
|
|
1212
|
+
hitD.assign( sampleDepth( hitUvS ) );
|
|
1213
|
+
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
// Shade the hit, reusing the depth fetched during the march (or refinement).
|
|
1217
|
+
const uvS = hitUvS;
|
|
1218
|
+
const vP = getViewPosition( uvS, hitD, this._cameraProjectionMatrixInverse ).toVar();
|
|
1219
|
+
|
|
1220
|
+
// In blur mode the ratio² falloff re-grows past maxDistance, so over-range hits fall back
|
|
1221
|
+
// to env. The scatter path bounds reach via ray length, so every hit shades.
|
|
1222
|
+
const distancePointPlane = this.stochastic === false ? pointPlaneDistance( vP, viewPosition, viewNormal ).toVar() : float( 0 );
|
|
1223
|
+
const withinRange = distancePointPlane.lessThanEqual( this.maxDistance );
|
|
1224
|
+
|
|
1225
|
+
If( withinRange, () => {
|
|
1226
|
+
|
|
1227
|
+
const hitWorldPosition = this._cameraWorldMatrix.mul( vec4( vP, 1.0 ) ).xyz.toVar();
|
|
1228
|
+
const worldDistance = distance( worldPosition, hitWorldPosition ).mul( specDominantFactor ).toVar();
|
|
1229
|
+
|
|
1230
|
+
const reflectColor = this.colorNode.sample( uvS ).toVar();
|
|
1231
|
+
|
|
1232
|
+
// Multi-bounce: add the reprojected previous-frame reflection at the hit point.
|
|
1233
|
+
reflectColor.rgb.assign( reprojectHitPointHistory( uvS, reflectColor.rgb ) );
|
|
1234
|
+
|
|
1235
|
+
if ( this.stochastic === true ) applyHitEdgeFade( reflectColor, uvS, hitBorderWidth );
|
|
1236
|
+
|
|
1237
|
+
// The scatter (GGX) path bakes distance/grazing response into finalSampleWeight.
|
|
1238
|
+
// The mirror/blur path is a plain reflection, so reapply upstream's squared
|
|
1239
|
+
// distance attenuation and grazing Fresnel here to match its falloff.
|
|
1240
|
+
let weightedColor = reflectColor.rgb.mul( finalSampleWeight );
|
|
1241
|
+
|
|
1242
|
+
if ( this.stochastic === false ) {
|
|
1243
|
+
|
|
1244
|
+
const ratio = float( 1 ).sub( distancePointPlane.div( this.maxDistance ) ).toVar();
|
|
1245
|
+
const attenuation = ratio.mul( ratio ).toVar();
|
|
1246
|
+
const fresnelCoe = div( dot( viewIncidentDir, viewReflectDir ).add( 1 ), 2 ).toVar();
|
|
1247
|
+
weightedColor = weightedColor.mul( attenuation.mul( fresnelCoe ) );
|
|
1248
|
+
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
hit.assign( 1 );
|
|
1252
|
+
output.assign( vec4( weightedColor, worldDistance ) );
|
|
1253
|
+
|
|
1254
|
+
} );
|
|
1255
|
+
|
|
1256
|
+
} );
|
|
1257
|
+
|
|
1258
|
+
// Screen-space ray missed: environment fallback (MIS when CDF env is set up).
|
|
1259
|
+
If( hit.equal( 0 ), () => {
|
|
1260
|
+
|
|
1261
|
+
if ( this.stochastic === true ) {
|
|
1262
|
+
|
|
1263
|
+
output.assign( vec4( sampleEnvReflection().mul( this.environmentIntensity ), float( ENV_RAY_LENGTH ) ) );
|
|
1264
|
+
|
|
1265
|
+
// Misses fade by the surface pixel UV (where the reflection is being shaded).
|
|
1266
|
+
if ( this.screenEdgeFadeBlack ) {
|
|
1267
|
+
|
|
1268
|
+
output.rgb.mulAssign( surfaceBorderFactor );
|
|
1269
|
+
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
} );
|
|
1275
|
+
|
|
1276
|
+
const lum = luminance( output.rgb ).max( 1e-4 ).toVar();
|
|
1277
|
+
output.rgb.mulAssign( this.maxLuminance.div( lum ).min( 1 ) );
|
|
1278
|
+
|
|
1279
|
+
// scale the reflection color by the user-controlled intensity
|
|
1280
|
+
output.rgb.mulAssign( this.intensity );
|
|
1281
|
+
|
|
1282
|
+
return output.max( 0 );
|
|
1283
|
+
|
|
1284
|
+
} );
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
this._ssrFn = ssr;
|
|
1288
|
+
this._sharedContext = builder.getSharedContext();
|
|
1289
|
+
this._buildSSRMaterial();
|
|
1290
|
+
|
|
1291
|
+
const reflectionBuffer = texture( this._ssrRenderTarget.texture );
|
|
1292
|
+
|
|
1293
|
+
if ( this.stochastic === false ) {
|
|
1294
|
+
|
|
1295
|
+
this._buildBlurMaterial();
|
|
1296
|
+
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
this._copyMaterial.fragmentNode = reflectionBuffer;
|
|
1300
|
+
this._copyMaterial.needsUpdate = true;
|
|
1301
|
+
|
|
1302
|
+
//
|
|
1303
|
+
|
|
1304
|
+
return this.getTextureNode();
|
|
1305
|
+
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
getRenderTarget() {
|
|
1309
|
+
|
|
1310
|
+
return this._ssrRenderTarget;
|
|
1311
|
+
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* Frees internal resources. This method should be called
|
|
1316
|
+
* when the effect is no longer required.
|
|
1317
|
+
*/
|
|
1318
|
+
dispose() {
|
|
1319
|
+
|
|
1320
|
+
super.dispose();
|
|
1321
|
+
|
|
1322
|
+
this._ssrRenderTarget.dispose();
|
|
1323
|
+
this._blurRenderTarget.dispose();
|
|
1324
|
+
|
|
1325
|
+
this._ssrMaterial.dispose();
|
|
1326
|
+
this._blurMaterial.dispose();
|
|
1327
|
+
this._copyMaterial.dispose();
|
|
1328
|
+
|
|
1329
|
+
if ( this._importanceEnvironment !== null ) {
|
|
1330
|
+
|
|
1331
|
+
this._importanceEnvironment.dispose();
|
|
1332
|
+
this._importanceEnvironment = null;
|
|
1333
|
+
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
export default SSRNode;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* TSL function for creating screen space reflections (SSR).
|
|
1344
|
+
*
|
|
1345
|
+
* @tsl
|
|
1346
|
+
* @function
|
|
1347
|
+
* @param {Node<vec4>} colorNode - The node that represents the beauty pass.
|
|
1348
|
+
* @param {Node<float>} depthNode - A node that represents the beauty pass's depth.
|
|
1349
|
+
* @param {Node<vec3>} normalNode - A node that represents the beauty pass's normals.
|
|
1350
|
+
* @param {SSRNodeOptions} [options] - Optional inputs for material and environment data.
|
|
1351
|
+
* @returns {SSRNode}
|
|
1352
|
+
*/
|
|
1353
|
+
export const ssr = ( colorNode, depthNode, normalNode, options = {} ) => nodeObject( new SSRNode(
|
|
1354
|
+
nodeObject( colorNode ),
|
|
1355
|
+
nodeObject( depthNode ),
|
|
1356
|
+
nodeObject( normalNode ),
|
|
1357
|
+
options
|
|
1358
|
+
) );
|