gaussian-splat-lite 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -2
- package/CONTRIBUTING.md +4 -2
- package/README.md +4 -3
- package/dist/gaussian-splat-lite.cjs +6379 -1441
- package/dist/gaussian-splat-lite.cjs.map +1 -1
- package/dist/gaussian-splat-lite.min.cjs +978 -11
- package/dist/gaussian-splat-lite.min.cjs.map +1 -1
- package/dist/gaussian-splat-lite.module.js +5920 -982
- package/dist/gaussian-splat-lite.module.js.map +1 -1
- package/dist/gaussian-splat-lite.module.min.js +7882 -3373
- package/dist/gaussian-splat-lite.module.min.js.map +1 -1
- package/dist/types/addons/NeuralDenoiseNode.d.cts +72 -0
- package/dist/types/addons/NeuralDenoiseNode.d.ts +72 -0
- package/dist/types/addons/NeuralDenoisePass.d.cts +34 -0
- package/dist/types/addons/NeuralDenoisePass.d.ts +34 -0
- package/dist/types/addons/TAANode.d.cts +46 -33
- package/dist/types/addons/TAANode.d.ts +46 -33
- package/dist/types/addons/TAAPass.d.cts +47 -32
- package/dist/types/addons/TAAPass.d.ts +47 -32
- package/dist/types/addons/neuralDenoiseGL.d.cts +25 -0
- package/dist/types/addons/neuralDenoiseGL.d.ts +25 -0
- package/dist/types/addons/neuralDenoiseGLSL.d.cts +8 -0
- package/dist/types/addons/neuralDenoiseGLSL.d.ts +8 -0
- package/dist/types/addons/neuralDenoisePasses.d.cts +26 -0
- package/dist/types/addons/neuralDenoisePasses.d.ts +26 -0
- package/dist/types/addons/neuralDenoiseShaders.d.cts +38 -0
- package/dist/types/addons/neuralDenoiseShaders.d.ts +38 -0
- package/dist/types/addons/neuralDenoiseWeights.d.cts +118 -0
- package/dist/types/addons/neuralDenoiseWeights.d.ts +118 -0
- package/dist/types/addons/stochasticCoverage.d.cts +14 -0
- package/dist/types/addons/stochasticCoverage.d.ts +14 -0
- package/dist/types/addons/taaShared.d.cts +58 -39
- package/dist/types/addons/taaShared.d.ts +58 -39
- package/dist/types/capture/SplatCapture.d.cts +54 -53
- package/dist/types/capture/SplatCapture.d.ts +54 -53
- package/dist/types/capture/WebGLCapture.d.cts +10 -10
- package/dist/types/capture/WebGLCapture.d.ts +10 -10
- package/dist/types/capture/WebGPUCapture.d.cts +14 -14
- package/dist/types/capture/WebGPUCapture.d.ts +14 -14
- package/dist/types/capture/pixels.d.cts +15 -4
- package/dist/types/capture/pixels.d.ts +15 -4
- package/dist/types/capture/rendererState.d.cts +5 -2
- package/dist/types/capture/rendererState.d.ts +5 -2
- package/dist/types/data/IndexedSplats.d.cts +76 -58
- package/dist/types/data/IndexedSplats.d.ts +76 -58
- package/dist/types/data/RadPagedSplats.d.cts +65 -61
- package/dist/types/data/RadPagedSplats.d.ts +65 -61
- package/dist/types/data/SogRegionSplats.d.cts +25 -19
- package/dist/types/data/SogRegionSplats.d.ts +25 -19
- package/dist/types/data/SplatOpacityTable.d.cts +29 -29
- package/dist/types/data/SplatOpacityTable.d.ts +29 -29
- package/dist/types/data/Splats.d.cts +99 -69
- package/dist/types/data/Splats.d.ts +99 -69
- package/dist/types/data/defines.d.cts +24 -24
- package/dist/types/data/defines.d.ts +24 -24
- package/dist/types/data/raycast.d.cts +13 -9
- package/dist/types/data/raycast.d.ts +13 -9
- package/dist/types/data/splatCodec.d.cts +29 -5
- package/dist/types/data/splatCodec.d.ts +29 -5
- package/dist/types/data/splatData.d.cts +18 -11
- package/dist/types/data/splatData.d.ts +18 -11
- package/dist/types/data/splatRange.d.cts +6 -2
- package/dist/types/data/splatRange.d.ts +6 -2
- package/dist/types/data/textureLayout.d.cts +9 -6
- package/dist/types/data/textureLayout.d.ts +9 -6
- package/dist/types/data/unpack.d.cts +16 -9
- package/dist/types/data/unpack.d.ts +16 -9
- package/dist/types/index.d.cts +65 -19
- package/dist/types/index.d.ts +65 -19
- package/dist/types/loaders/SplatLoader.d.cts +27 -14
- package/dist/types/loaders/SplatLoader.d.ts +27 -14
- package/dist/types/loaders/loadSplatData.d.cts +35 -17
- package/dist/types/loaders/loadSplatData.d.ts +35 -17
- package/dist/types/loaders/loadTypes.d.cts +46 -40
- package/dist/types/loaders/loadTypes.d.ts +46 -40
- package/dist/types/loaders/morton.d.cts +9 -3
- package/dist/types/loaders/morton.d.ts +9 -3
- package/dist/types/loaders/postDecode/builder.d.cts +222 -127
- package/dist/types/loaders/postDecode/builder.d.ts +222 -127
- package/dist/types/loaders/postDecode/compiler.d.cts +25 -11
- package/dist/types/loaders/postDecode/compiler.d.ts +25 -11
- package/dist/types/loaders/postDecode/operations.d.cts +22 -3
- package/dist/types/loaders/postDecode/operations.d.ts +22 -3
- package/dist/types/loaders/postDecode/optimizer.d.cts +5 -2
- package/dist/types/loaders/postDecode/optimizer.d.ts +5 -2
- package/dist/types/loaders/postDecode/program.d.cts +13 -6
- package/dist/types/loaders/postDecode/program.d.ts +13 -6
- package/dist/types/loaders/postDecode/protocol.d.cts +136 -111
- package/dist/types/loaders/postDecode/protocol.d.ts +136 -111
- package/dist/types/loaders/postDecode/registers.d.cts +12 -7
- package/dist/types/loaders/postDecode/registers.d.ts +12 -7
- package/dist/types/loaders/postDecode/runtime.d.cts +9 -2
- package/dist/types/loaders/postDecode/runtime.d.ts +9 -2
- package/dist/types/loaders/rad/RadSource.d.cts +81 -66
- package/dist/types/loaders/rad/RadSource.d.ts +81 -66
- package/dist/types/loaders/rad/radFormat.d.cts +41 -36
- package/dist/types/loaders/rad/radFormat.d.ts +41 -36
- package/dist/types/loaders/rad.d.cts +4 -4
- package/dist/types/loaders/rad.d.ts +4 -4
- package/dist/types/loaders/sog/SogSource.d.cts +14 -4
- package/dist/types/loaders/sog/SogSource.d.ts +14 -4
- package/dist/types/loaders/sog/sogZip.d.cts +12 -12
- package/dist/types/loaders/sog/sogZip.d.ts +12 -12
- package/dist/types/loaders/sog.d.cts +3 -3
- package/dist/types/loaders/sog.d.ts +3 -3
- package/dist/types/loaders/source.d.cts +43 -15
- package/dist/types/loaders/source.d.ts +43 -15
- package/dist/types/loaders/stream/StreamByteBudget.d.cts +4 -4
- package/dist/types/loaders/stream/StreamByteBudget.d.ts +4 -4
- package/dist/types/loaders/stream/StreamCameras.d.cts +27 -18
- package/dist/types/loaders/stream/StreamCameras.d.ts +27 -18
- package/dist/types/loaders/stream/StreamWorkerPool.d.cts +37 -34
- package/dist/types/loaders/stream/StreamWorkerPool.d.ts +37 -34
- package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.cts +15 -11
- package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.ts +15 -11
- package/dist/types/loaders/stream/rad-stream/RadStreamBatch.d.cts +13 -9
- package/dist/types/loaders/stream/rad-stream/RadStreamBatch.d.ts +13 -9
- package/dist/types/loaders/stream/rad-stream/RadStreamLoader.d.cts +64 -49
- package/dist/types/loaders/stream/rad-stream/RadStreamLoader.d.ts +64 -49
- package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.cts +110 -102
- package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.ts +110 -102
- package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.cts +3 -3
- package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.ts +3 -3
- package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.cts +27 -15
- package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.ts +27 -15
- package/dist/types/loaders/stream/rad-stream/radFade.d.cts +13 -8
- package/dist/types/loaders/stream/rad-stream/radFade.d.ts +13 -8
- package/dist/types/loaders/stream/rad-stream/radLod.d.cts +26 -26
- package/dist/types/loaders/stream/rad-stream/radLod.d.ts +26 -26
- package/dist/types/loaders/stream/rad-stream/worker.d.cts +3 -59
- package/dist/types/loaders/stream/rad-stream/worker.d.ts +3 -59
- package/dist/types/loaders/stream/rad-stream/workerHandlers.d.cts +85 -59
- package/dist/types/loaders/stream/rad-stream/workerHandlers.d.ts +85 -59
- package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.cts +17 -12
- package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.ts +17 -12
- package/dist/types/loaders/stream/sog-stream/SogStreamLoader.d.cts +56 -41
- package/dist/types/loaders/stream/sog-stream/SogStreamLoader.d.ts +56 -41
- package/dist/types/loaders/stream/sog-stream/SogStreamScheduler.d.cts +82 -81
- package/dist/types/loaders/stream/sog-stream/SogStreamScheduler.d.ts +82 -81
- package/dist/types/loaders/stream/sog-stream/SogStreamWorker.d.cts +3 -3
- package/dist/types/loaders/stream/sog-stream/SogStreamWorker.d.ts +3 -3
- package/dist/types/loaders/stream/sog-stream/sogLod.d.cts +59 -44
- package/dist/types/loaders/stream/sog-stream/sogLod.d.ts +59 -44
- package/dist/types/loaders/stream/sog-stream/sogVisibility.d.cts +30 -22
- package/dist/types/loaders/stream/sog-stream/sogVisibility.d.ts +30 -22
- package/dist/types/loaders/stream/sog-stream/worker.d.cts +7 -40
- package/dist/types/loaders/stream/sog-stream/worker.d.ts +7 -40
- package/dist/types/loaders/stream/sog-stream/workerHandlers.d.cts +69 -44
- package/dist/types/loaders/stream/sog-stream/workerHandlers.d.ts +69 -44
- package/dist/types/loaders/stream/streamOptions.d.cts +41 -32
- package/dist/types/loaders/stream/streamOptions.d.ts +41 -32
- package/dist/types/loaders/workerDecode.d.cts +30 -12
- package/dist/types/loaders/workerDecode.d.ts +30 -12
- package/dist/types/patches/threeR186.d.cts +3 -0
- package/dist/types/patches/threeR186.d.ts +3 -0
- package/dist/types/rendering/GaussianSplatRenderer.d.cts +393 -376
- package/dist/types/rendering/GaussianSplatRenderer.d.ts +393 -376
- package/dist/types/rendering/MaterialState.d.cts +9 -0
- package/dist/types/rendering/MaterialState.d.ts +9 -0
- package/dist/types/rendering/SortCenterCache.d.cts +17 -17
- package/dist/types/rendering/SortCenterCache.d.ts +17 -17
- package/dist/types/rendering/SplatAccumulator.d.cts +93 -77
- package/dist/types/rendering/SplatAccumulator.d.ts +93 -77
- package/dist/types/rendering/SplatGeometry.d.cts +2 -2
- package/dist/types/rendering/SplatGeometry.d.ts +2 -2
- package/dist/types/rendering/StochasticSplatMaterial.d.cts +14 -0
- package/dist/types/rendering/StochasticSplatMaterial.d.ts +14 -0
- package/dist/types/rendering/backend.d.cts +30 -18
- package/dist/types/rendering/backend.d.ts +30 -18
- package/dist/types/rendering/blueNoise.d.cts +1 -1
- package/dist/types/rendering/blueNoise.d.ts +1 -1
- package/dist/types/rendering/rendererUtils.d.cts +25 -10
- package/dist/types/rendering/rendererUtils.d.ts +25 -10
- package/dist/types/rendering/tsl/GenerateProgram.d.cts +19 -17
- package/dist/types/rendering/tsl/GenerateProgram.d.ts +19 -17
- package/dist/types/rendering/tsl/ProjectionProgram.d.cts +38 -33
- package/dist/types/rendering/tsl/ProjectionProgram.d.ts +38 -33
- package/dist/types/rendering/tsl/SplatBackend.d.cts +22 -10
- package/dist/types/rendering/tsl/SplatBackend.d.ts +22 -10
- package/dist/types/rendering/tsl/SplatMaterial.d.cts +38 -25
- package/dist/types/rendering/tsl/SplatMaterial.d.ts +38 -25
- package/dist/types/rendering/tsl/shaderUtils.d.cts +55 -17
- package/dist/types/rendering/tsl/shaderUtils.d.ts +55 -17
- package/dist/types/rendering/tsl/stochasticCoverage.d.cts +7 -0
- package/dist/types/rendering/tsl/stochasticCoverage.d.ts +7 -0
- package/dist/types/rendering/tsl/viewUniforms.d.cts +19 -9
- package/dist/types/rendering/tsl/viewUniforms.d.ts +19 -9
- package/dist/types/rendering/uniforms.d.cts +83 -83
- package/dist/types/rendering/uniforms.d.ts +83 -83
- package/dist/types/rendering/webgl/AccumulatorGenerator.d.cts +28 -12
- package/dist/types/rendering/webgl/AccumulatorGenerator.d.ts +28 -12
- package/dist/types/rendering/webgl/OrderingTexture.d.cts +10 -7
- package/dist/types/rendering/webgl/OrderingTexture.d.ts +10 -7
- package/dist/types/rendering/webgl/SplatBackend.d.cts +20 -15
- package/dist/types/rendering/webgl/SplatBackend.d.ts +20 -15
- package/dist/types/rendering/webgl/SplatMaterial.d.cts +9 -4
- package/dist/types/rendering/webgl/SplatMaterial.d.ts +9 -4
- package/dist/types/rendering/webgl/textureUtils.d.cts +10 -3
- package/dist/types/rendering/webgl/textureUtils.d.ts +10 -3
- package/dist/types/rendering/webgl-fallback/AccumulatorGenerator.d.cts +8 -10
- package/dist/types/rendering/webgl-fallback/AccumulatorGenerator.d.ts +8 -10
- package/dist/types/rendering/webgl-fallback/SplatBackend.d.cts +18 -14
- package/dist/types/rendering/webgl-fallback/SplatBackend.d.ts +18 -14
- package/dist/types/rendering/webgpu/ProjectedSplats.d.cts +76 -66
- package/dist/types/rendering/webgpu/ProjectedSplats.d.ts +76 -66
- package/dist/types/rendering/webgpu/ProjectionCache.d.cts +43 -28
- package/dist/types/rendering/webgpu/ProjectionCache.d.ts +43 -28
- package/dist/types/rendering/webgpu/ProjectionKernel.d.cts +22 -0
- package/dist/types/rendering/webgpu/ProjectionKernel.d.ts +22 -0
- package/dist/types/rendering/webgpu/RadixSort.d.cts +44 -40
- package/dist/types/rendering/webgpu/RadixSort.d.ts +44 -40
- package/dist/types/rendering/webgpu/SplatBackend.d.cts +14 -12
- package/dist/types/rendering/webgpu/SplatBackend.d.ts +14 -12
- package/dist/types/runtime/SplatWorker.d.cts +17 -13
- package/dist/types/runtime/SplatWorker.d.ts +17 -13
- package/dist/types/runtime/WorkerRpc.d.cts +26 -20
- package/dist/types/runtime/WorkerRpc.d.ts +26 -20
- package/dist/types/runtime/abort.d.cts +10 -5
- package/dist/types/runtime/abort.d.ts +10 -5
- package/dist/types/runtime/retry.d.cts +6 -6
- package/dist/types/runtime/retry.d.ts +6 -6
- package/dist/types/runtime/wasmCall.d.cts +3 -3
- package/dist/types/runtime/wasmCall.d.ts +3 -3
- package/dist/types/runtime/worker.d.cts +44 -24
- package/dist/types/runtime/worker.d.ts +44 -24
- package/dist/types/runtime/workerServer.d.cts +3 -1
- package/dist/types/runtime/workerServer.d.ts +3 -1
- package/dist/types/scene/SplatEdit.d.cts +74 -67
- package/dist/types/scene/SplatEdit.d.ts +74 -67
- package/dist/types/scene/SplatMesh.d.cts +92 -70
- package/dist/types/scene/SplatMesh.d.ts +92 -70
- package/dist/types/utils/index.d.cts +15 -7
- package/dist/types/utils/index.d.ts +15 -7
- package/dist/types/utils/three.d.cts +3 -3
- package/dist/types/utils/three.d.ts +3 -3
- package/dist/types/utils/transforms.d.cts +10 -3
- package/dist/types/utils/transforms.d.ts +10 -3
- package/docs/GaussianSplatRenderer.md +3 -1
- package/docs/NeuralDenoiseNode.md +148 -0
- package/docs/SplatMesh.md +1 -1
- package/docs/StochasticRendering.md +36 -10
- package/docs/TAAPass.md +20 -3
- package/package.json +9 -11
- package/dist/types/capture/sceneView.d.cts +0 -3
- package/dist/types/capture/sceneView.d.ts +0 -3
- package/dist/types/rendering/tsl/tslCompat.d.cts +0 -68
- package/dist/types/rendering/tsl/tslCompat.d.ts +0 -68
- package/docs/Architecture.md +0 -200
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
type WebGPURenderer = import(
|
|
3
|
-
export type GaussianSplatCompatibleRenderer =
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
type WebGPURenderer = import("three/webgpu").WebGPURenderer;
|
|
3
|
+
export type GaussianSplatCompatibleRenderer =
|
|
4
|
+
| THREE.WebGLRenderer
|
|
5
|
+
| WebGPURenderer;
|
|
6
|
+
export declare function isWebGPURenderer(
|
|
7
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
8
|
+
): renderer is WebGPURenderer;
|
|
9
|
+
export declare function usesNativeWebGPU(
|
|
10
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
11
|
+
): boolean;
|
|
6
12
|
/**
|
|
7
13
|
* The eyes of a WebXR camera, or the camera itself. An ArrayCamera without
|
|
8
14
|
* eyes draws as a single view.
|
|
@@ -13,9 +19,18 @@ export declare function getViews(camera: THREE.Camera): THREE.Camera[];
|
|
|
13
19
|
* or for WebXR eyes the shared head. Reads world matrices as Three composed
|
|
14
20
|
* them with any camera rig.
|
|
15
21
|
*/
|
|
16
|
-
export declare function getMeanViewPose(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
export declare function getMeanViewPose(
|
|
23
|
+
views: readonly THREE.Camera[],
|
|
24
|
+
position: THREE.Vector3,
|
|
25
|
+
direction: THREE.Vector3,
|
|
26
|
+
): void;
|
|
27
|
+
export declare function getRenderFrame(
|
|
28
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
29
|
+
): number;
|
|
30
|
+
export declare function isXRRenderTarget(
|
|
31
|
+
renderTarget: THREE.RenderTarget | null,
|
|
32
|
+
): boolean;
|
|
33
|
+
export declare function assertSupportedRenderer(
|
|
34
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
35
|
+
): void;
|
|
21
36
|
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
type WebGPURenderer = import(
|
|
3
|
-
export type GaussianSplatCompatibleRenderer =
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
type WebGPURenderer = import("three/webgpu").WebGPURenderer;
|
|
3
|
+
export type GaussianSplatCompatibleRenderer =
|
|
4
|
+
| THREE.WebGLRenderer
|
|
5
|
+
| WebGPURenderer;
|
|
6
|
+
export declare function isWebGPURenderer(
|
|
7
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
8
|
+
): renderer is WebGPURenderer;
|
|
9
|
+
export declare function usesNativeWebGPU(
|
|
10
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
11
|
+
): boolean;
|
|
6
12
|
/**
|
|
7
13
|
* The eyes of a WebXR camera, or the camera itself. An ArrayCamera without
|
|
8
14
|
* eyes draws as a single view.
|
|
@@ -13,9 +19,18 @@ export declare function getViews(camera: THREE.Camera): THREE.Camera[];
|
|
|
13
19
|
* or for WebXR eyes the shared head. Reads world matrices as Three composed
|
|
14
20
|
* them with any camera rig.
|
|
15
21
|
*/
|
|
16
|
-
export declare function getMeanViewPose(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
export declare function getMeanViewPose(
|
|
23
|
+
views: readonly THREE.Camera[],
|
|
24
|
+
position: THREE.Vector3,
|
|
25
|
+
direction: THREE.Vector3,
|
|
26
|
+
): void;
|
|
27
|
+
export declare function getRenderFrame(
|
|
28
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
29
|
+
): number;
|
|
30
|
+
export declare function isXRRenderTarget(
|
|
31
|
+
renderTarget: THREE.RenderTarget | null,
|
|
32
|
+
): boolean;
|
|
33
|
+
export declare function assertSupportedRenderer(
|
|
34
|
+
renderer: GaussianSplatCompatibleRenderer,
|
|
35
|
+
): void;
|
|
21
36
|
export {};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { Node } from
|
|
2
|
-
import { Uniforms } from
|
|
3
|
-
export declare function createGenerateProgram({
|
|
4
|
-
|
|
1
|
+
import type { Node } from "three/webgpu";
|
|
2
|
+
import type { Uniforms } from "../uniforms.cjs";
|
|
3
|
+
export declare function createGenerateProgram({
|
|
4
|
+
uniforms,
|
|
5
|
+
}: {
|
|
6
|
+
uniforms: Uniforms;
|
|
5
7
|
}): ((index: Node<"uint">) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
accumulatorA: Node<"uvec4">;
|
|
9
|
+
accumulatorB: Node<"uvec4">;
|
|
10
|
+
stochasticSeed: Node<"uint">;
|
|
9
11
|
}) & {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
prepare: (index: Node<"uint">) => {
|
|
13
|
+
resolveRgb: () => Node<"vec3">;
|
|
14
|
+
valid: Node<"bool">;
|
|
15
|
+
center: Node<"vec3">;
|
|
16
|
+
lnScales: Node<"vec3">;
|
|
17
|
+
quaternion: Node<"vec4">;
|
|
18
|
+
rgba: Node<"vec4">;
|
|
19
|
+
shapeAmount: Node<"float">;
|
|
20
|
+
stochasticSeed: Node<"uint">;
|
|
21
|
+
};
|
|
20
22
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { Node } from
|
|
2
|
-
import { Uniforms } from
|
|
3
|
-
export declare function createGenerateProgram({
|
|
4
|
-
|
|
1
|
+
import type { Node } from "three/webgpu";
|
|
2
|
+
import type { Uniforms } from "../uniforms.js";
|
|
3
|
+
export declare function createGenerateProgram({
|
|
4
|
+
uniforms,
|
|
5
|
+
}: {
|
|
6
|
+
uniforms: Uniforms;
|
|
5
7
|
}): ((index: Node<"uint">) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
accumulatorA: Node<"uvec4">;
|
|
9
|
+
accumulatorB: Node<"uvec4">;
|
|
10
|
+
stochasticSeed: Node<"uint">;
|
|
9
11
|
}) & {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
prepare: (index: Node<"uint">) => {
|
|
13
|
+
resolveRgb: () => Node<"vec3">;
|
|
14
|
+
valid: Node<"bool">;
|
|
15
|
+
center: Node<"vec3">;
|
|
16
|
+
lnScales: Node<"vec3">;
|
|
17
|
+
quaternion: Node<"vec4">;
|
|
18
|
+
rgba: Node<"vec4">;
|
|
19
|
+
shapeAmount: Node<"float">;
|
|
20
|
+
stochasticSeed: Node<"uint">;
|
|
21
|
+
};
|
|
20
22
|
};
|
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
import { Node } from
|
|
2
|
-
import { Uniforms } from
|
|
1
|
+
import type { Node } from "three/webgpu";
|
|
2
|
+
import type { Uniforms } from "../uniforms.cjs";
|
|
3
3
|
export type ProjectionView = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
type ProjectionInput = {
|
|
13
|
-
first: Node<"uvec4">;
|
|
14
|
-
second: Node<"uvec4">;
|
|
15
|
-
} | {
|
|
16
|
-
valid: Node<"bool">;
|
|
17
|
-
center: Node<"vec3">;
|
|
18
|
-
lnScales: Node<"vec3">;
|
|
19
|
-
quaternion: Node<"vec4">;
|
|
20
|
-
rgba: Node<"vec4">;
|
|
21
|
-
shapeAmount: Node<"float">;
|
|
4
|
+
projectionMatrix: Node<"mat4">;
|
|
5
|
+
renderToViewQuat: Node<"vec4">;
|
|
6
|
+
renderToViewPos: Node<"vec3">;
|
|
7
|
+
renderToViewScale: Node<"float">;
|
|
8
|
+
near: Node<"float">;
|
|
9
|
+
far: Node<"float">;
|
|
10
|
+
renderSize: Node<"vec2">;
|
|
22
11
|
};
|
|
12
|
+
type ProjectionInput =
|
|
13
|
+
| {
|
|
14
|
+
first: Node<"uvec4">;
|
|
15
|
+
second: Node<"uvec4">;
|
|
16
|
+
}
|
|
17
|
+
| {
|
|
18
|
+
valid: Node<"bool">;
|
|
19
|
+
center: Node<"vec3">;
|
|
20
|
+
lnScales: Node<"vec3">;
|
|
21
|
+
quaternion: Node<"vec4">;
|
|
22
|
+
rgba: Node<"vec4">;
|
|
23
|
+
shapeAmount: Node<"float">;
|
|
24
|
+
};
|
|
23
25
|
export type SplatProjection = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
valid: Node<"bool">;
|
|
27
|
+
clipCenter: Node<"vec4">;
|
|
28
|
+
viewDepth: Node<"float">;
|
|
29
|
+
/** NDC offsets for each +/-1 quad corner. */
|
|
30
|
+
axis1: Node<"vec2">;
|
|
31
|
+
axis2: Node<"vec2">;
|
|
32
|
+
/** Source color space; the draw stage applies encodeLinear. */
|
|
33
|
+
rgba: Node<"vec4">;
|
|
34
|
+
supportRadius: Node<"float">;
|
|
35
|
+
/** A wide kernel's low 16 bits hold its edge fade as a half. */
|
|
36
|
+
supportRadiusSquared: Node<"float">;
|
|
37
|
+
kernelPower: Node<"float">;
|
|
36
38
|
};
|
|
37
39
|
/** Shared projection for vertex and compute paths. Call inside a TSL Fn. */
|
|
38
|
-
export declare function createProjectionProgram(
|
|
40
|
+
export declare function createProjectionProgram(
|
|
41
|
+
uniforms: Uniforms,
|
|
42
|
+
view: ProjectionView,
|
|
43
|
+
): (source: ProjectionInput, includeColor?: boolean) => SplatProjection;
|
|
39
44
|
export {};
|
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
import { Node } from
|
|
2
|
-
import { Uniforms } from
|
|
1
|
+
import type { Node } from "three/webgpu";
|
|
2
|
+
import type { Uniforms } from "../uniforms.js";
|
|
3
3
|
export type ProjectionView = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
type ProjectionInput = {
|
|
13
|
-
first: Node<"uvec4">;
|
|
14
|
-
second: Node<"uvec4">;
|
|
15
|
-
} | {
|
|
16
|
-
valid: Node<"bool">;
|
|
17
|
-
center: Node<"vec3">;
|
|
18
|
-
lnScales: Node<"vec3">;
|
|
19
|
-
quaternion: Node<"vec4">;
|
|
20
|
-
rgba: Node<"vec4">;
|
|
21
|
-
shapeAmount: Node<"float">;
|
|
4
|
+
projectionMatrix: Node<"mat4">;
|
|
5
|
+
renderToViewQuat: Node<"vec4">;
|
|
6
|
+
renderToViewPos: Node<"vec3">;
|
|
7
|
+
renderToViewScale: Node<"float">;
|
|
8
|
+
near: Node<"float">;
|
|
9
|
+
far: Node<"float">;
|
|
10
|
+
renderSize: Node<"vec2">;
|
|
22
11
|
};
|
|
12
|
+
type ProjectionInput =
|
|
13
|
+
| {
|
|
14
|
+
first: Node<"uvec4">;
|
|
15
|
+
second: Node<"uvec4">;
|
|
16
|
+
}
|
|
17
|
+
| {
|
|
18
|
+
valid: Node<"bool">;
|
|
19
|
+
center: Node<"vec3">;
|
|
20
|
+
lnScales: Node<"vec3">;
|
|
21
|
+
quaternion: Node<"vec4">;
|
|
22
|
+
rgba: Node<"vec4">;
|
|
23
|
+
shapeAmount: Node<"float">;
|
|
24
|
+
};
|
|
23
25
|
export type SplatProjection = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
valid: Node<"bool">;
|
|
27
|
+
clipCenter: Node<"vec4">;
|
|
28
|
+
viewDepth: Node<"float">;
|
|
29
|
+
/** NDC offsets for each +/-1 quad corner. */
|
|
30
|
+
axis1: Node<"vec2">;
|
|
31
|
+
axis2: Node<"vec2">;
|
|
32
|
+
/** Source color space; the draw stage applies encodeLinear. */
|
|
33
|
+
rgba: Node<"vec4">;
|
|
34
|
+
supportRadius: Node<"float">;
|
|
35
|
+
/** A wide kernel's low 16 bits hold its edge fade as a half. */
|
|
36
|
+
supportRadiusSquared: Node<"float">;
|
|
37
|
+
kernelPower: Node<"float">;
|
|
36
38
|
};
|
|
37
39
|
/** Shared projection for vertex and compute paths. Call inside a TSL Fn. */
|
|
38
|
-
export declare function createProjectionProgram(
|
|
40
|
+
export declare function createProjectionProgram(
|
|
41
|
+
uniforms: Uniforms,
|
|
42
|
+
view: ProjectionView,
|
|
43
|
+
): (source: ProjectionInput, includeColor?: boolean) => SplatProjection;
|
|
39
44
|
export {};
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
import { TextureNode, WebGPURenderer } from 'three/webgpu';
|
|
2
|
-
import { SplatMaterialOptions } from '../backend.cjs';
|
|
3
|
-
import { Uniforms } from '../uniforms.cjs';
|
|
4
|
-
import { ProjectedVertexData, SplatNodeMaterial } from './SplatMaterial.cjs';
|
|
5
1
|
import type * as THREE from "three";
|
|
2
|
+
import type { TextureNode, WebGPURenderer } from "three/webgpu";
|
|
3
|
+
import type { SplatMaterialOptions } from "../backend.cjs";
|
|
4
|
+
import type { Uniforms } from "../uniforms.cjs";
|
|
5
|
+
import type {
|
|
6
|
+
ProjectedVertexData,
|
|
7
|
+
SplatNodeMaterial,
|
|
8
|
+
} from "./SplatMaterial.cjs";
|
|
6
9
|
/** Drawing shared by both WebGPURenderer backends. */
|
|
7
10
|
export declare class NodeSplatBackend {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
readonly renderer: WebGPURenderer;
|
|
12
|
+
readonly sortedMaterial: SplatNodeMaterial;
|
|
13
|
+
readonly stochasticMaterial: SplatNodeMaterial;
|
|
14
|
+
constructor(
|
|
15
|
+
renderer: WebGPURenderer,
|
|
16
|
+
uniforms: Uniforms,
|
|
17
|
+
options: SplatMaterialOptions,
|
|
18
|
+
orderingNode?: TextureNode<"uvec4">,
|
|
19
|
+
vertexData?: (
|
|
20
|
+
camera: THREE.Camera,
|
|
21
|
+
stochastic: boolean,
|
|
22
|
+
) => ProjectedVertexData,
|
|
23
|
+
);
|
|
24
|
+
selectMaterial(stochastic: boolean): SplatNodeMaterial;
|
|
25
|
+
dispose(): void;
|
|
14
26
|
}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
import { TextureNode, WebGPURenderer } from 'three/webgpu';
|
|
2
|
-
import { SplatMaterialOptions } from '../backend';
|
|
3
|
-
import { Uniforms } from '../uniforms';
|
|
4
|
-
import { ProjectedVertexData, SplatNodeMaterial } from './SplatMaterial';
|
|
5
1
|
import type * as THREE from "three";
|
|
2
|
+
import type { TextureNode, WebGPURenderer } from "three/webgpu";
|
|
3
|
+
import type { SplatMaterialOptions } from "../backend.js";
|
|
4
|
+
import type { Uniforms } from "../uniforms.js";
|
|
5
|
+
import type {
|
|
6
|
+
ProjectedVertexData,
|
|
7
|
+
SplatNodeMaterial,
|
|
8
|
+
} from "./SplatMaterial.js";
|
|
6
9
|
/** Drawing shared by both WebGPURenderer backends. */
|
|
7
10
|
export declare class NodeSplatBackend {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
readonly renderer: WebGPURenderer;
|
|
12
|
+
readonly sortedMaterial: SplatNodeMaterial;
|
|
13
|
+
readonly stochasticMaterial: SplatNodeMaterial;
|
|
14
|
+
constructor(
|
|
15
|
+
renderer: WebGPURenderer,
|
|
16
|
+
uniforms: Uniforms,
|
|
17
|
+
options: SplatMaterialOptions,
|
|
18
|
+
orderingNode?: TextureNode<"uvec4">,
|
|
19
|
+
vertexData?: (
|
|
20
|
+
camera: THREE.Camera,
|
|
21
|
+
stochastic: boolean,
|
|
22
|
+
) => ProjectedVertexData,
|
|
23
|
+
);
|
|
24
|
+
selectMaterial(stochastic: boolean): SplatNodeMaterial;
|
|
25
|
+
dispose(): void;
|
|
14
26
|
}
|
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import type { Node } from "three/webgpu";
|
|
3
|
+
import type { NodeMaterial, TextureNode } from "three/webgpu";
|
|
4
|
+
import type { Uniforms } from "../uniforms.cjs";
|
|
4
5
|
export type ProjectedVertexData = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
clipPosition: Node<"vec4">;
|
|
7
|
+
/** Source color space; this material applies encodeLinear. */
|
|
8
|
+
rgba: Node<"vec4">;
|
|
9
|
+
splatUv: Node<"vec2">;
|
|
10
|
+
/** Stochastic variant only. */
|
|
11
|
+
stochasticSeed?: Node<"uint">;
|
|
12
|
+
/** A wide kernel's low 16 bits hold its edge fade as a half. */
|
|
13
|
+
supportRadiusSquared: Node<"float">;
|
|
14
|
+
kernelPower: Node<"float">;
|
|
15
|
+
viewportOrigin: Node<"vec2">;
|
|
15
16
|
};
|
|
16
17
|
export type SplatNodeMaterial = NodeMaterial & {
|
|
17
|
-
|
|
18
|
+
uniforms: Uniforms;
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
21
|
* Sorted and stochastic variants compile separate graphs, so sorted drawing
|
|
21
22
|
* carries no coverage varyings, seed loads or mode branches.
|
|
22
23
|
*/
|
|
23
|
-
export declare function createSplatNodeMaterial({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
export declare function createSplatNodeMaterial({
|
|
25
|
+
uniforms,
|
|
26
|
+
orderingNode,
|
|
27
|
+
vertexData,
|
|
28
|
+
premultipliedAlpha,
|
|
29
|
+
transparent,
|
|
30
|
+
depthTest,
|
|
31
|
+
depthWrite,
|
|
32
|
+
stochastic,
|
|
33
|
+
}: {
|
|
34
|
+
uniforms: Uniforms;
|
|
35
|
+
/** CPU ordering for drawing from accumulator textures. */
|
|
36
|
+
orderingNode?: TextureNode<"uvec4">;
|
|
37
|
+
/** Replaces accumulator projection, e.g. with a GPU projection cache. */
|
|
38
|
+
vertexData?: (
|
|
39
|
+
camera: THREE.Camera,
|
|
40
|
+
stochastic: boolean,
|
|
41
|
+
) => ProjectedVertexData;
|
|
42
|
+
premultipliedAlpha: boolean;
|
|
43
|
+
transparent: boolean;
|
|
44
|
+
depthTest: boolean;
|
|
45
|
+
depthWrite: boolean;
|
|
46
|
+
stochastic: boolean;
|
|
34
47
|
}): SplatNodeMaterial;
|
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import type { Node } from "three/webgpu";
|
|
3
|
+
import type { NodeMaterial, TextureNode } from "three/webgpu";
|
|
4
|
+
import type { Uniforms } from "../uniforms.js";
|
|
4
5
|
export type ProjectedVertexData = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
clipPosition: Node<"vec4">;
|
|
7
|
+
/** Source color space; this material applies encodeLinear. */
|
|
8
|
+
rgba: Node<"vec4">;
|
|
9
|
+
splatUv: Node<"vec2">;
|
|
10
|
+
/** Stochastic variant only. */
|
|
11
|
+
stochasticSeed?: Node<"uint">;
|
|
12
|
+
/** A wide kernel's low 16 bits hold its edge fade as a half. */
|
|
13
|
+
supportRadiusSquared: Node<"float">;
|
|
14
|
+
kernelPower: Node<"float">;
|
|
15
|
+
viewportOrigin: Node<"vec2">;
|
|
15
16
|
};
|
|
16
17
|
export type SplatNodeMaterial = NodeMaterial & {
|
|
17
|
-
|
|
18
|
+
uniforms: Uniforms;
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
21
|
* Sorted and stochastic variants compile separate graphs, so sorted drawing
|
|
21
22
|
* carries no coverage varyings, seed loads or mode branches.
|
|
22
23
|
*/
|
|
23
|
-
export declare function createSplatNodeMaterial({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
export declare function createSplatNodeMaterial({
|
|
25
|
+
uniforms,
|
|
26
|
+
orderingNode,
|
|
27
|
+
vertexData,
|
|
28
|
+
premultipliedAlpha,
|
|
29
|
+
transparent,
|
|
30
|
+
depthTest,
|
|
31
|
+
depthWrite,
|
|
32
|
+
stochastic,
|
|
33
|
+
}: {
|
|
34
|
+
uniforms: Uniforms;
|
|
35
|
+
/** CPU ordering for drawing from accumulator textures. */
|
|
36
|
+
orderingNode?: TextureNode<"uvec4">;
|
|
37
|
+
/** Replaces accumulator projection, e.g. with a GPU projection cache. */
|
|
38
|
+
vertexData?: (
|
|
39
|
+
camera: THREE.Camera,
|
|
40
|
+
stochastic: boolean,
|
|
41
|
+
) => ProjectedVertexData;
|
|
42
|
+
premultipliedAlpha: boolean;
|
|
43
|
+
transparent: boolean;
|
|
44
|
+
depthTest: boolean;
|
|
45
|
+
depthWrite: boolean;
|
|
46
|
+
stochastic: boolean;
|
|
34
47
|
}): SplatNodeMaterial;
|
|
@@ -1,18 +1,56 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
export
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import type { Node, TSL, TextureNode, UniformNode } from "three/webgpu";
|
|
3
|
+
import type { Uniforms } from "../uniforms.cjs";
|
|
4
|
+
export * as N from "three/tsl";
|
|
5
|
+
export type UniformType =
|
|
6
|
+
| "bool"
|
|
7
|
+
| "float"
|
|
8
|
+
| "int"
|
|
9
|
+
| "uint"
|
|
10
|
+
| "vec2"
|
|
11
|
+
| "vec3"
|
|
12
|
+
| "vec4"
|
|
13
|
+
| "mat3"
|
|
14
|
+
| "mat4";
|
|
5
15
|
export declare const E: number;
|
|
6
|
-
|
|
7
|
-
export declare function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
/** Texture loads without a sampler, preserving the texture's integer format. */
|
|
17
|
+
export declare function uintTexture(
|
|
18
|
+
texture: THREE.Texture,
|
|
19
|
+
): TextureNode<"uvec4">;
|
|
20
|
+
export declare function uniformBinding<Type extends UniformType>(
|
|
21
|
+
uniforms: Uniforms,
|
|
22
|
+
name: string,
|
|
23
|
+
type: Type,
|
|
24
|
+
): UniformNode<Type, unknown>;
|
|
25
|
+
export declare function textureBinding(
|
|
26
|
+
uniforms: Uniforms,
|
|
27
|
+
name: string,
|
|
28
|
+
): TextureNode<"uvec4">;
|
|
29
|
+
export declare function load2D<T extends TextureNode<unknown>>(
|
|
30
|
+
binding: T,
|
|
31
|
+
coord: Node<"ivec2">,
|
|
32
|
+
): T;
|
|
33
|
+
export declare function loadArray<T extends TextureNode<unknown>>(
|
|
34
|
+
binding: T,
|
|
35
|
+
coord: Node<"ivec3">,
|
|
36
|
+
): T;
|
|
37
|
+
export declare const splatTexCoord: TSL.FnNode<[Node<"uint">], Node<"ivec3">>;
|
|
38
|
+
export declare const quatVec: TSL.FnNode<
|
|
39
|
+
[Node<"vec4"> | THREE.Vector4, THREE.Vector3 | Node<"vec3">],
|
|
40
|
+
Node<"vec3">
|
|
41
|
+
>;
|
|
42
|
+
export declare const quatQuat: TSL.FnNode<
|
|
43
|
+
[Node<"vec4"> | THREE.Vector4, Node<"vec4"> | THREE.Vector4],
|
|
44
|
+
Node<"vec4">
|
|
45
|
+
>;
|
|
46
|
+
export declare const decodeCenter: TSL.FnNode<[Node<"uvec4">], Node<"vec3">>;
|
|
47
|
+
export declare const decodeAlphaShape: TSL.FnNode<
|
|
48
|
+
[Node<"uvec4">],
|
|
49
|
+
Node<"vec2">
|
|
50
|
+
>;
|
|
51
|
+
export declare const decodeRgba: TSL.FnNode<
|
|
52
|
+
[Node<"uvec4">, number | Node<"uint"> | Node<"float">],
|
|
53
|
+
Node<"vec4">
|
|
54
|
+
>;
|
|
55
|
+
export declare const decodeLnScales: TSL.FnNode<[Node<"uvec4">], Node<"vec3">>;
|
|
56
|
+
export declare const decodeQuaternion: TSL.FnNode<[Node<"uint">], Node<"vec4">>;
|