mapspinner 0.1.60 → 0.1.61
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 +8 -4
package/package.json
CHANGED
package/src/shaders/terrain.glsl
CHANGED
|
@@ -1237,7 +1237,11 @@ uniform vec4 uSurfMeanL; // per-layer mean linear luminance of the photo col
|
|
|
1237
1237
|
// binary boundary snaps material across wide areas instead of softly interfingering, and the high-freq
|
|
1238
1238
|
// octave aliased on bright materials. Reverted to the clean smoothstep boundaries; a non-aliasing
|
|
1239
1239
|
// 'interesting boundary' technique (e.g. a wide soft transition material band) is a separate future task.
|
|
1240
|
-
vec3 terrainAlbedo(float h, float slope, float rockSlope, highp vec3 worldPos) { // highp: worldPos feeds normalize(worldPos)*freq noise UVs -- mediump would scramble the lattice at close range
|
|
1240
|
+
vec3 terrainAlbedo(float h, float slope, float rockSlope, highp vec3 worldPos, float pxW) { // highp: worldPos feeds normalize(worldPos)*freq noise UVs -- mediump would scramble the lattice at close range
|
|
1241
|
+
// DISTANCE-WIDENED rock-slope band (user 2026-06-14 'hard edge to rock slopes at a distance'): the
|
|
1242
|
+
// close-up height-blend doesn't run far off, so the macro slope gate showed a hard edge. Widen its
|
|
1243
|
+
// upper threshold with distance so the rock->grass slope boundary fades softly when it's far.
|
|
1244
|
+
float rockWiden = smoothstep(20.0, 500.0, pxW) * 0.20;
|
|
1241
1245
|
vec3 c;
|
|
1242
1246
|
if (h < 0.0) {
|
|
1243
1247
|
// SEABED CONTINUES AS LAND MATERIAL (user 2026-06-11 'instead of turning terrain into water,
|
|
@@ -1258,7 +1262,7 @@ vec3 terrainAlbedo(float h, float slope, float rockSlope, highp vec3 worldPos) {
|
|
|
1258
1262
|
float bandWarp = (snoise3(bww * 210.0) * 1.0 + snoise3(bww * 560.0) * 0.5 + snoise3(bww * 1450.0) * 0.25) * 720.0;
|
|
1259
1263
|
c = mix(c, bcRock, smoothstep(bandEdgesHi.x + bandWarp, bandEdgesHi.y + bandWarp, h));
|
|
1260
1264
|
c = mix(c, bcSnow, smoothstep(snowEdges.x + bandWarp, snowEdges.y + bandWarp, h));
|
|
1261
|
-
c = mix(c, bcRock, smoothstep(slopeRock.x, slopeRock.y, rockSlope) * step(0.0, h));
|
|
1265
|
+
c = mix(c, bcRock, smoothstep(slopeRock.x, slopeRock.y + rockWiden, rockSlope) * step(0.0, h));
|
|
1262
1266
|
// OLD PROCEDURAL GREY ROCKFACE DELETED (max-speed sweep 2026-06-10, user 'replace the original
|
|
1263
1267
|
// rock completely'): the photo-rock splat owns steep faces; the 3-tap grey fBm fallback is gone.
|
|
1264
1268
|
}
|
|
@@ -1300,7 +1304,7 @@ vec3 biomeColor(float temp, float humid) {
|
|
|
1300
1304
|
// FOREST vs MEADOW split (user: they must look distinct, not one green). A CRISPER humidity
|
|
1301
1305
|
// boundary (0.48->0.56, was 0.46->0.66) so meadow (drier-temperate) and forest (wetter) read
|
|
1302
1306
|
// as DISTINCT adjacent regions instead of a long ambiguous blend; very-wet deepens to canopy.
|
|
1303
|
-
float wet = smoothstep(0.
|
|
1307
|
+
float wet = smoothstep(0.40, 0.66, humid); // WIDENED 0.48-0.56 -> 0.40-0.66 (user 2026-06-14 'hard lines between light and dark grass'): soft meadow<->forest blend, not a crisp line
|
|
1304
1308
|
float veryWet = smoothstep(0.62, 0.80, humid);
|
|
1305
1309
|
vec3 c = MEADOW; // temperate mid-humidity default
|
|
1306
1310
|
c = mix(c, FOREST, wet); // wet -> forest (crisp boundary)
|
|
@@ -1391,7 +1395,7 @@ float canyonMask(vec3 worldPos, float h, float temp, float humid, float px, out
|
|
|
1391
1395
|
#endif // biomeClassColor/riverMask/canyonMask: DEBUGVIEW-only (called solely from displayMode blocks) -- excluded from render FS cold-compile (FS-2, workflow w4y1bnrqc)
|
|
1392
1396
|
|
|
1393
1397
|
vec3 terrainAlbedoClimate(float h, float slope, float rockSlope, float temp, float humid, highp vec3 worldPos, float pxWorld) { // highp: worldPos feeds normalize(worldPos)*freq noise UVs (mottle/river/canyon ridge) -- mediump scrambles the lattice up close
|
|
1394
|
-
vec3 c = terrainAlbedo(h, slope, rockSlope, worldPos);
|
|
1398
|
+
vec3 c = terrainAlbedo(h, slope, rockSlope, worldPos, pxWorld);
|
|
1395
1399
|
if (h < 0.0) {
|
|
1396
1400
|
// SEA ICE: near-polar ocean (very cold) freezes to white-blue pack ice. Pure fn of the
|
|
1397
1401
|
// anchor temp -> seam-safe; the soft threshold gives an irregular (not hard-zonal) margin.
|