A WebGL viewer that uses perspective-correct ray casting (aka ray tracing) to evaluate Gaussians in 3D. It is based on this paper but uses depth testing instead of sorting. Gaussians are also truncated at 2σ (usually ~3.33σ) to improve visual fidelity.
Note: The viewer is compatible with any .ply file in the INRIA format and will render the actual 3D Gaussians as they are defined in the .ply file. This means that models trained using methods which do not use an exact method for rendering (e.g., standard 3DGS), might not look as expected.
- Clone the repository
- Download this exemplary .ply file into the root directory of the repository
- Serve the root directory of this repository, e.g., with
python -m http.serveror the solution in #1 - Open the
index.htmlfile in Chrome (other browsers may work as well, but are not tested) - (optional) Modify the constants at the top of
main.js - (advanced) Modify the constants inside the vertex/fragment shader in
shaders/to adjust the cutoff for Gaussians
- configurable sh evaluation
- make work on mobile devices (probably requires to switch to a different texture format)
- compression of .ply and attributes in buffers
This project is licensed under the MIT license (see LICENSE).
If you use this code for your research projects, please consider a citation:
@article{hahlbohm2025htgs,
title = {Efficient Perspective-Correct 3D Gaussian Splatting Using Hybrid Transparency},
author = {Hahlbohm, Florian and Friederichs, Fabian and Weyrich, Tim and Franke, Linus and Kappel, Moritz and Castillo, Susana and Stamminger, Marc and Eisemann, Martin and Magnor, Marcus},
journal = {Computer Graphics Forum},
volume = {44},
number = {2},
doi = {10.1111/cgf.70014},
year = {2025},
url = {https://fhahlbohm.github.io/htgs/}
}