Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9624864
WIP add data to primitive
oss-haertl Apr 21, 2026
3224625
Merge branch 'fix/centroidComputation' into feature/KHR_gaussian_spla…
oss-haertl Apr 22, 2026
0fe1837
Improve error handling
oss-haertl Apr 22, 2026
a0abde8
WIP add shaders
oss-haertl Apr 27, 2026
aa1c057
Add WASM sorting
oss-haertl May 7, 2026
7c0beaf
Add all spherical harmoic degrees
oss-haertl May 8, 2026
9793afc
Removed unused code
oss-haertl May 8, 2026
5b86ca7
Add DEBUG channels
oss-haertl May 8, 2026
bcf3c0e
Apply tone-mapping in postprocess. Add possibility of half-float fram…
oss-haertl May 21, 2026
31dac6c
Merge branch 'main' into feature/KHR_gaussian_splatting
oss-haertl May 21, 2026
44d340c
Fix depthMask and transmission
oss-haertl May 22, 2026
5d25964
Add extra framebuffer for splats
oss-haertl May 27, 2026
bb6e6a2
Improve inverse tonemapping for KHR_PBR_NEUTRAL
oss-haertl May 27, 2026
d561f5f
Discard too large splats
oss-haertl May 27, 2026
cc83b3c
Apply inverse global rotation to spherical harmonics
oss-haertl May 28, 2026
95b63f0
Fix quantization
oss-haertl May 28, 2026
245901f
Use define instead of uniform
oss-haertl May 28, 2026
ff1dd60
Improve performance by decreasing sigma and discard earlier
oss-haertl May 28, 2026
7fe0f1c
Use half float texture and move texture fetch
oss-haertl May 29, 2026
6ba0a38
Update docs
oss-haertl May 29, 2026
8153997
Merge branch 'feature/KHR_gaussian_splatting_perf' into feature/KHR_g…
oss-haertl Jun 1, 2026
c681d20
Revert "Improve inverse tonemapping for KHR_PBR_NEUTRAL"
oss-haertl Jun 2, 2026
8333990
Add warning for orthographic cameras
oss-haertl Jun 3, 2026
d09f6de
Apply world transform to WASM sorter
oss-haertl Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ GltfState containing a state for visualization in GltfView
* [.animationIndices](#GltfState+animationIndices)
* [.animationTimer](#GltfState+animationTimer)
* [.variant](#GltfState+variant)
* [.needsRedraw](#GltfState+needsRedraw)
* [.renderingParameters](#GltfState+renderingParameters)
* [.morphing](#GltfState+renderingParameters.morphing)
* [.skinning](#GltfState+renderingParameters.skinning)
Expand All @@ -132,6 +133,7 @@ GltfState containing a state for visualization in GltfView
* [.environmentRotation](#GltfState+renderingParameters.environmentRotation)
* [.useDirectionalLightsWithDisabledIBL](#GltfState+renderingParameters.useDirectionalLightsWithDisabledIBL)
* [.internalMSAA](#GltfState+renderingParameters.internalMSAA)
* [.floatingPointFramebuffer](#GltfState+renderingParameters.floatingPointFramebuffer)
* _static_
* [.ToneMaps](#GltfState.ToneMaps)
* [.KHR_PBR_NEUTRAL](#GltfState.ToneMaps.KHR_PBR_NEUTRAL)
Expand Down Expand Up @@ -239,6 +241,12 @@ animation timer allows to control the animation time
### gltfState.variant
KHR_materials_variants

**Kind**: instance property of [<code>GltfState</code>](#GltfState)
<a name="GltfState+needsRedraw"></a>

### gltfState.needsRedraw
Indicates whether the view needs to be redrawn, currently used to indicate new sorting orders for gaussian splatting

**Kind**: instance property of [<code>GltfState</code>](#GltfState)
<a name="GltfState+renderingParameters"></a>

Expand All @@ -262,6 +270,7 @@ parameters used to configure the rendering
* [.environmentRotation](#GltfState+renderingParameters.environmentRotation)
* [.useDirectionalLightsWithDisabledIBL](#GltfState+renderingParameters.useDirectionalLightsWithDisabledIBL)
* [.internalMSAA](#GltfState+renderingParameters.internalMSAA)
* [.floatingPointFramebuffer](#GltfState+renderingParameters.floatingPointFramebuffer)

<a name="GltfState+renderingParameters.morphing"></a>

Expand All @@ -278,7 +287,7 @@ skin / skeleton
<a name="GltfState+renderingParameters.clearColor"></a>

#### renderingParameters.clearColor
clear color expressed as list of ints in the range [0, 255]
clear color expressed as list of floats in the range [0, 1]

**Kind**: static property of [<code>renderingParameters</code>](#GltfState+renderingParameters)
<a name="GltfState+renderingParameters.exposure"></a>
Expand Down Expand Up @@ -351,6 +360,12 @@ If this is set to true, directional lights will be generated if IBL is disabled
#### renderingParameters.internalMSAA
MSAA used for cases which are not handled by the browser (e.g. Transmission)

**Kind**: static property of [<code>renderingParameters</code>](#GltfState+renderingParameters)
<a name="GltfState+renderingParameters.floatingPointFramebuffer"></a>

#### renderingParameters.floatingPointFramebuffer
Use RGBA16F floating-point main framebuffer instead of RGBA8

**Kind**: static property of [<code>renderingParameters</code>](#GltfState+renderingParameters)
<a name="GltfState.ToneMaps"></a>

Expand Down Expand Up @@ -1010,7 +1025,9 @@ Fit view to updated canvas size without changing rotation if distance is incorre
<a name="ResourceLoaderUtils"></a>

## ResourceLoaderUtils
Utility class providing static helper methods for resource loading operations,such as extracting file extensions, resolving folder paths, normalizing relativepaths, and detecting absolute URLs.
Utility class providing static helper methods for resource loading operations,
such as extracting file extensions, resolving folder paths, normalizing relative
paths, and detecting absolute URLs.

**Kind**: global class

Expand All @@ -1026,7 +1043,8 @@ Utility class providing static helper methods for resource loading operations, s
Extracts the file extension from a filename.

**Kind**: static method of [<code>ResourceLoaderUtils</code>](#ResourceLoaderUtils)
**Returns**: <code>string</code> \| <code>undefined</code> - The lowercase file extension (without the leading dot), or `undefined` if the filename has no extension.
**Returns**: <code>string</code> \| <code>undefined</code> - The lowercase file extension (without the leading dot),
or `undefined` if the filename has no extension.

| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -1038,7 +1056,8 @@ Extracts the file extension from a filename.
Returns the directory portion of a file path, including the trailing slash.

**Kind**: static method of [<code>ResourceLoaderUtils</code>](#ResourceLoaderUtils)
**Returns**: <code>string</code> - The path up to and including the last `/`, or an empty string if no `/` is present.
**Returns**: <code>string</code> - The path up to and including the last `/`, or an empty string
if no `/` is present.

| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -1047,7 +1066,10 @@ Returns the directory portion of a file path, including the trailing slash.
<a name="ResourceLoaderUtils.cleanRelativePath"></a>

### ResourceLoaderUtils.cleanRelativePath(relativePath) ⇒ <code>string</code>
Normalizes a relative URL path by resolving `.` and `..` segments.- Strips a leading `./` prefix.- Collapses `/./` sequences to `/`.- Resolves `/../` sequences by removing the preceding path segment.
Normalizes a relative URL path by resolving `.` and `..` segments.
- Strips a leading `./` prefix.
- Collapses `/./` sequences to `/`.
- Resolves `/../` sequences by removing the preceding path segment.

**Kind**: static method of [<code>ResourceLoaderUtils</code>](#ResourceLoaderUtils)
**Returns**: <code>string</code> - The normalized path with dot segments resolved.
Expand All @@ -1059,7 +1081,8 @@ Normalizes a relative URL path by resolving `.` and `..` segments. - Strips a le
<a name="ResourceLoaderUtils.isAbsoluteUrl"></a>

### ResourceLoaderUtils.isAbsoluteUrl(url) ⇒ <code>boolean</code>
Determines whether a URL is absolute (i.e. contains a scheme such as `http:` or `data:`).A URL is considered absolute when it contains a `:` that appears before any `/`.
Determines whether a URL is absolute (i.e. contains a scheme such as `http:` or `data:`).
A URL is considered absolute when it contains a `:` that appears before any `/`.

**Kind**: static method of [<code>ResourceLoaderUtils</code>](#ResourceLoaderUtils)
**Returns**: <code>boolean</code> - `true` if the URL is absolute, `false` otherwise.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Formerly hosted together with the example frontend at the [glTF Sample Viewer](h
- [x] glTF 2.0
- [x] [KHR_animation_pointer](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_animation_pointer)
- [x] [KHR_draco_mesh_compression](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_draco_mesh_compression)
- [x] [KHR_gaussian_splatting](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_gaussian_splatting/README.md)
- [x] [KHR_lights_punctual](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual)
- [x] [KHR_materials_anisotropy](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)
- [x] [KHR_materials_clearcoat](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_clearcoat)
Expand Down
28 changes: 24 additions & 4 deletions source/GltfState/gltf_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class GltfState {
/** KHR_materials_variants */
this.variant = undefined;

/** Indicates whether the view needs to be redrawn, currently used to indicate new sorting orders for gaussian splatting */
this.needsRedraw = false;

/** parameters used to configure the rendering */
this.renderingParameters = {
/** morphing between vertices */
Expand All @@ -55,15 +58,19 @@ class GltfState {
KHR_materials_specular: true,
/** KHR_materials_iridescence adds a thin-film iridescence effect */
KHR_materials_iridescence: true,
/** KHR_materials_diffuse_transmission */
KHR_materials_diffuse_transmission: true,
/** KHR_materials_anisotropy defines microfacet grooves in the surface, stretching the specular reflection on the surface */
KHR_materials_anisotropy: true,
/** KHR_materials_dispersion defines configuring the strength of the angular separation of colors (chromatic abberation)*/
KHR_materials_dispersion: true,
KHR_materials_emissive_strength: true
/** KHR_materials_emissive_strength allows configuring the strength of the emissive component */
KHR_materials_emissive_strength: true,
/** KHR_gaussian_splatting */
KHR_gaussian_splatting: true
},
/** clear color expressed as list of ints in the range [0, 255] */
clearColor: [58, 64, 74, 255],
/** clear color expressed as list of floats in the range [0, 1] */
clearColor: [0.22, 0.25, 0.29, 1],
/** exposure factor */
exposure: 1.0,
/** KHR_lights_punctual */
Expand Down Expand Up @@ -92,7 +99,9 @@ class GltfState {
/** If this is set to true, directional lights will be generated if IBL is disabled */
useDirectionalLightsWithDisabledIBL: false,
/** MSAA used for cases which are not handled by the browser (e.g. Transmission)*/
internalMSAA: 4
internalMSAA: 4,
/** Use RGBA16F floating-point main framebuffer instead of RGBA8 */
floatingPointFramebuffer: true
};

// retain a reference to the view with which the state was created, so that it can be validated
Expand Down Expand Up @@ -226,6 +235,17 @@ GltfState.DebugOutput = {
SINGLE_SCATTER_COLOR: "Single-Scatter Color",
/** output for the pre scatter pass, which collects all lighting contribution for scattering */
PRE_SCATTER_PASS: "Pre-Scatter Pass"
},

gaussianSplatting: {
/** output the spherical harmonics degree 0 */
SH_DEGREE_0: "SH Degree 0",
/** output the spherical harmonics degree 0-1 */
SH_DEGREE_1: "SH Degree 1",
/** output the spherical harmonics degree 0-2 */
SH_DEGREE_2: "SH Degree 2",
/** output the spherical harmonics degree 0-3 */
SH_DEGREE_3: "SH Degree 3"
}
};

Expand Down
Loading