Skip to content

[Infra] Pixi client has no visual regression guard (required before WP-08) #127

Description

@N1k4G

WP-07 (#119) named this as its own known gap: compare-rendering.mjs gates the legacy client only, so nothing would catch a Pixi visual regression.

Required before WP-08 starts moving real scenes. Deliberately not pulled into #119 or #125.

Why it is needed

The silt regression in #119 is the worked example. Silt was assigned to the terrain layer, below structure, which put 31 of its 48 particles behind the hull's opaque fill. It passed lint, typecheck, unit, parity and e2e, and was found by reading the diff.

What the guard should be

Reference frames plus scene statistics — not statistics alone.

Aggregate statistics (mean luminance, contrast, channel spread per scene) are cheap and robust to intentional art changes, but they cannot see an object that moved or vanished: silt drawn behind the hull and silt drawn correctly can produce very similar frame-wide numbers. A small set of reference frames with perceptual comparison catches displacement and absence; statistics catch drift the reference set does not cover. Both, not either.

Suggested shape:

  • A small, deliberately chosen reference set — enough scenes to cover the layer stack, not a screenshot of everything.
  • Perceptual comparison rather than exact pixel equality, so antialiasing and driver differences do not produce noise.
  • Scene statistics alongside, with thresholds set from the reference frames rather than guessed. See [Question] Wreck and cave interiors measure flat - is that the intended look? #124 — that work establishes reference frames first for the same reason.

Already in place, and not a substitute

tests/unit/site-layers.test.ts (#119) asserts layer assignment structurally: things between the camera and the wreck are painted after it, the wreck after the seabed it rests on, and the cull window covers the visible rectangle at any aspect ratio. It costs milliseconds and needs no GPU.

That catches the class of mistake silt actually was, but it only sees the declared ordering — never whether a frame looks right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions