docs(vm1): closeout - AP-232 for the translucent detail blend weight; sampler test pins the production constant

Opus narrow re-review of ae651312: APPROVE. Closes its three residuals:
- AP-232 filed: retail's single-pass stage-1 OUTPUT alpha
  (MODULATE(TEXTURE, CURRENT) @0x0059c549) is the blend weight for a
  translucent subset; acdream's two-draw model is exact for opaque
  subsets (fog identity pinned) and a bounded weight difference on
  translucent ones. Distinct from AP-34 (queue order). Owed since
  05970306.
- TerrainAtlas.DetailSamplerDescription names the production sampler
  (WRAP/LINEAR x3 per ACRender::SetDetailSurfaceInternal @0x006b6280);
  the test now asserts that constant's properties instead of a
  test-local copy.
- Plan VM1 section: fragment now described as fogged; VM1 marked CLOSED
  with the Holtburg measurement (+2.17/+0.57/+0.16 vs predicted
  +2.2/+0.66/+0.16) and the detail-on cost (+0.3-0.5 ms CPU at Arwic).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-22 22:50:06 +02:00
parent ae6513126e
commit dcdd102824
5 changed files with 24 additions and 8 deletions

View file

@ -34,6 +34,16 @@ public sealed class TerrainAtlas : IDisposable
/// one-layer 2-D array so it uses the same backend-neutral table contract
/// as every other world texture.
/// </summary>
/// <summary>
/// Retail's detail-stage sampler: <c>ACRender::SetDetailSurfaceInternal</c>
/// (0x006b6280) sets WRAP/WRAP addressing and LINEAR/LINEAR/LINEAR filtering
/// on the detail stage. The LINEAR mip chain is retail's only distance
/// attenuation for built meshes (VM1), so this constant is load-bearing and
/// pinned by <c>TerrainAtlasDetailTextureTests</c>.
/// </summary>
internal static readonly GpuSamplerDescription DetailSamplerDescription =
GpuSamplerDescription.WorldRepeat;
internal readonly record struct RetailDetailTextureBinding(
GpuTextureSlot TextureSlot,
float Tiling,
@ -430,7 +440,7 @@ public sealed class TerrainAtlas : IDisposable
// ChangeRegion and the only reachable SmartBox caller keep
// landscape (0) and object (3) disabled, so do not create or expose
// those categories here.
detailSampler = device.CreateSampler(GpuSamplerDescription.WorldRepeat);
detailSampler = device.CreateSampler(DetailSamplerDescription);
if (terrainDesc is { Count: > 1 })
{
buildingDetail = TryCreateDetailTexture(