Skip to content

Add GSplatParams.renderer enum for runtime renderer selection#8567

Merged
mvaligursky merged 2 commits intomainfrom
mv-gsplat-renderer-enum
Apr 1, 2026
Merged

Add GSplatParams.renderer enum for runtime renderer selection#8567
mvaligursky merged 2 commits intomainfrom
mv-gsplat-renderer-enum

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented Apr 1, 2026

Replaces the internal USE_LOCAL_COMPUTE_RENDERER constant and gpuSorting boolean with a single GSplatParams.renderer enum property that controls the GSplat rendering pipeline.

Changes:

  • Add GSPLAT_RENDERER_AUTO, GSPLAT_RENDERER_RASTER_CPU_SORT, GSPLAT_RENDERER_RASTER_GPU_SORT, and GSPLAT_RENDERER_COMPUTE constants
  • Add GSplatParams.renderer property with platform fallback logic (WebGPU-only modes fall back to RASTER_CPU_SORT on WebGL)
  • Add read-only GSplatParams.currentRenderer property exposing the resolved pipeline after fallback
  • Support runtime renderer switching via full teardown/recreate in GSplatManager
  • Remove gpuSorting boolean property

API Changes:

  • New: GSPLAT_RENDERER_AUTO (0), GSPLAT_RENDERER_RASTER_CPU_SORT (1), GSPLAT_RENDERER_RASTER_GPU_SORT (2), GSPLAT_RENDERER_COMPUTE (3)
  • New: GSplatParams.renderer — set the rendering pipeline
  • New: GSplatParams.currentRenderer — read-only resolved pipeline
  • Removed: GSplatParams.gpuSorting

Examples:

  • Updated world.example.mjs to use GSPLAT_RENDERER_RASTER_GPU_SORT
  • Updated lod-streaming example and controls with a renderer dropdown (replaces GPU Sorting toggle)

Replace the internal USE_LOCAL_COMPUTE_RENDERER constant and gpuSorting
boolean with a single renderer enum property that controls the GSplat
rendering pipeline and supports runtime switching.

Made-with: Cursor
@mvaligursky mvaligursky merged commit 47b871b into main Apr 1, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-renderer-enum branch April 1, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant