mapspinner 0.1.16 → 0.1.17

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.16",
3
+ "version": "0.1.17",
4
4
  "description": "WebGL2 Earth-scale terrain rendering SDK for interactive globe applications",
5
5
  "main": "src/index.js",
6
6
  "exports": {
package/src/gl-render.js CHANGED
@@ -792,7 +792,7 @@ export async function initMapspinnerRender(gl, opts = {}) {
792
792
  gl.uniform1f(U('uTexTileM'), _g('texTile', 2400.0)); // metres per repeat (user: 24m read as noise/rock -- 100x bigger)
793
793
  gl.uniform1f(U('uTexNrmK'), _g('texNrmK', 3.0)); // 0.8 -> 3.0 (user 2026-06-11 'displacement normals must be THE texture normals': A/B-measured -- 0.8 was visually NIL (0% of px changed >10 on toggle), 2.0 gave 1.3%, 5.0 gave 22%; the normalize(nLit+texDn) compresses the response so visibility is non-linear in K. 3.0 makes the displacement-derived relief clearly read; the loader's per-texel 0.9 tilt cap keeps the historical saturation/scramble class structurally impossible at any apply strength)
794
794
  gl.uniform1f(U('uTexMix'), _g('texMix', 0.85)); // splat blend amount (0 = off)
795
- gl.uniform1f(U('uTexWarp'), _g('texWarp', 0.5)); // anti-repetition warp amplitude (0.5 = ~0.6 tile offset max, breaks tile boundaries)
795
+ gl.uniform1f(U('uTexWarp'), _g('texWarp', 0.25)); // anti-repetition warp amplitude (halved from 0.5 per user)
796
796
  gl.uniform1f(U('uTexPhoto'), _g('texPhoto', 0.0)); // raw photo-color fraction (0 = patch matches the macro shade exactly)
797
797
  gl.uniform1f(U('uTexPhotoNear'), _g('texPhotoNear', 0.45)); // near-field material identity (photo hue at macro luminance; user 2026-06-12 'must be either grass or sand')
798
798
  gl.uniform4f(U('uSurfMeanL'), _surfMeanL[0], _surfMeanL[1], _surfMeanL[2], _surfMeanL[3]); // per-layer mean linear luminance (shade-match divisor)
@@ -974,12 +974,10 @@ void main() {
974
974
  // visible curtain through the transparent shallows.
975
975
  highp float skirt = (vertex.z > 0.5 && uIsWater < 0.5) ? max(defOffset.z * 0.12, 60.0) : 0.0; // W7: metres (tile-size scaled) -> highp
976
976
  vWorld = dir0 * (R + hR - skirt); // ABSOLUTE world pos (RENDER height: ocean top flat) -> FS lighting/atmosphere
977
- // TEXTURE DOMAIN WARP -- VS-side, HALVED frequencies (user 2026-06-12 'halve the warp frequency' +
978
- // 'as performant as possible'): lattice 900/3600/14000 -> 450/1800/7000 (waves 2x larger: ~88km/22km/5.6km
979
- // at the same +/-1.2/0.6/0.3-tile amplitudes). Moved out of the per-pixel FS (-9 snoise3/pixel); dir0 is
980
- // the same normalize(vWorld) the FS used, so the field is identical, just vertex-sampled.
977
+ // TEXTURE DOMAIN WARP -- VS-side, HALVED AGAIN (user 2026-06-12): lattice 450/1800/7000 -> 225/900/3500
978
+ // (waves 2x larger again: ~176km/44km/11km).
981
979
  {
982
- highp vec3 w0 = dir0 * 450.0, w1 = dir0 * 1800.0, w2 = dir0 * 7000.0;
980
+ highp vec3 w0 = dir0 * 225.0, w1 = dir0 * 900.0, w2 = dir0 * 3500.0;
983
981
  vTexWarp = vec3(snoise3(w0), snoise3(w0 + vec3(7.3)), snoise3(w0 + vec3(23.9))) * 1.2
984
982
  + vec3(snoise3(w1), snoise3(w1 + vec3(13.7)), snoise3(w1 + vec3(31.1))) * 0.6
985
983
  + vec3(snoise3(w2), snoise3(w2 + vec3(5.1)), snoise3(w2 + vec3(17.9))) * 0.3;