Skip to content

GsplatProcessor and extra data streams for gaussian splats#8395

Merged
mvaligursky merged 3 commits into
mainfrom
mv-gsplatprocessor
Jan 21, 2026
Merged

GsplatProcessor and extra data streams for gaussian splats#8395
mvaligursky merged 3 commits into
mainfrom
mv-gsplatprocessor

Conversation

@mvaligursky

@mvaligursky mvaligursky commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds GPU-based processing capabilities for Gaussian Splat data and support for custom per-splat texture streams.

Architecture

GSplatProcessor

New class for GPU-based processing of gsplat texture data using fragment shaders. Enables operations like modifying splat properties directly on the GPU.

  • Source/Destination binding: Flexible binding system supporting GSplatResource (shared textures) or GSplatComponent (instance textures)
  • Shader system: User provides GLSL/WGSL process chunks; processor handles texture binding and render setup
  • Blend states: Supports custom blend modes for accumulative operations

Extra Streams

GSplatFormat now supports adding custom texture streams beyond the standard splat data:

resource.format.addExtraStreams([
    { name: 'customColor', format: pc.PIXELFORMAT_RGBA8, storage: pc.GSPLAT_STREAM_INSTANCE }
]);

Stream Storage Types

  • GSPLAT_STREAM_RESOURCE - Texture shared across all instances (default)
  • GSPLAT_STREAM_INSTANCE - Texture created per component instance

Public API

Classes

  • GSplatProcessor - GPU processing of gsplat data
    • constructor(device, source, destination, options)
    • process() - Execute the processing shader
    • setParameter(name, value) - Set shader uniforms
    • blendState - Configure output blending
    • destroy() - Clean up resources

GSplatFormat Methods

  • addExtraStreams(descriptors) - Add custom texture streams

Constants

  • GSPLAT_STREAM_RESOURCE
  • GSPLAT_STREAM_INSTANCE

GSplatComponent Methods

  • getInstanceTexture(name) - Get instance-level texture by stream name

Shader API Changes

Renamed gsplat shader functions for consistency:

Old Name New Name
readCenter(source) getCenter(source)
readColor(source) getColor(source)

Example

New gaussian-splatting/paint example demonstrates 3D painting on gsplats using the processor API.
Model supplied by Stéphane Agullo (thank you!) https://superspl.at/view?id=cdcec084

Screenshot 2026-01-21 at 10 36 10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GPU-based processing capabilities for Gaussian Splat data through a new GSplatProcessor class and extends the gsplat system to support custom per-splat texture streams. The changes enable real-time manipulation of splat properties (like colors) directly on the GPU, demonstrated by a new 3D painting example.

Changes:

  • New GSplatProcessor class for GPU-based splat data processing with fragment shaders
  • Extended GSplatFormat to support custom extra streams with resource-level or instance-level storage
  • Refactored shader function names from readCenter/readColor to getCenter/getColor for consistency
  • Added new stream storage constants and unified parameter handling for format-specific uniforms

Reviewed changes

Copilot reviewed 34 out of 37 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/framework/gsplat/gsplat-processor.js New GPU processor class for reading/writing gsplat texture streams
src/scene/gsplat/gsplat-format.js Added extra streams support, input/output declaration generation, and stream lookup
src/scene/gsplat/gsplat-resource-base.js Added parameters map for non-texture uniforms
src/scene/gsplat/gsplat-sog-resource.js Refactored to populate parameters map instead of direct material configuration
src/framework/components/gsplat/component.js Enhanced resource getter to support both direct and asset-based resources
src/scene/constants.js Added GSPLAT_STREAM_RESOURCE and GSPLAT_STREAM_INSTANCE constants
src/scene/shader-lib/*/chunks/gsplat/** Renamed shader functions and added new processing/stream templates
examples/src/examples/gaussian-splatting/paint.** New example demonstrating 3D painting on gaussian splats
src/index.js Exported GSplatProcessor class

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/scene/shader-lib/glsl/chunks/gsplat/frag/gsplatProcess.js
Comment thread src/scene/gsplat/gsplat-format.js
Comment thread src/framework/gsplat/gsplat-processor.js
Comment thread src/framework/gsplat/gsplat-processor.js
Comment thread src/scene/gsplat/gsplat-format.js
Comment thread src/framework/components/gsplat/component.js
@mvaligursky mvaligursky merged commit e2d82c0 into main Jan 21, 2026
7 checks passed
@mvaligursky mvaligursky deleted the mv-gsplatprocessor branch January 21, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue enhancement Request for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants