Skip to content

Unify GSplat format shader architecture#8377

Merged
mvaligursky merged 2 commits into
mainfrom
mv-gsplat-formats-unified
Jan 14, 2026
Merged

Unify GSplat format shader architecture#8377
mvaligursky merged 2 commits into
mainfrom
mv-gsplat-formats-unified

Conversation

@mvaligursky

@mvaligursky mvaligursky commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Overview

Refactors the Gaussian Splat shader system to unify format handling across all resource types, improving code organization and enabling future extensibility.

Changes

Shader chunk reorganization:

  • Moved format-specific shader chunks to shader-lib/*/chunks/gsplat/vert/formats/ folder
  • Consolidated formats: uncompressed, compressed, SOGS, work buffer, container
  • Merged separate declaration/read chunks into single files per format (except container which needs split for user code injection)
  • Added gsplatFormatVS chunk for common base declarations (splatTextureSize, splatUV)

Unified resource architecture:

  • Moved GSplatFormat and textures Map from GSplatContainer to GSplatResourceBase
  • All resource types now define their format with streams and shader includes
  • Centralized texture binding and splatTextureSize uniform handling in base class
  • Format hash used for shader caching to prevent conflicts between different formats

Simplified GSplatFormat class:

  • Removed GLSL/WGSL duplication - now picks appropriate language at construction based on device
  • Cleaner API: getDeclarations() and getReadCode() (single methods, not per-language)

Backward Compatibility

  • Main gsplat.js shader unchanged
  • Public API preserved
  • Existing examples work without modification

Renaming

  • all SOGS references / names / chunks are now SOG

@mvaligursky mvaligursky self-assigned this Jan 13, 2026
@mvaligursky mvaligursky added enhancement Request for a new feature area: graphics Graphics related issue labels Jan 13, 2026
@mvaligursky mvaligursky requested a review from a team January 13, 2026 15:49
@mvaligursky mvaligursky merged commit 29f08f1 into main Jan 14, 2026
7 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-formats-unified branch January 14, 2026 11:54
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.

2 participants