Map presenter: ShowAsteroidsInMinimap stays (head's belt cost misses 0.1 ms); belt upload via SubUpdates; settings key restored

The setting gates belts on the minimap again, through MapPresenter.BeltsOnMinimap; the map screen always draws them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-16 23:54:45 +02:00
commit 4694366d98
8 changed files with 35 additions and 10 deletions

View file

@ -63,6 +63,7 @@ public static class MapBeltPerf
var transforms = new float4[count];
// BEGIN MEASURED SETUP
var presenter = new MapPresenter(new Material[0], AssetDatabase.LoadAssetAtPath<Material>("Assets/Materials/UI/MapAsteroid.mat"), 4, 4, 3f);
presenter.BeltsOnMinimap = true;
presenter.RegisterBelt(beltKey, transforms);
// END MEASURED SETUP
var stopwatch = new Stopwatch();

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2bf3d3dcd7e3dd940add2640db93e3fe

View file

@ -141,6 +141,7 @@ public static class MapPresenterSmoke
var belt = new float4[Asteroids];
map.RegisterBelt(beltKey, belt);
zone.EvaluateBelt(beltKey, belt, DrawAhead.Time(zone, 0));
map.BeltsOnMinimap = true;
map.SetFade(ship, 1f);
map.SetFade(other, 1f);
map.SetMinimapScale(2f);
@ -177,6 +178,16 @@ public static class MapPresenterSmoke
for (var i = 0; i < belt.Length; i++)
Require(read[i].x == belt[i].x && read[i].y == belt[i].y && read[i].z == belt[i].z && read[i].w == belt[i].w, $"Belt buffer differs from the frame's floats at {i}.");
// The setting still gates belts on the minimap, and the map screen always shows them.
map.BeltsOnMinimap = false;
map.Draw(zone, 0);
Require(map.BeltDraws == 0, "A belt drew on the minimap with the setting off.");
map.OpenMapScreen(true);
map.Draw(zone, 0);
Require(map.BeltDraws == 1, "The map screen did not draw the belt with the setting off.");
map.OpenMapScreen(false);
map.BeltsOnMinimap = true;
// Fade: half faded reaches the icon's colour alpha on the next draw; faded out draws nothing.
map.SetFade(ship, .5f);
map.Draw(zone, 0);