mapspinner 0.1.41 → 0.1.43
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/bash.exe.stackdump +28 -0
- package/package.json +1 -1
- package/src/gl-render.js +22 -4
- package/src/shaders/terrain.glsl +14 -5
- package/src/terrain-gen-controls.js +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Stack trace:
|
|
2
|
+
Frame Function Args
|
|
3
|
+
0007FFFFA9C0 00021005FEBA (000210285F48, 00021026AB6E, 000000000000, 0007FFFF98C0) msys-2.0.dll+0x1FEBA
|
|
4
|
+
0007FFFFA9C0 0002100467F9 (000000000000, 000000000000, 000000000000, 0007FFFFAC98) msys-2.0.dll+0x67F9
|
|
5
|
+
0007FFFFA9C0 000210046832 (000210285FF9, 0007FFFFA878, 000000000000, 000000000000) msys-2.0.dll+0x6832
|
|
6
|
+
0007FFFFA9C0 000210068F86 (000000000000, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x28F86
|
|
7
|
+
0007FFFFA9C0 0002100690B4 (0007FFFFA9D0, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x290B4
|
|
8
|
+
0007FFFFACA0 00021006A49D (0007FFFFA9D0, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x2A49D
|
|
9
|
+
End of stack trace
|
|
10
|
+
Loaded modules:
|
|
11
|
+
000100400000 bash.exe
|
|
12
|
+
7FFFAD120000 ntdll.dll
|
|
13
|
+
7FFFABF70000 KERNEL32.DLL
|
|
14
|
+
7FFFAAA90000 KERNELBASE.dll
|
|
15
|
+
7FFFAC040000 USER32.dll
|
|
16
|
+
000210040000 msys-2.0.dll
|
|
17
|
+
7FFFAA440000 win32u.dll
|
|
18
|
+
7FFFAC210000 GDI32.dll
|
|
19
|
+
7FFFAA6B0000 gdi32full.dll
|
|
20
|
+
7FFFAA9E0000 msvcp_win.dll
|
|
21
|
+
7FFFAA7E0000 ucrtbase.dll
|
|
22
|
+
7FFFABA60000 advapi32.dll
|
|
23
|
+
7FFFAAF30000 msvcrt.dll
|
|
24
|
+
7FFFAB070000 sechost.dll
|
|
25
|
+
7FFFAC240000 RPCRT4.dll
|
|
26
|
+
7FFFA9990000 CRYPTBASE.DLL
|
|
27
|
+
7FFFAA930000 bcryptPrimitives.dll
|
|
28
|
+
7FFFAC710000 IMM32.DLL
|
package/package.json
CHANGED
package/src/gl-render.js
CHANGED
|
@@ -655,8 +655,12 @@ export async function initMapspinnerRender(gl, opts = {}) {
|
|
|
655
655
|
// The analytic single-scatter radiance is HDR with small magnitudes; lift then
|
|
656
656
|
// ACES tonemap (matches the WebGPU sky pass family). EXPOSURE tuned so the limb
|
|
657
657
|
// glow + daylit sky read as an atmosphere without blowing out.
|
|
658
|
-
vec3 c = radiance *
|
|
658
|
+
vec3 c = radiance * 105.0; // 120->105: trim exposure so the bright daytime sky stops clipping to white
|
|
659
659
|
vec3 mapped = clamp((c*(2.51*c+0.03))/(c*(2.43*c+0.59)+0.14), 0.0, 1.0); // ACES
|
|
660
|
+
// DAY SKY TOO WHITE (user 2026-06-14): ACES desaturates the bright daylit sky toward white. Push
|
|
661
|
+
// saturation back up so the day sky reads BLUE (sun disc stays white -- it is already near-neutral).
|
|
662
|
+
float skyLum = dot(mapped, vec3(0.2126, 0.7152, 0.0722));
|
|
663
|
+
mapped = clamp(mix(vec3(skyLum), mapped, 1.35), 0.0, 1.0);
|
|
660
664
|
fragColor = vec4(pow(mapped, vec3(1.0/2.2)) * uSkyFade, 1.0);
|
|
661
665
|
}`;
|
|
662
666
|
function rawShader(type, source){ const s=gl.createShader(type); gl.shaderSource(s, source); gl.compileShader(s);
|
|
@@ -776,7 +780,14 @@ export async function initMapspinnerRender(gl, opts = {}) {
|
|
|
776
780
|
const camDist = Math.hypot(cam.eye[0], cam.eye[1], cam.eye[2]);
|
|
777
781
|
const alt = Math.max(0.0, camDist - R);
|
|
778
782
|
const altAboveTerrain = Math.max(0.001, alt - R * (cam.surfElev || 0));
|
|
779
|
-
|
|
783
|
+
// FAR-PLANE HORIZON RADIUS = R - 500m (user 2026-06-14: 'nearby mountains disappear at water level;
|
|
784
|
+
// adjust that level to 500m under water'). The far plane tracks the sea-level horizon = sqrt(camDist^2
|
|
785
|
+
// - R^2), which at the deck (camDist~=R) collapses to a few hundred metres -> coastal mountains a km
|
|
786
|
+
// out fall beyond the far plane and vanish. Dropping the horizon reference radius 500m below sea level
|
|
787
|
+
// extends the horizon to tens of km at low altitude so near-shore relief stays in view (negligible
|
|
788
|
+
// depth-precision cost: 500m vs R~6.37e6). Both the cull and the draw use this (single source).
|
|
789
|
+
const RHORIZON = R - 500.0;
|
|
790
|
+
const horizon = Math.sqrt(Math.max(0.0, camDist*camDist - RHORIZON*RHORIZON));
|
|
780
791
|
// MATCH render()'s near exactly (2026-06-14 jank fix): the cull frustum must use the SAME near
|
|
781
792
|
// as the draw frustum, else behind-limb/screen-AABB culling diverges from what is actually drawn
|
|
782
793
|
// at the deck (cull near was max(*0.1,0.1) while render used the <2m 0.05 branch).
|
|
@@ -812,7 +823,14 @@ export async function initMapspinnerRender(gl, opts = {}) {
|
|
|
812
823
|
const camDist = Math.hypot(cam.eye[0], cam.eye[1], cam.eye[2]);
|
|
813
824
|
const alt = Math.max(0.0, camDist - R);
|
|
814
825
|
const altAboveTerrain = Math.max(0.001, alt - R * (cam.surfElev || 0));
|
|
815
|
-
|
|
826
|
+
// FAR-PLANE HORIZON RADIUS = R - 500m (user 2026-06-14: 'nearby mountains disappear at water level;
|
|
827
|
+
// adjust that level to 500m under water'). The far plane tracks the sea-level horizon = sqrt(camDist^2
|
|
828
|
+
// - R^2), which at the deck (camDist~=R) collapses to a few hundred metres -> coastal mountains a km
|
|
829
|
+
// out fall beyond the far plane and vanish. Dropping the horizon reference radius 500m below sea level
|
|
830
|
+
// extends the horizon to tens of km at low altitude so near-shore relief stays in view (negligible
|
|
831
|
+
// depth-precision cost: 500m vs R~6.37e6). Both the cull and the draw use this (single source).
|
|
832
|
+
const RHORIZON = R - 500.0;
|
|
833
|
+
const horizon = Math.sqrt(Math.max(0.0, camDist*camDist - RHORIZON*RHORIZON));
|
|
816
834
|
const near = altAboveTerrain < 2.0 ? 0.05 : Math.max(altAboveTerrain * 0.1, 0.05);
|
|
817
835
|
const _fBlend = Math.min(1.0, Math.max(0.0, (alt - 500000.0) / 4500000.0));
|
|
818
836
|
const farGround = Math.max(horizon, alt * 8.0);
|
|
@@ -993,7 +1011,7 @@ export async function initMapspinnerRender(gl, opts = {}) {
|
|
|
993
1011
|
gl.uniform1f(U('uLookSat'), _g('lookSat', 1.15));
|
|
994
1012
|
gl.uniform1f(U('uLookContrast'), _g('lookContrast', 1.08));
|
|
995
1013
|
{ const o3=(n,d)=>{ const w=(typeof window!=='undefined'&&window['__'+n])||null; const v=(Array.isArray(w)&&w.length===3)?w:d; gl.uniform3f(U(n), v[0],v[1],v[2]); };
|
|
996
|
-
o3('uOceanDeep',[0.008,0.025,0.06]); o3('uOceanShallow',[0.07,0.22,0.26]); o3('uOceanK',[0.
|
|
1014
|
+
o3('uOceanDeep',[0.008,0.025,0.06]); o3('uOceanShallow',[0.07,0.22,0.26]); o3('uOceanK',[0.016,0.007,0.0028]); } // K halved (user 2026-06-14 'see the land under the water properly') = clearer water, bed visible through shallow/medium depth; deep basins still opaque
|
|
997
1015
|
// (the continuous broad-shape field is now always on - the single terrain shape source -
|
|
998
1016
|
// so its old on/off lever uniform was removed from terrain.glsl; nothing to set here.)
|
|
999
1017
|
// LIVE biome ramp (window.__gen.state.biome, else tuned defaults) -- full-adjustability.
|
package/src/shaders/terrain.glsl
CHANGED
|
@@ -634,7 +634,11 @@ highp float composeHeight(vec3 dir0, highp vec2 faceLocal, float tileM){ // W7
|
|
|
634
634
|
// the field -> seam-safe + the collision probe shares it. GUARD: a stale/unset uniform (0) would
|
|
635
635
|
// disable the shelf -> default 600 so it always applies. window.__beachShelf dials S live.
|
|
636
636
|
highp float bShelf = uBeachShelfM > 1.0 ? uBeachShelfM : 600.0;
|
|
637
|
-
|
|
637
|
+
// C1-CONTINUOUS shelf (user 2026-06-14 'hard shading line where landscape meets beach'): the old
|
|
638
|
+
// h*h/S met the identity at h=S with SLOPE 2 (vs 1) -> a derivative kink -> the slope-keyed shading
|
|
639
|
+
// (rock/AO/material) SNAPPED into a hard line at the shelf top. f = (h*h/S)*(2 - h/S) keeps f(0)=0,
|
|
640
|
+
// f'(0)=0 (flat at the waterline = wide beach) AND f(S)=S, f'(S)=1 (smooth join to natural land).
|
|
641
|
+
if (h < bShelf) h = (h * h / bShelf) * (2.0 - h / bShelf);
|
|
638
642
|
}
|
|
639
643
|
// displacement now continues UNDERWATER (the old land-only gate served the flat-clamped ocean,
|
|
640
644
|
// gone since 026d530): the seabed carries the same micro-relief as land = realistic continuation.
|
|
@@ -853,7 +857,8 @@ void main() {
|
|
|
853
857
|
vH = max(vH, -11000.0); // cap depth at Mariana Trench (~11km)
|
|
854
858
|
} else {
|
|
855
859
|
highp float bShelf = uBeachShelfM > 1.0 ? uBeachShelfM : 600.0; // LAND COASTAL SHELF -- mirror composeHeight exactly (wide beach, user 2026-06-14); guard stale/unset uniform
|
|
856
|
-
if (vH < bShelf) vH = vH * vH / bShelf;
|
|
860
|
+
if (vH < bShelf) vH = (vH * vH / bShelf) * (2.0 - vH / bShelf); // C1-continuous (mirror composeHeight) -- removes the beach-top slope kink / hard shading line
|
|
861
|
+
|
|
857
862
|
}
|
|
858
863
|
vH += vDisp;
|
|
859
864
|
vH += detailFbm(dir0) * uDetailOverlay * 30.0 * step(0.0, vH);
|
|
@@ -1582,8 +1587,12 @@ void main() {
|
|
|
1582
1587
|
// ~0 and nadir fresnel ~0 made the whole shoreline INVISIBLE (coverage 0 at a bisected
|
|
1583
1588
|
// waterline pose). Real shallow water still shows its surface (sky reflection + ripple):
|
|
1584
1589
|
// floor the opacity once genuinely submerged so shorelines read as water.
|
|
1585
|
-
|
|
1586
|
-
|
|
1590
|
+
// SHALLOW TRANSPARENCY (user 2026-06-14: 'water fully transparent where it meets land, see the
|
|
1591
|
+
// bed through it'): floor cut 0.30->0.12 and pushed deeper (start 1.5m) so the bed shows through
|
|
1592
|
+
// the shoreline + shallows; deeper water still goes opaque via Beer-Lambert (1-Tavg). The contact
|
|
1593
|
+
// fade is widened (0->3m) so the exact waterline is clear, not a hard opaque rim.
|
|
1594
|
+
alphaW = max(alphaW, 0.12 * smoothstep(1.5, 8.0, depthM));
|
|
1595
|
+
alphaW *= smoothstep(0.0, 3.0, depthM);
|
|
1587
1596
|
fragColor = vec4(pow(mappedW, vec3(1.0 / 2.2)), alphaW);
|
|
1588
1597
|
return;
|
|
1589
1598
|
}
|
|
@@ -1746,7 +1755,7 @@ void main() {
|
|
|
1746
1755
|
// WIDENED TRANSITION (2026-06-13): srLo+0.2 -> srLo+0.4 so rock/grass and rock/sand/snow
|
|
1747
1756
|
// boundaries have a wider blend band — the slope gradient between materials is no longer
|
|
1748
1757
|
// a ~0.2-unit hard step but a ~0.4-unit gradual fade.
|
|
1749
|
-
float srLo = max(slopeRock.x, 0.05), srHi = max(slopeRock.y, srLo + 0.
|
|
1758
|
+
float srLo = max(slopeRock.x, 0.05), srHi = max(slopeRock.y, srLo + 0.25); // 0.18->0.10->0.05 lo; band +0.35->+0.25 (user 2026-06-14 repeated 'rock face angle more sensitive'): rock fully engages by a GENTLER slope. Stays above truly-flat (rockSlope~0).
|
|
1750
1759
|
float wRockSlope = smoothstep(mix(srLo, 0.50, sandRegion), mix(srHi, 0.70, sandRegion), rockSlope);
|
|
1751
1760
|
// WARPED BIOME BAND EDGES (user 2026-06-14: the snow/rock lines were STRAIGHT horizontal contours
|
|
1752
1761
|
// viewed side-on; the vTexWarp domain warp was too low-freq (>1.8km waves = ~constant over one
|
|
@@ -37,7 +37,7 @@ const DEFAULTS = {
|
|
|
37
37
|
bcLowland: [0.20,0.34,0.15], bcGrass: [0.26,0.40,0.17], bcRock: [0.52,0.43,0.34], // bcRock -> a clearly WARMER TAN-GREY (R>G>B) so it reads as ROCK when lit, not olive-green (the [0.46,0.42,0.37] near-grey read green next to the biome). state.biome OVERRIDES gl-render defaults via window.__gen.
|
|
38
38
|
bcSnow: [0.92,0.94,0.97],
|
|
39
39
|
bandEdgesLo: [150.0,1200.0], bandEdgesHi: [3500.0,6500.0], snowEdges: [6000.0,8500.0], // 8000/10500->6000/8500 (user 2026-06-11 'snowy mountains disappeared' -- see gl-render snowEdges note) // snowEdges 5200/7000->8000/10500 (user 2026-06-10 'entire terrain white': the rock-by-height fix unmasked snow gates tuned pre-4x; full snow from 5.2km whitened the 11.6km massifs; coldSnow onset = snowEdges.x*0.5 follows) // bandEdgesHi 1600/3200->3500/6500 (user 2026-06-10 'rockface everywhere'): tuned on the pre-4x terrain; with 11.6km peaks everything above 3200m read rock BY HEIGHT alone -- rescale the treeline to the new elevation range
|
|
40
|
-
seaDepthM: 3000.0, slopeRock: [0.0,0.
|
|
40
|
+
seaDepthM: 3000.0, slopeRock: [0.0,0.22], // hi 0.3->0.22 (user 2026-06-14 'rock face angle more sensitive, gentler slopes turn to rock'): rock fully engages by ~0.22 slope; lo stays 0.0 so truly-flat (rockSlope~0) keeps grass
|
|
41
41
|
},
|
|
42
42
|
// REAL-WORLD LOOK overhaul (terraformable lighting/shading levers; applyShaderGlobals sets window
|
|
43
43
|
// globals; gl-render reads them via _g()). Beer-Lambert ocean, biome sat, mottle, sky-fill relief,
|
|
@@ -46,7 +46,7 @@ const DEFAULTS = {
|
|
|
46
46
|
exposure: 1.0, skyFill: 0.45, biomeSat: 0.72, variationAmt: 0.04, colorVar: 0.5, vertexAO: 1.0, reliefShade: 2.5, // variationAmt 0.08->0.04 (user 2026-06-10 'blotchy': the ~50km value mottle painted light/dark patches across the massifs)
|
|
47
47
|
nightFloor: 0.16, termWidth: 0.25, terminatorGlow: 0.30, lookSat: 1.15, lookContrast: 1.08, // nightFloor 0.05->0.16: no black night terrain (2026-06-09)
|
|
48
48
|
detailOverlay: 6.0, hazeMul: 0.65, // 2026-06-10 'pale hazy + featureless': perlin-everywhere albedo+elevation fbm (user-tuned 6) + aerial-perspective strength cut
|
|
49
|
-
ocean: { deep: [0.008,0.025,0.06], shallow: [0.07,0.22,0.26], k: [0.
|
|
49
|
+
ocean: { deep: [0.008,0.025,0.06], shallow: [0.07,0.22,0.26], k: [0.016,0.007,0.0028] }, // k halved (user 2026-06-14 'see the land under the water'): clearer water, bed visible through shallow/medium depth. OVERRIDES the gl-render uOceanK default via window.__uOceanK.
|
|
50
50
|
},
|
|
51
51
|
// HPF band scales (multipliers on the anchor-field band base values; anchor-field.setBandScales).
|
|
52
52
|
hpf: {
|