I’m currently doing a deeper dive into the supersplat source code and trying to extend the GSplat rendering pipeline. During this process, I noticed that many vertex shaders contain statements like:
#include "gsplatCommonVS"
However, I couldn’t find a corresponding gsplatCommonVS.glsl (or similar) file in the repository. It seems that gsplatCommonVS is injected or expanded during a build / preprocessing step (possibly as a shader chunk stored in TypeScript), rather than being a native GLSL include.
Because of this, I’m having difficulty understanding:
What exactly is defined inside gsplatCommonVS
What structs, uniforms, varyings, and helper functions it provides
Which parts are expected to be used or overridden by downstream shaders
For developers who want to do deeper or custom GSplat development (e.g. adding new per-splat attributes, extending to dynamic / 4D Gaussians, or modifying the projection and shading logic), this makes it hard to reason about the shader interface and data flow.
My questions are:
Is there an official or recommended way to inspect the full expanded source of gsplatCommonVS?
Is there any documentation or API reference describing the contents and intended usage of gsplatCommonVS (its structs, uniforms, and assumptions)?
Are there plans to expose or document these shader chunks more explicitly for advanced users who want to extend GSplat?
Any guidance or pointers would be greatly appreciated.
Thanks a lot for the great work on supersplat.
Regarding this, and further flexibility, there is work happening here which is planned to be released with the next minor engine release in a few weeks, together with documentation and examples. That will handle extra streams, easy to provide shader chunks to interpret those and many other things.
By the way, a lot of refactoring on those chunks is taking place at the moment, for the next engine release. If you need to go low level, I’d suggest you to use main branch, and try and use the new APIs for extra streams / processing shaders. I know there is no documentation yet. Ping me with question if needed, no problem there.