Commit Graph

65 Commits

Author SHA1 Message Date
Philipp Mildenberger 018a3ed422 Support logarithmic depth buffer (#199)
* Support `logarithmicDepthBuffer`

* Use `#include <logdepthbuf_pars_vertex>`

* use includes everywhere if possible or reasonable
2025-10-23 10:15:00 -07:00
Noeri Huisman 296eaee20c Copy originToWorld values instead of holding a reference in SplatAccumulator (#191) 2025-10-14 10:52:04 -07:00
Noeri Huisman 5c2017e41d Fix incorrect return type for tryPcSogsZip (#183) 2025-09-29 11:30:18 -07:00
Noeri Huisman 15318d7016 Add minPixelRadius to skip splats below a given pixel radius (#184) 2025-09-29 09:16:38 -07:00
Noeri Huisman c6bb49d74d Use DecompressionStream for decompressing .spz files (#181) 2025-09-25 08:25:57 -07:00
Noeri Huisman 2defaf3f64 Add support for loading SOGSv2/SOG (#179) 2025-09-25 08:24:41 -07:00
Alexander Shortt b38184cae9 add rgba export (#178) 2025-09-23 18:11:04 -07:00
Greg Ash ccd2dd1243 Add SPZ v3 smallest 3 quaternion encoding support (#171)
Co-authored-by: George Ash <george@nianticspatial.com>
2025-09-22 14:38:18 -07:00
Diego Marcos Segura de9388d7b9 Add spz v3 loading support 2025-09-21 21:08:16 -07:00
Noeri Huisman f995e5cf66 Use Float16Array for to/fromHalf utilities if supported (#161) 2025-09-15 15:52:45 -07:00
Noeri Huisman 2d8b903f9d Avoid allocating THREE.Quaternion instances in setPackedSplat (#160) 2025-09-15 15:52:14 -07:00
Noeri Huisman d53bea9883 Pre-compute lookup tables when parsing SOGS files (#159) 2025-09-15 15:51:44 -07:00
Noeri Huisman 0c07ee2fd4 Use child mesh in SplatMesh to auto-inject SparkRenderer instead of monkey-patching (#158) 2025-09-15 14:54:50 -07:00
Noeri Huisman 3e9ee5f505 Ensure only one update timeout is scheduled at a time and call gl.flush() to encourage eager execution (#156) 2025-09-15 14:46:10 -07:00
Noeri Huisman 05581b4314 Add support for orthographic rendering (#157) 2025-09-11 16:10:57 -07:00
Noeri Huisman bafff1f531 Improve .ply parsing speed using compiled parser function (#150)
* Compile a parse function per element type in PlyReader

* Parse f_rest properties as array for faster .ply file parsing
2025-08-07 10:21:23 -07:00
Noeri Huisman 2f42e2e29c Reduce small memory allocations when loading ply files (#147)
* Replace for-of loops to reduce memory allocations in hot-path for ply loading

* Use temporary THREE.Quaternion and THREE.Vector instances to avoid allocations
2025-08-01 07:09:08 -07:00
Andreas Sundquist 7fb5d7920b Fix SH encoding scale factors (#144) 2025-07-31 15:50:11 -07:00
Winnie Lin 0705207bdc Bounding box helper function (#126)
* bounding box implementation

* set default bbox to center-based computation

* [bbox] clean up bbox and editor logic

* [bbox] add error handling and documentation
2025-07-31 15:01:18 -07:00
Andreas Sundquist b39cf3873f Fixed rendering, moved examples/editor option under Debug. Updated spark-viewpoint.md. 2025-07-31 14:24:48 -07:00
Andreas Sundquist d707f283f5 Working prototype. Initialization not consistent. 2025-07-31 14:24:48 -07:00
Andreas Sundquist df6b1d8f4a Checkpoint 2025-07-31 14:24:48 -07:00
Noeri Huisman 30f50aa9ee Use material.premultipliedAlpha to adjust blending function (#136) 2025-07-25 03:26:29 +02:00
Andreas Sundquist f60c2b0cf9 Custom/extended splat encoding ranges, Premultiplied alpha for hyper-saturated colors (#134)
* Externalized SparkRenderer.maxPixelRadius and .minAlpha settings. Added to documentation. Added to examples/editor under Debug folder, moved sort32 there.

* Added SplatEncoding concept, applied individually to SparkRenderer (rgbMin/Max, lnScaleMinMax), SplatMesh (additionally sh1Min/Max, sh2, sh3). Updated examples/editor to control settings via gui. Updated all related code to pipe along settings where needed.
Added SparkRenderer.premultipliedAlpha to control blend mode and enable hyper-saturated color contributions by default.

* Fix SplatLoader not passing along encoding. Complete renaming to splat encoding.
2025-07-23 10:04:24 -07:00
Noeri Huisman 9b6ea3c987 Combine tallying of buckets for both passes of float32 sorting (#132) 2025-07-23 15:49:00 +02:00
Andreas Sundquist 5eb57038b4 Externalize render settings minAlpha and maxPixelRadius (#130)
* Add commented benchmarkSort to compare JS vs Wasm sorting.

* Add 32-bit float sort via SparkViewpooint.sort32, using 2-pass radix-65536 sort. Turn on sort32 by default for examples/editor. Implemented Rust sort and JS sort, updated benchmarking code to include float16 and float32 sort.

* Add sort32 to docs/spark-viewpoint.md.

* Externalized SparkRenderer.maxPixelRadius and .minAlpha settings. Added to documentation. Added to examples/editor under Debug folder, moved sort32 there.
2025-07-22 03:15:13 +02:00
Andreas Sundquist 0bfb6c8963 Implement float32 sorting option (#129)
* Add commented benchmarkSort to compare JS vs Wasm sorting.

* Add 32-bit float sort via SparkViewpooint.sort32, using 2-pass radix-65536 sort. Turn on sort32 by default for examples/editor. Implemented Rust sort and JS sort, updated benchmarking code to include float16 and float32 sort.

* Add sort32 to docs/spark-viewpoint.md.
2025-07-21 17:47:41 -07:00
Noeri Huisman c803096259 Allow image decoding to happen in parallel when parsing SOGS (#122) 2025-07-16 18:43:09 +02:00
Noeri Huisman 1e697b397c Use FullScreenQuad instead of custom setup (#121) 2025-07-16 18:42:52 +02:00
Noeri Huisman c25dc354bc Use JSDoc for documenting SparkRenderer and SparkViewpoint options (#123) 2025-07-15 23:46:18 +02:00
Andreas Sundquist 0639f2f963 Rename SparkRenderer.renderScale to focalAdjustment. Add to constructor options and to docs. (#113) 2025-07-11 21:59:05 -04:00
Andreas Sundquist bf10efcab0 Update SplatLoader to handle progress updates, both for main file and any extra files, aggregating totals. Misc. improvements to examples. (#112) 2025-07-11 17:09:38 -07:00
Noeri Huisman bc4f5137c6 Use fetch instead of FileLoader in SplatLoader to avoid reusing same arraybuffer (#94) 2025-07-11 11:37:20 -07:00
lucasoptml 0c3bb74e1a Add sh1, sh2 support to sogs (#109)
* Add sh1, sh2 support to sogs

* Fix lint issues

---------

Co-authored-by: Diego Marcos Segura <diego.marcos@gmail.com>
2025-07-11 11:30:57 -07:00
Andreas Sundquist dc07e02a33 Expand internal splat scale encoding to e^[-12,9]. Lower zero cut-off to e^-30. Fix background color selection in editor. (#110) 2025-07-11 10:48:10 -07:00
Andreas Sundquist 42d1477cb6 Fix visible flag bug in SplatGenerator/SplatMesh. (#101) 2025-07-07 22:37:09 -04:00
Andreas Sundquist 4266db3259 PC SOGS decoding from .Zip archive (#100)
* Implement PC SOGS decoding from .zip file archive. Update viewer and editor to accept .zip files.

* Restore GL WEBP decoding.
2025-07-07 17:18:11 -07:00
Noeri Huisman ef24ed0e9c Use OffscreenCanvas and WebGL2 context to decode webp images (#90) 2025-07-04 07:16:23 -05:00
Andreas Sundquist 179885595c Splat Texture (#79)
* Add experimental Splat Texture rendering and examples/splat-texture. Added star.png and heart.png to assets.json and to assets repo. Update examples/depth-of-field to compute from metric aperture size. Added SparkRenderer.renderScale debug parameter. Updated examples/editor: set default highDPI to true, added logFocalDistance, apertureAngle, refactored, grouped into debugFolder, default settings open, preset buttons for nonAA and AA settings.

* Set default highDpi in examples/editor to not(isMobile).
2025-07-01 07:57:34 -07:00
Noeri Huisman fe3430000d Use RenderTarget properties to reduce manual render state tracking (#80) 2025-06-30 22:26:17 -07:00
Andreas Sundquist c0dff7fafb Fix Spherical Harmonics not included in SPZ transcoding. (#83) 2025-06-30 15:39:01 -07:00
Andreas Sundquist 16bc076db7 For compressed SS PLY, make min/max_r/g/b chunk properties optional (defaulting to 0..1) since older SuperSplat 1.* seems to export without those, and defaults to 0..1 according to source code. (#82) 2025-06-30 14:54:19 -07:00
Andreas Sundquist 36c3c61d0b Implementation PC SOGS file format loading via meta.json root file. Added webp dependency for accurate decoding. Updated viewer and editor to accept new file type. (#73) 2025-06-30 08:57:51 -07:00
Noeri Huisman 860b39a152 Use getDrawingBufferSize to determine renderer size (#71)
* Use `getDrawingBufferSize` to determine renderer size

* Add workaround for WebXR on Vision Pro.

---------

Co-authored-by: Andreas Sundquist <asundqui@worldlabs.ai>
2025-06-30 08:01:16 -07:00
Diego Marcos Segura 2802a008f2 Trigger build bot 2025-06-25 19:24:29 -07:00
Andreas Sundquist af45f72a2b Fix .ksplat decoding by implementing partial bucket decoding. (#68) 2025-06-24 13:40:04 -07:00
Andreas Sundquist 06b1564246 Set default enable2DGS to false. Update docs and include DoF focus blur settings. Make procedural-splats work better on Android. Fix touch controls on examples. (#65) 2025-06-24 00:42:38 -07:00
Andreas Sundquist 70c9cb90a9 Fix incorrect SH2 coefficient signs (#64) 2025-06-23 14:43:30 -07:00
Andreas Sundquist ba143fe464 Add pointerRollScale option to PointerControls to allow disabling touch controls rolling. (#60) 2025-06-20 18:01:16 -07:00
Andreas Sundquist db1e880ae1 Add focalDistance and apertureAngle to SparkRenderer. Add examples/depth-of-field. (#59) 2025-06-20 17:09:43 -07:00