mapspinner 0.1.57 → 0.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapspinner",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "description": "WebGL2 Earth-scale terrain rendering SDK for interactive globe applications",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -1892,7 +1892,14 @@ void main() {
1892
1892
  // SOFTENED (2026-06-13): transition sharpening reduced 3->1 so grass/rock/sand/snow
1893
1893
  // boundaries hold a natural blend band instead of a hard die-cut line. The 1.0 slope
1894
1894
  // still prefers the dominant layer but leaves a visible transition zone.
1895
- float bSharp = clamp((bAB * 2.0 - 1.0) * 1.0 + (albA.a - albB.a) * 0.3 + 0.5, 0.0, 1.0);
1895
+ // DISPLACEMENT-DRIVEN GRADIENT for ALL material pairs (user 2026-06-14 'all textures use the
1896
+ // displacement to mix the gradient'): height-blend the top-2 layers by their displacement so
1897
+ // every boundary (grass/rock, grass/sand, rock/snow...) follows the texture RELIEF = irregular,
1898
+ // not a straight gate line. The displacement weight ramps UP close (0.3 -> 1.3 by the deck)
1899
+ // where the hard lines show, and stays low far off so the 2.4km photo's bowl features never
1900
+ // flip whole patches to rock (the documented bowl-blob lesson -- that was a DISTANT artifact).
1901
+ float dispW = mix(0.3, 1.3, 1.0 - smoothstep(3.0, 60.0, pxWorld));
1902
+ float bSharp = clamp((bAB * 2.0 - 1.0) * 1.0 + (albA.a - albB.a) * dispW + 0.5, 0.0, 1.0);
1896
1903
  texAlb = mix(albB, albA, bSharp);
1897
1904
  texNrm = mix(nrmB, nrmA, bSharp);
1898
1905
  }