GaussianSplats3D icon indicating copy to clipboard operation
GaussianSplats3D copied to clipboard

Avoid shader type error of integer kernal2DSize

Open xiasun opened this issue 10 months ago • 0 comments

When setting kernel2DSize to an integer in the viewer options, it will be assigned to the GLSL shader as an integer. For example, when setting:

// ...
viewerOptions.kernel2DSize = 1.0;
// ...

The generated shader will look like:

// ...
cov2Dm[0][0] += 1;
cov2Dm[1][1] += 1;
// ...

This raises a type mismatch error during shader compilation.

This fix ensure that at least one decimal is preserved for integer kernel2DSize.

xiasun avatar Feb 20 '25 03:02 xiasun