mirror of
https://github.com/storytold/spark.git
synced 2026-10-23 08:26:01 +00:00
Expand internal splat scale encoding to e^[-12,9]. Lower zero cut-off to e^-30. Fix background color selection in editor. (#110)
This commit is contained in:
committed by
GitHub
parent
c8394665ec
commit
dc07e02a33
+4
-1
@@ -4,12 +4,15 @@
|
||||
// If these values are changed, the corresponding values in splatDefines.glsl
|
||||
// must also be updated to match.
|
||||
|
||||
export const LN_SCALE_MIN = -9.0;
|
||||
export const LN_SCALE_MIN = -12.0;
|
||||
export const LN_SCALE_MAX = 9.0;
|
||||
export const LN_RESCALE = (LN_SCALE_MAX - LN_SCALE_MIN) / 254.0; // 1..=255
|
||||
export const SCALE_MIN = Math.exp(LN_SCALE_MIN);
|
||||
export const SCALE_MAX = Math.exp(LN_SCALE_MAX);
|
||||
|
||||
export const LN_SCALE_ZERO = -30.0;
|
||||
export const SCALE_ZERO = Math.exp(LN_SCALE_ZERO);
|
||||
|
||||
// Gsplats are stored in textures that are 2^11 x 2^11 x up to 2^11
|
||||
// Most WebGL2 implementations support 2D textures up to 2^12 x 2^12 (max 16M Gsplats)
|
||||
// 2D array textures and 3D textures up to 2^11 x 2^11 x 2^11 (max 8G Gsplats),
|
||||
|
||||
Reference in New Issue
Block a user