mapspinner 0.1.58 → 0.1.59
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 +1 -1
- package/src/shaders/terrain.glsl +16 -10
package/package.json
CHANGED
package/src/shaders/terrain.glsl
CHANGED
|
@@ -1790,14 +1790,13 @@ void main() {
|
|
|
1790
1790
|
// BEACH sand gate tied to uBeachTopM (so the sand TEXTURE scales with the wide beach, not a
|
|
1791
1791
|
// hardcoded 80m strip) + the shared warp on its LAND edge so the beach->grass line is irregular.
|
|
1792
1792
|
// FINE BREAK on the grass->sand line (user 2026-06-14 'still a hard straight grass-sand line up
|
|
1793
|
-
// close ... it must gain detail'): warpN
|
|
1794
|
-
//
|
|
1795
|
-
//
|
|
1796
|
-
//
|
|
1797
|
-
|
|
1798
|
-
float
|
|
1799
|
-
float
|
|
1800
|
-
float beach = (1.0 - smoothstep(uBeachTopM * 0.12 + beachW, uBeachTopM + beachW, vH))
|
|
1793
|
+
// close ... it must gain detail'): warpN positions the band irregularly at the km scale; the
|
|
1794
|
+
// FINE break of the grass->sand line is now the texture DISPLACEMENT height-blend (bSharp below),
|
|
1795
|
+
// NOT a fractal (user 2026-06-14: 'looking like a fractal, use the materials displacement'). Widen
|
|
1796
|
+
// the gate transition band so sand+grass overlap over a broad elevation span -> bSharp picks the
|
|
1797
|
+
// local winner by texture relief -> fingered shoreline that follows the actual texture bumps.
|
|
1798
|
+
float beachW = warpN * uBeachTopM * 0.30; // warp amplitude scales with the beach band height
|
|
1799
|
+
float beach = (1.0 - smoothstep(uBeachTopM * 0.10 + beachW, uBeachTopM * 1.15 + beachW, vH))
|
|
1801
1800
|
* (1.0 - smoothstep(0.15, 0.42, slope));
|
|
1802
1801
|
// SAND BLEED (2026-06-13): patchy sand spills above the main beach line, modulated by VS
|
|
1803
1802
|
// warp noise so the edge reads as wind-blown pockets, not a strict elevation cut. At peak it
|
|
@@ -1898,8 +1897,15 @@ void main() {
|
|
|
1898
1897
|
// not a straight gate line. The displacement weight ramps UP close (0.3 -> 1.3 by the deck)
|
|
1899
1898
|
// where the hard lines show, and stays low far off so the 2.4km photo's bowl features never
|
|
1900
1899
|
// flip whole patches to rock (the documented bowl-blob lesson -- that was a DISTANT artifact).
|
|
1901
|
-
|
|
1902
|
-
|
|
1900
|
+
// UNIVERSAL displacement-driven blend (user 2026-06-14 'this must be ALL texture blends -- the
|
|
1901
|
+
// rock slope and the biome divisions for height and area, wherever we blend textures'): this
|
|
1902
|
+
// bSharp is the ONE blend between the top-2 splat layers, so it already covers every material
|
|
1903
|
+
// pair. WEAKEN the weight term (1.0->0.45) and STRENGTHEN the displacement (-> up to 1.6 close)
|
|
1904
|
+
// so the texture RELIEF -- not the gate weight -- decides the local winner over a WIDE weight
|
|
1905
|
+
// band: every boundary (slope-rock, height-snow, climate/area-biome, beach) fingers along the
|
|
1906
|
+
// texture bumps. Displacement ramps DOWN far off so the 2.4km bowls never flip distant patches.
|
|
1907
|
+
float dispW = mix(0.45, 1.6, 1.0 - smoothstep(3.0, 80.0, pxWorld));
|
|
1908
|
+
float bSharp = clamp((bAB * 2.0 - 1.0) * 0.45 + (albA.a - albB.a) * dispW + 0.5, 0.0, 1.0);
|
|
1903
1909
|
texAlb = mix(albB, albA, bSharp);
|
|
1904
1910
|
texNrm = mix(nrmB, nrmA, bSharp);
|
|
1905
1911
|
}
|