mapspinner 0.1.54 → 0.1.55
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 +6 -4
package/package.json
CHANGED
package/src/shaders/terrain.glsl
CHANGED
|
@@ -143,7 +143,7 @@ float snoise3(highp vec3 P){ highp vec3 i=floor(P),f=fract(P); highp vec3 u=f*f*
|
|
|
143
143
|
// the same class as the historical snoise3-in-VS-only bug). Pure fn of world dir -> seam-safe +
|
|
144
144
|
// LOD-invariant. Each has an EROSION profile: a wide graded shoulder/valley/bench that blends into
|
|
145
145
|
// terrain plus a deeper core, and returns a wet/depth mask the FS colours.
|
|
146
|
-
const float LAKE_CARVE_DEPTH =
|
|
146
|
+
const float LAKE_CARVE_DEPTH = 220.0; // 90->220 metres of bowl depth (user 2026-06-14 'lakes super shallow+flat'): deeper basins
|
|
147
147
|
float lakeBasinField(vec3 dir){ return 0.5 + 0.5 * snoise3(dir * 55.0 + vec3(4.0, 9.0, 1.0)); }
|
|
148
148
|
float lakeCarveM(vec3 dir, out float wet){
|
|
149
149
|
float basin = lakeBasinField(dir);
|
|
@@ -186,7 +186,7 @@ float inciseRidgeField(vec3 d, float baseFreq, float freqMul){
|
|
|
186
186
|
}
|
|
187
187
|
return sum / norm; // ->1 on the channel network
|
|
188
188
|
}
|
|
189
|
-
const float RIVER_INCISE_DEPTH =
|
|
189
|
+
const float RIVER_INCISE_DEPTH = 280.0; // 120->280 metres at the channel thalweg (user 2026-06-14 'rivers/channels super shallow+flat'): deeper incision
|
|
190
190
|
float riverRidgeField(vec3 dir){ return inciseRidgeField(normalize(dir), 40.0, 2.03); }
|
|
191
191
|
float riverCarveM(vec3 dir, out float wet){
|
|
192
192
|
float ridge = riverRidgeField(dir);
|
|
@@ -2220,8 +2220,10 @@ void main() {
|
|
|
2220
2220
|
// bypasses it via vH<0). Gating on vWaterDepth (NOT the whole carve mask) makes the water LINE UP
|
|
2221
2221
|
// with the flat carved surface -- the graded erosion banks above the waterline stay dry land.
|
|
2222
2222
|
if (vH >= 0.0 && vWaterDepth > 0.0) {
|
|
2223
|
-
// submergence 0..1 over ~0..
|
|
2224
|
-
|
|
2223
|
+
// submergence 0..1 over ~0..160m (40->160, user 2026-06-14 'water super shallow+flat'): the color
|
|
2224
|
+
// saturated at 40m so every deeper lake/river read one flat tone; stretch it so depth shows as a
|
|
2225
|
+
// shallow-edge -> deep-center gradient (thin transparent rim, deep dark center).
|
|
2226
|
+
float sub = clamp(vWaterDepth / 160.0, 0.0, 1.0);
|
|
2225
2227
|
// wave-perturbed water normal (small inland ripple), same tangent frame as the ground.
|
|
2226
2228
|
highp vec3 wOriginL = floor(camWorld / 1024.0) * 1024.0; // W7: ~6.4e6 m snapped anchor -> highp
|
|
2227
2229
|
highp vec2 wpL = vec2(dot(vWorld - wOriginL, ux), dot(vWorld - wOriginL, uy)); // W7: highp camera-relative wave coord
|