Choose an anti-aliasing strategy #32

Open
opened 2026-09-13 17:23:02 +00:00 by icub3d · 0 comments
Owner

Bevy defaults Msaa to Sample4. On the tablet it costs 2.25 ms of a 19.91 ms
frame, measured in #31.

This is no longer a performance issue. ADR 0006
sets the budget at 33 ms, and 2.25 ms fits inside it comfortably — there is 13.4 ms of
headroom. What is left is the question that should have been asked first: how should the
board read?

The mission view is coloured primitives with hard geometric edges, a grid of cubes seen
at an angle. Aliasing on those edges is exactly the case MSAA exists for, and pillar 4 is
about the player reading the board — a shimmering tile boundary is a readability cost
before it is an aesthetic one. The default may well be right; it has simply never been
chosen.

Options

  • Sample4 — the current default, 2.25 ms.
  • Sample2 — not measured; cheaper, and likely most of the quality.
  • Msaa::Off — 0 ms, and the edges will show.
  • FXAA — cheap and resolution-independent, softer result.
  • TAA — better edges, but wants motion vectors and a stable camera; a turn-based game
    that snaps the camera between positions is not its best case.

How to settle it

Look at it. android/build.sh --install --features perf reports the frame cost of a
configuration, but the cost is not the hard part any more — put the options on the tablet
and compare the tile edges at the angles the camera actually sits at.

Done when

Anti-aliasing is chosen deliberately rather than inherited from Msaa::default(), with
the reason recorded and the frame cost noted.

Bevy defaults `Msaa` to `Sample4`. On the tablet it costs **2.25 ms** of a 19.91 ms frame, measured in #31. **This is no longer a performance issue.** [ADR 0006](../src/branch/main/docs/adr/0006-target-thirty-frames.md) sets the budget at 33 ms, and 2.25 ms fits inside it comfortably — there is 13.4 ms of headroom. What is left is the question that should have been asked first: how should the board read? The mission view is coloured primitives with hard geometric edges, a grid of cubes seen at an angle. Aliasing on those edges is exactly the case MSAA exists for, and pillar 4 is about the player reading the board — a shimmering tile boundary is a readability cost before it is an aesthetic one. The default may well be right; it has simply never been chosen. ## Options - `Sample4` — the current default, 2.25 ms. - `Sample2` — not measured; cheaper, and likely most of the quality. - `Msaa::Off` — 0 ms, and the edges will show. - FXAA — cheap and resolution-independent, softer result. - TAA — better edges, but wants motion vectors and a stable camera; a turn-based game that snaps the camera between positions is not its best case. ## How to settle it Look at it. `android/build.sh --install --features perf` reports the frame cost of a configuration, but the cost is not the hard part any more — put the options on the tablet and compare the tile edges at the angles the camera actually sits at. ## Done when Anti-aliasing is chosen deliberately rather than inherited from `Msaa::default()`, with the reason recorded and the frame cost noted.
Sign in to join this conversation.
No description provided.