mapspinner 0.1.68 → 0.1.69

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.68",
3
+ "version": "0.1.69",
4
4
  "description": "WebGL2 Earth-scale terrain rendering SDK for interactive globe applications",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -1812,7 +1812,7 @@ void main() {
1812
1812
  // displacement height-blend (small bw below) so sand vs grass is a sharp choice distributed by
1813
1813
  // texture relief = interlocking fingers that thin out with height, never a blendy fade.
1814
1814
  float beachW = warpN * uBeachTopM * 0.30; // warp amplitude scales with the beach band height
1815
- float beach = (1.0 - smoothstep(beachW, uBeachTopM * 4.5 + beachW, vH)) // 2.5->4.5x: wider grass<->sand gradient (user 2026-06-14)
1815
+ float beach = (1.0 - smoothstep(beachW, uBeachTopM * 0.5 + beachW, vH)) // 2.0->0.5x: 4x narrower grass<->sand crossover band (user 2026-06-14)
1816
1816
  * (1.0 - smoothstep(0.18, 0.55, slope));
1817
1817
  // SAND BLEED (2026-06-13): patchy sand spills above the main beach line, modulated by VS
1818
1818
  // warp noise so the edge reads as wind-blown pockets, not a strict elevation cut. At peak it
@@ -1926,8 +1926,19 @@ void main() {
1926
1926
  // crossovers'): a weaker weight ramp lets the DISPLACEMENT decide the winner over a WIDER
1927
1927
  // weight range, so the near-hard displacement-driven distribution spans a broad margin for
1928
1928
  // EVERY pair (rock-slope, snow, biome...), not just the explicitly-widened beach gate.
1929
- float hA = dispA + (bAB - 0.5) * 0.5;
1930
- float hB = dispB + (0.5 - bAB) * 0.5;
1929
+ // AMPLIFY the displacement's influence (user 2026-06-14 'the high-freq textures arent
1930
+ // affecting the crossover point yet'): the raw displacement sits near its 0.5 mean so the
1931
+ // per-layer DIFFERENCE was tiny -> the crossover was weight-driven, not texture-driven. Center
1932
+ // + scale it (x3) so the high-freq relief clearly decides the boundary; the weight just
1933
+ // positions it. (Mips average the displacement to ~0.5 at distance -> auto-smooth far edge.)
1934
+ // NON-LINEAR weight ramp (user 2026-06-14 'the ramp isnt complete enough between sections ->
1935
+ // cutoff lines at the end'): a CONSTANT weight bias let displacement fingers survive right up
1936
+ // to where the gate drops the layer = a hard cutoff line. Make the bias WEAK mid-ramp (wide
1937
+ // displacement crossover) and STRONG at the ends so the fingers taper to nothing before the
1938
+ // gate cuts off -> the ramp completes smoothly, no end line.
1939
+ float wRamp = (bAB - 0.5) * mix(1.4, 4.0, clamp(abs(bAB - 0.5) * 2.0, 0.0, 1.0)); // mid 0.6->1.4 (user 2026-06-14 'all crossover bands a bit wide, rock too'): stronger weight bias = NARROWER displacement crossover on every pair
1940
+ float hA = (dispA - 0.5) * 3.0 + wRamp;
1941
+ float hB = (dispB - 0.5) * 3.0 - wRamp;
1931
1942
  float mh = max(hA, hB) - bw;
1932
1943
  float waH = max(hA - mh, 0.0), wbH = max(hB - mh, 0.0);
1933
1944
  float bSharp = waH / max(waH + wbH, 1e-4);