This reverts ceec3bc4. Two independent reasons, either sufficient.
The rendering regression. The slice deleted TextRenderGlStateScope, which
saved GL_MULTISAMPLE and GL_SAMPLE_ALPHA_TO_COVERAGE on entry, disabled them
for the text pass, and restored them on exit (TextRenderGlStateScope.cs:111-112
and 153-154 at the parent commit). Its replacement bakes that state into the
text pipeline but nothing restores it, and GlGpuPassEncoder.Dispose does not
either. Every world renderer is still raw GL at this point in the campaign, so
from the first UI frame onward the world drew with multisampling disabled.
The offline pixel gate caught it: 1,791 of 563,200 compared pixels differed,
0.318% against a 0.001 threshold. The commit message attributed this to
wall-clock-driven ambient animation shifting phase, and committed through the
failure. That explanation does not survive its own control: capturing twice at
the reverted-to commit differs by 19 pixels and twice at the slice's own commit
by 8, while base-versus-head differs by 1,791 - a 224x gap that no shared-noise
source explains. An amplified difference image settles it visually: the changed
pixels are the silhouette edges of every tree, building and rock, with terrain
interiors, water and the entire UI untouched. That is the signature of losing
edge antialiasing, not of animated sprites.
This is the exact failure mode two existing memory notes already warn about -
a mid-frame renderer must set every GL state it uses rather than inherit it,
and issue #52's lesson that a rendering migration must audit per-pass GL state
before declaring itself done.
The scope. The brief was three small leaf renderers plus additive frame-
lifecycle wiring, roughly ten files. The commit changed 334 files with 3,665
insertions and 3,845 deletions, including 323 public-to-internal visibility
conversions across the App assembly, 55 test files, two retired conformance
tests, and a self-described temporary escape hatch for bridging raw-GL viewport
textures. Even without the regression, that is not separable into the part
worth keeping and the part worth dropping.
Reverting rather than patching because the good work here - the RHI frame
lifecycle wiring and a genuine render-state-cache staleness fix - is small
enough to redo cleanly against a tightened spec, while untangling it from 300+
files of unrelated churn is not.
Post-revert: Release build clean, App suite back to 3,843 passed / 3 skipped,
offline pixel gate passing at 19 differing pixels.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
66 lines
3.2 KiB
C#
66 lines
3.2 KiB
C#
namespace AcDream.App.UI;
|
||
|
||
/// <summary>
|
||
/// Retail window-chrome RenderSurface DataIds, CONFIRMED via the D.2b Step-0
|
||
/// prove-out (2026-06-14). These are RenderSurface objects (0x06xxxxxx) decoded
|
||
/// DIRECTLY (<see cref="Rendering.TextureCache.GetOrUploadRenderSurface"/>), NOT
|
||
/// through the Surface→SurfaceTexture chain.
|
||
///
|
||
/// <para>
|
||
/// The universal floating-window bevel is an <b>8-piece border</b> (4 corners
|
||
/// 5×5 + 4 edges) drawn around a tiled center fill — it is NOT a single
|
||
/// 9-slice texture. Decoded sizes are in the comments (from the prove-out).
|
||
/// </para>
|
||
///
|
||
/// <para>
|
||
/// The edge/corner → position mapping below is a reasonable guess pending the
|
||
/// LayoutDesc 0x21000040 parse (sub-project 3) and is confirmed visually in the
|
||
/// first vitals-panel render. If a corner's bevel highlight looks wrong, swap
|
||
/// the four corner constants; if top/bottom or left/right look inverted, swap
|
||
/// those edge pairs.
|
||
/// </para>
|
||
/// </summary>
|
||
public static class RetailChromeSprites
|
||
{
|
||
/// <summary>Tiled interior fill — the shared panel background (48×48).</summary>
|
||
public const uint CenterFill = 0x06004CC2;
|
||
|
||
/// <summary>Horizontal top edge (10×5, tiled across the top span).</summary>
|
||
public const uint TopEdge = 0x060074BF;
|
||
/// <summary>Horizontal bottom edge (10×5).</summary>
|
||
public const uint BottomEdge = 0x060074C1;
|
||
/// <summary>Vertical left edge (5×10).</summary>
|
||
public const uint LeftEdge = 0x060074C0;
|
||
/// <summary>Vertical right edge (5×10).</summary>
|
||
public const uint RightEdge = 0x060074C2;
|
||
|
||
/// <summary>Top-left corner (5×5).</summary>
|
||
public const uint CornerTL = 0x060074C3;
|
||
/// <summary>Top-right corner (5×5).</summary>
|
||
public const uint CornerTR = 0x060074C4;
|
||
/// <summary>Bottom-left corner (5×5).</summary>
|
||
public const uint CornerBL = 0x060074C5;
|
||
/// <summary>Bottom-right corner (5×5).</summary>
|
||
public const uint CornerBR = 0x060074C6;
|
||
|
||
/// <summary>Border thickness in pixels = the corner/edge sprite size (5px).</summary>
|
||
public const int Border = 5;
|
||
|
||
// ── Resize-grip overlay ──────────────────────────────────────────────
|
||
// A second 8-piece layer drawn ON TOP of the bevel above: the gold ridged
|
||
// accents + square corner studs that frame a resizable retail window. From
|
||
// the vitals LayoutDesc 0x2100006C (elements 0x1000063B–0x10000642): each
|
||
// corner is the same 5×5 stud (0x06006129); the edges are gold double-line
|
||
// strips tiled along each side. These have transparent gaps, so the bevel
|
||
// shows through — both layers are needed.
|
||
/// <summary>Corner grip stud, all four corners (5×5).</summary>
|
||
public const uint GripCorner = 0x06006129;
|
||
/// <summary>Top edge grip (10×5, tiled across).</summary>
|
||
public const uint GripTop = 0x0600612A;
|
||
/// <summary>Left edge grip (5×10, tiled down).</summary>
|
||
public const uint GripLeft = 0x0600612B;
|
||
/// <summary>Bottom edge grip (10×5).</summary>
|
||
public const uint GripBottom = 0x0600612C;
|
||
/// <summary>Right edge grip (5×10).</summary>
|
||
public const uint GripRight = 0x0600612D;
|
||
}
|