We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Modern 3D Gaussian Splatting (LOD + Spark Renderer) Completely Unusable in Verge3D Due to Disabled W

Home Forums Bug Reports and Feature Requests Modern 3D Gaussian Splatting (LOD + Spark Renderer) Completely Unusable in Verge3D Due to Disabled W

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #85450
    QiangGe
    Participant

    Hello Verge3D team and community,
    I’ve been trying to integrate a high-performance 3D Gaussian Splatting viewer with LOD support (using the popular @sparkjsdev/spark renderer and large .spz scenes ~150 million splats) into a Verge3D project.
    Unfortunately it is currently impossible to get it running properly in Verge3D, even though the exact same code works perfectly at 60+ FPS with zero warnings when using original three.js r170+.
    After in-depth debugging, the root causes are:

    === Verge3D Full Compatibility Diagnostic Report (English) ===
    Date : 2025-11-20
    Verge3D version : v3d.module49.js (based on three.js ~r122)
    Browser : Windows NT 10.0; Win64; x64
    GPU : ANGLE (NVIDIA, NVIDIA GeForce RTX 3080 (0x0000220A) Direct3D11 vs_5_0 ps_5_0, D3D11) (Google Inc. (NVIDIA))

    — Critical WebGL2 Extensions (Required by Spark / 3DGS / three-gs etc.) —
    OES_texture_half_float : ✗ DISABLED by Verge3D
    OES_texture_half_float_linear : ✗ DISABLED by Verge3D
    EXT_color_buffer_half_float : ✓ Supported
    WEBGL_color_buffer_float : ✗ Disabled (fallback)
    OES_standard_derivatives : ✗ DISABLED by Verge3D
    OES_texture_float : ✗ Disabled
    OES_texture_float_linear : ✓ Supported

    — Required three.js Modern APIs (Missing in old Verge3D fork) —
    WebGLRenderer.prototype.readRenderTargetPixelsAsync : ✗ MISSING → needs polyfill
    InstancedBufferAttribute.prototype.addUpdateRange : ✗ MISSING → needs polyfill

    — Summary —
    • All 5 core half-float extensions are deliberately disabled by Verge3D.
    • Two essential three.js APIs (introduced after r130) are completely missing.
    • Modern Gaussian Splatting renderers (Spark, three-gs, etc.) cannot run without heavy polyfills or will fail entirely.
    • The same hardware + browser + original three.js r170+ runs these renderers at full 60+ FPS with zero warnings.

    Conclusion for Verge3D team:
    Please either:
    1. Remove the internal extension blacklist, or
    2. Update the embedded three.js to at least r160+ and enable standard WebGL2 features.

    This prevents the entire 2024–2025 generation of high-performance point-cloud / Gaussian Splatting viewers from working in Verge3D applications.

    Report generated automatically for official feedback.

    #85452

    Hi,

    1) There might be some inconsistencies in the code that detect WebGL extensions, because we have not blacklisted any of those. Moreover, these are used extensively to implement HDR rendering and image-based lighting in Verge3D.

    2) Unfortunately, Verge3D and Three.js code bases diverged a lot since r122 when the last sync was performed. API differences are not so significant, but still might require refactoring of the apps being ported from Three.js to Verge.

    Soft8Soft Tech Chief
    Want more Verge3D updates? Follow me on X, Facebook, or LinkedIn

    #85456
    QiangGe
    Participant

    1) There might be some inconsistencies in the code that detect WebGL extensions, because we have not blacklisted any of those. Moreover, these are used extensively to implement HDR rendering and image-based lighting in Verge3D.

    I changed the detection code; it should be more accurate this time.
    === Floating Point Textures (Critical for GS/Spark) ===
    32-bit Float Renderable : ✅ YES (EXT_color_buffer_float: On)
    16-bit Half Renderable : ✅ YES (Critical for performance)
    Float Linear Filter : ✅ Supported
    Half Linear Filter : ⚠️ Missing

    === Other WebGL2 Features ===
    Instanced Arrays : ✅ Native (Core)
    Standard Derivatives : ✅ Native (Core)
    Depth Texture : ✅ Native (Core)
    Multiple Render Targets : ✅ Native (MAX_DRAW_BUFFERS: 8)

    === Verge3D / Three.js API Check ===
    renderer.readRenderTargetPixelsAsync : ✅ Present
    InstancedBufferAttribute.addUpdateRange: ❌ MISSING (Performance impact)
    renderer.capabilities.isWebGL2 : ✅ True
    renderer.capabilities.floatVertexTextures: ✅ True

    #85457
    QiangGe
    Participant

    2) Unfortunately, Verge3D and Three.js code bases diverged a lot since r122 when the last sync was performed. API differences are not so significant, but still might require refactoring of the apps being ported from Three.js to Verge.

    Additionally, I used AI to analyze the required Three.js version or any hard requirements.

    1. Hard Requirement: Three.js r126+ (Critical for Async Readback)
    Issue: Missing renderer.readRenderTargetPixelsAsync
    Technical Detail: Spark and most modern Gaussian Splatting (3DGS) renderers rely on GPU-based sorting. This process requires reading sorted index data from the GPU back to the CPU (or handling it via Transform Feedback). To maintain high FPS without freezing the main thread, an asynchronous readback API is mandatory.
    The Gap: This specific API (readRenderTargetPixelsAsync) was introduced in Three.js r126.
    Current Status: Verge3D 4.1.1 is based on r122, which completely lacks this API. Consequently, Spark crashes immediately unless a heavy (and slow) synchronous polyfill is manually injected.
    2. LOD Feature Requirements: Three.js r152+ (Highly Recommended)
    Issue: Inefficient Buffer Updates & Legacy Loader Logic
    Context: The module @sparkjsdev/spark (LOD version) relies on advanced geometry handling, likely utilizing logic similar to dynamic InstancedMesh updates or the newer BatchedMesh paradigms found in recent Three.js versions.
    Buffer Handling: Efficient LOD switching requires frequent updates to InstancedBufferAttribute. While addUpdateRange exists in r122, the underlying WebGL 2.0 bufferSubData optimization is significantly more mature in r126+.
    Texture Compression: Spark LOD often utilizes .spz or .sogs file formats. The KTX2Loader and TextureUtils required to handle the textures for these formats are much more stable and efficient in r140+. Using r122 risks performance bottlenecks or decoding errors.
    3. WebGL 2.0 Core Support Issues
    Issue: “False Negatives” on Extension Checks
    Requirement: Spark explicitly requires a WebGL 2.0 environment.
    The Gap: Older versions of Three.js (like r122) treat WebGL 2.0 features inconsistently. Specifically, features that were promoted to Core in WebGL 2.0 (such as OES_standard_derivatives or EXT_shader_texture_lod) are often still checked as “Extensions” by the engine.
    Consequence: Since these are Core features in WebGL 2, gl.getExtension() returns null, leading the engine to falsely report that the feature is missing.
    Comparison: Modern Three.js (r160+) automatically detects the WebGL 2 context and skips these redundant extension checks, ensuring native features are correctly utilized.

    “The above diagnosis and assumptions may not be entirely accurate. The Verge3D team has made significant efforts in supporting newer 3D software versions, and we also look forward to their continued progress in keeping up with newer Three.js releases, which is crucial for the development of the entire ecosystem.” :rose:

    • This reply was modified 1 month, 2 weeks ago by QiangGe.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.