Most text glyphs draw as filled boxes in the menus #6

Closed
opened 2026-11-26 14:42:19 +00:00 by github-bot · 2 comments
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 07:18 UTC · original

What happens: on the menus after the start screen (e.g. "FINISH SETUP?"), most letters of the body text draw as solid boxes, so a sentence reads like "Th□ d□f□□lt c□□tr□ls...". Some glyphs render correctly, and headings in the bold condensed font and the button prompts render fine.

Seen in: dumps of the 3840x2160 UI target (VICTORY_DUMP_TARGETS) on native/join-2 after the first-frame fix, at about 46-48 s with VICTORY_KEYS pressing Enter. Screenshots are in #5.

Likely area: the font atlas texture or its sampling, not geometry, since the boxes sit exactly where the glyphs belong. Candidates:

  • a texture format or channel mapping for the atlas (BC4, R8 or A8: is the glyph coverage read from the wrong channel?);
  • swizzle or tiling decode of the atlas texture (crates/victory-formats);
  • the sampler (static samplers aren't in the host root layout yet; see docs/ROADMAP.md section 1);
  • an alpha test, discard or blend state on the text pixel shader.

How to start: compare a correctly drawn glyph with a boxed one: same pixel shader, different texture? Dump the atlas texture the text draw samples and check whether its contents decode to glyph shapes.

See docs/ROADMAP.md section 1 and the "First real frame" section of docs/native-host.md.

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 07:18 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/6) **What happens:** on the menus after the start screen (e.g. "FINISH SETUP?"), most letters of the body text draw as solid boxes, so a sentence reads like "Th□ d□f□□lt c□□tr□ls...". Some glyphs render correctly, and headings in the bold condensed font and the button prompts render fine. **Seen in:** dumps of the 3840x2160 UI target (`VICTORY_DUMP_TARGETS`) on native/join-2 after the first-frame fix, at about 46-48 s with `VICTORY_KEYS` pressing Enter. Screenshots are in #5. **Likely area:** the font atlas texture or its sampling, not geometry, since the boxes sit exactly where the glyphs belong. Candidates: - a texture format or channel mapping for the atlas (BC4, R8 or A8: is the glyph coverage read from the wrong channel?); - swizzle or tiling decode of the atlas texture (`crates/victory-formats`); - the sampler (static samplers aren't in the host root layout yet; see docs/ROADMAP.md section 1); - an alpha test, discard or blend state on the text pixel shader. **How to start:** compare a correctly drawn glyph with a boxed one: same pixel shader, different texture? Dump the atlas texture the text draw samples and check whether its contents decode to glyph shapes. See docs/ROADMAP.md section 1 and the "First real frame" section of docs/native-host.md.
github-bot 2026-11-26 14:42:19 +00:00
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:42:19 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 07:20 UTC · original

Update: with A8/R8 texture formats added (the menu atlas is A8 2048x2048), the pattern is clearer. The letters that draw as boxes are exactly the ones with no ascender or descender (a c e m n o r s u v w x z); letters with them render correctly. First suspect: stencil-then-cover text rendering. The game never calls ClearDepthStencilView, and the host drops stencil-only clears, so stencil state left over from earlier glyphs could fill the x-height boxes.

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 07:20 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/6#issuecomment-7185353829) Update: with A8/R8 texture formats added (the menu atlas is A8 2048x2048), the pattern is clearer. The letters that draw as boxes are exactly the ones with no ascender or descender (a c e m n o r s u v w x z); letters with them render correctly. First suspect: stencil-then-cover text rendering. The game never calls ClearDepthStencilView, and the host drops stencil-only clears, so stencil state left over from earlier glyphs could fill the x-height boxes.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 09:22 UTC · original

Fixed: glyphs render correctly in the menus now (blend state comes from the register image, plus hot-texture probing for glyph caches).

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 09:22 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/6#issuecomment-7187867940) Fixed: glyphs render correctly in the menus now (blend state comes from the register image, plus hot-texture probing for glyph caches).
This discussion has been locked. Commenting is limited to contributors.
No description provided.