mirror of
https://github.com/storytold/spark.git
synced 2026-10-17 00:12:59 +00:00
Custom/extended splat encoding ranges, Premultiplied alpha for hyper-saturated colors (#134)
* Externalized SparkRenderer.maxPixelRadius and .minAlpha settings. Added to documentation. Added to examples/editor under Debug folder, moved sort32 there. * Added SplatEncoding concept, applied individually to SparkRenderer (rgbMin/Max, lnScaleMinMax), SplatMesh (additionally sh1Min/Max, sh2, sh3). Updated examples/editor to control settings via gui. Updated all related code to pipe along settings where needed. Added SparkRenderer.premultipliedAlpha to control blend mode and enable hyper-saturated color contributions by default. * Fix SplatLoader not passing along encoding. Complete renaming to splat encoding.
This commit is contained in:
committed by
GitHub
parent
f4b4522c56
commit
f60c2b0cf9
@@ -6,7 +6,6 @@
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user