mapspinner 0.1.11 → 0.1.13
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/quadtree.js +3 -2
- package/src/shaders/terrain.glsl +3 -2
package/package.json
CHANGED
package/src/quadtree.js
CHANGED
|
@@ -91,7 +91,7 @@ export class Quadtree {
|
|
|
91
91
|
// 20km). Shrinking the penalty-free near radius lets the far-LOD falloff coarsen MORE of the
|
|
92
92
|
// off-screen / past-horizon field, cutting peak visible leaves toward ~600-900 (precondition
|
|
93
93
|
// for the 512 layer cap). These are THE only values -- no device tier.
|
|
94
|
-
const near = Math.max(this._camAlt *
|
|
94
|
+
const near = Math.max(this._camAlt * 4.0, horizon * 0.5, 20000.0);
|
|
95
95
|
// floor 0.5 (was 0.18): past the horizon the split may HALVE, not crush to ~1/5 (which was
|
|
96
96
|
// collapsing near-field detail on descent). Foreground (latC<near) stays fall=1 -> full LOD.
|
|
97
97
|
const fall = 1.0 / (1.0 + Math.max(0.0, latC - near) / near);
|
|
@@ -104,7 +104,8 @@ export class Quadtree {
|
|
|
104
104
|
// stays sharp (floor 0.5) so the deck keeps its near-field detail. fpsAltM live via this.fpsAltM.
|
|
105
105
|
const fpsAltM = this.fpsAltM || 5000.0;
|
|
106
106
|
const aboveFps = Math.min(1.0, Math.max(0.0, (this._camAlt - fpsAltM) / (fpsAltM * 8.0))); // 0 at fps height -> 1 by ~45km
|
|
107
|
-
const
|
|
107
|
+
const maxFloor = 0.7;
|
|
108
|
+
const floor = 0.25 + (maxFloor - 0.25) * (aboveFps * aboveFps * (3 - 2 * aboveFps)); // 0.25 deck -> 0.7 high alt, always some far coarsening
|
|
108
109
|
const effSplit = this.splitDist * Math.max(floor, fall);
|
|
109
110
|
if (dist < l * effSplit && level < this.maxLevel) {
|
|
110
111
|
const hl = l / 2.0;
|
package/src/shaders/terrain.glsl
CHANGED
|
@@ -1608,7 +1608,8 @@ void main() {
|
|
|
1608
1608
|
vec3 texDn = vec3(0.0); // photo-texture WORLD-SPACE normal perturbation, applied after uReliefShade
|
|
1609
1609
|
// SPLAT RUNS UNDERWATER TOO (user 2026-06-11 'continue under water as sand and rock'): the old
|
|
1610
1610
|
// vH > -2 gate cut the photo textures at the waterline, leaving the seabed flat-colored.
|
|
1611
|
-
|
|
1611
|
+
float texFarFade = 1.0 - smoothstep(8000.0, 10000.0, pxWorld);
|
|
1612
|
+
if (uHasSurfTex > 0.5 && uTexMix > 0.001 && texFarFade > 0.001) {
|
|
1612
1613
|
// material weights from the existing gates (climate = vClimate: z=temp, w=humid)
|
|
1613
1614
|
// SAND GATE = THE MACRO DESERT GATE (user 2026-06-11 'all the grassy areas need to have the
|
|
1614
1615
|
// grass texture'): the old humid<0.42 band splatted SAND across savanna/steppe/meadow-edge
|
|
@@ -1695,7 +1696,7 @@ void main() {
|
|
|
1695
1696
|
texAlb = mix(albB, albA, bSharp);
|
|
1696
1697
|
texNrm = mix(nrmB, nrmA, bSharp);
|
|
1697
1698
|
}
|
|
1698
|
-
float k = uTexMix;
|
|
1699
|
+
float k = uTexMix * texFarFade;
|
|
1699
1700
|
// macro-tinted detail (user 2026-06-10 'the textured patch must be tinted to the same shade
|
|
1700
1701
|
// as the spot its replacing'): the texture contributes STRUCTURE + relative chroma only,
|
|
1701
1702
|
// luminance-normalized onto the macro biome/climate color, so the splat never shifts the
|