Commit Graph

46 Commits

Author SHA1 Message Date
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
Andreas Sundquist 690e09ac95 Add modifiers normalColor and depthColor. Add examples/debug-color to show how to use them on SplatMeshes. (#58) 2025-06-20 14:23:45 -07:00
Andreas Sundquist a83c99eb86 Remove accidental modifiers addition. 2025-06-20 13:32:17 -07:00
Andreas Sundquist e36b553611 Add GLSL inline shader code injection example (#56)
* Add examples/glsl and link into index.html and examples.html.

* Add comment to example defining struct Gsplat.

* Adjust tab size formatting to 2
2025-06-20 13:15:14 -07:00
Andreas Sundquist aca62084d6 Add types to SparkRenderer (#53) 2025-06-18 08:28:15 -07:00
Andreas Sundquist d4f174677c Add examples/webxr/ single-html example. Linked in index.html. Improved the experimental hands.ts interface. Fixed issue with single-camera WebXR. Added valley.spz to assets.json, added to assets repo. 2025-06-17 18:50:49 -07:00
Diego Marcos Segura 7d26284fbd Traverse object3D hierarchy looking for SplatMesh to create an implcit SparkRenderer (fix #38) 2025-06-09 15:58:12 -07:00
Andreas Sundquist acb541cc4e Renamed "forge" to "spark". Updated meta-references and future domain. (#40) 2025-06-09 13:50:08 -07:00
Andreas Sundquist ea9e4e3da9 Remove requirement for SuperSplat comment in PLY "chunk" element in order to decode compressed PLY format. (#39) 2025-06-06 14:32:24 -07:00
Andreas Sundquist 7a4142c62a Lower MIN_ALPHA from 0.01 to 0.5/255, the lowest conceivable value that could be encoded in a Uint8, allowing highly transparent objects to render better. (#37)
Add "sortRadial" option to Editor to allow toggling between radial and Z-depth sorting.
2025-06-06 12:53:19 -07:00
Andreas Sundquist 6a5b361181 Add dyno-overview and dyno-stdlib to docs. Update mkdocs. Minor fixes in docs. Remove unneeded imports in util.ts. 2025-06-01 23:36:35 -07:00
Alexander R. Mcneilly 9eb37b9677 fix sticky fps keys when blurring (#19) 2025-05-30 11:03:27 -07:00
Andreas Sundquist 8b5f854848 Remove obsolete code 2025-05-30 10:49:49 -07:00
Andreas Sundquist 0f931b873a Fix CORS image loading issue in procedural-splats. (#5) 2025-05-27 08:40:58 -07:00
Andreas Sundquist 156bbf400e SPZ writing, exporting, & viewer. Creates a new npm run to-spz which runs scripts/to-spz.js to convert any Gsplat input file to compress .spz. Also includes a configurable viewer examples/viewer that can load splats via drag-n-drop, from url query param, the URL text list, can edit sets of SplatMesh, and export composite .SPZ with some filters. Refactored some loading code from worker.ts to loader files so they can be called from Nodejs. Created api transcodeSpz with options to combine multiple source Gsplat files into one without losing coding quality along the way. 2025-05-26 22:31:28 -07:00
Diego Marcos 3332f609a9 Initial commit 2025-05-24 00:14:53 -07:00