OverviewFilesCommitsIssuesDocsReleasesPeers

terrain-lookdev commits / 8f33565

lookdev: expose field_half_range, so the harness runs the map's parameters
erosion_render gains --set field_half_range; sweep_assumed_slope's MAP_PARAMS and gate_dc_vs_lookdev's map parser both carry it. Without this the harness would silently run the OLD slope normalisation while the engine ran the new one — the same parameters-not-implementations mistake the gate itself was fixed for in c7e41fb.
8f33565f70011ff3be350a2081423b001d299f34
by plankatron <fleeky@gmail.com> · 2026-09-02T14:59:06.000Z

Changed files (3) +8 -1

erosion_render.cpp +1 -0
……@@ -353,6 +353,7 @@ static void set_param(ErosionWrapperParams& p, const char* k, const char* v) {
353353 else if (!strcmp(k, "onset_ridge_oct")) p.onset_ridge_oct = f;
354354 else if (!strcmp(k, "assumed_slope_mag")) p.assumed_slope_mag = f;
355355 else if (!strcmp(k, "assumed_slope_mix")) p.assumed_slope_mix = f;
356 else if (!strcmp(k, "field_half_range")) p.field_half_range = f;
356357 else { fprintf(stderr, "unknown parameter '%s'\n", k); exit(2); }
357358}
358359
gate_dc_vs_lookdev.py +3 -1
……@@ -52,6 +52,7 @@ def map_params():
5252 gully, depth = const("EROSION_GULLY_METRES"), const("EROSION_DEPTH_METRES")
5353 k = const("EROSION_AMPLITUDE_K")
5454 hs, gain = const("EROSION_HEIGHT_SCALE"), const("EROSION_GAIN")
55 fhr = const("EROSION_FIELD_HALF_RANGE")
5556 oct_ = const("EROSION_OCTAVES")
5657 # The map's own two derivations, mirrored (map :602 and the erosion_scale line).
5758 strength = depth * th * cell / (k * gully)
……@@ -59,7 +60,8 @@ def map_params():
5960 vals = [("floor_y", floor_y), ("ceiling_y", ceil_y), ("terrain_height", th),
6061 ("en_height_scale", hs), ("en_strength", strength),
6162 ("en_erosion_scale", escale), ("en_cell_scale", cell),
62 ("en_octaves", int(oct_)), ("en_gain", gain)]
63 ("en_octaves", int(oct_)), ("en_gain", gain),
64 ("field_half_range", fhr)]
6365 out = []
6466 for kk, vv in vals:
6567 out += ["--set", kk, str(vv)]
sweep_assumed_slope.py +4 -0
……@@ -47,6 +47,9 @@ MIXES = [1.0, 0.75, 0.5, 0.25, 0.0]
4747FLOOR_Y, CEILING_Y, TERRAIN_HEIGHT = -10900.0, 10100.0, 60000.0
4848GULLY_METRES, DEPTH_METRES = 60.0, 30.0
4949CELL_SCALE, OCTAVES, GAIN, HEIGHT_SCALE = 0.7, 7, 0.5, 5.0
50# The FIELD's half-relief, the SLOPE's vertical unit. Measured over all 841
51# cached tiles: -4829..5110 m. NOT the playable y_range, which is 2.1x larger.
52FIELD_HALF_RANGE = 4970.0
5053EROSION_H = (CEILING_Y - FLOOR_Y) * 0.25 * 0.5 # map :313
5154MAP_PARAMS = [
5255 ("floor_y", FLOOR_Y),
……@@ -58,6 +61,7 @@ MAP_PARAMS = [
5861 ("en_cell_scale", CELL_SCALE),
5962 ("en_octaves", OCTAVES),
6063 ("en_gain", GAIN),
64 ("field_half_range", FIELD_HALF_RANGE),
6165]
6266
6367