Skip to content

PoC pixel-art mode - #2

Draft
skhoroshavin wants to merge 4 commits into
Antriel:mainfrom
skhoroshavin:pixel-art
Draft

PoC pixel-art mode#2
skhoroshavin wants to merge 4 commits into
Antriel:mainfrom
skhoroshavin:pixel-art

Conversation

@skhoroshavin

Copy link
Copy Markdown

Proof of concept: when the Phaser game's pixelArt config flag is set, MSDF text switches to plain bitmap rendering - atlases upload with NEAREST filtering and the shader reads coverage straight from the texel alpha instead of the distance field. Everything in one draw call, as before.

What should work:

  • Rich text end to end: per-run colors/alpha, per-run fonts (incl. merged atlases), fontScale, kerning, wrap
  • Underline / strikethrough / highlight pills / dashed rules unchanged (they are shader-drawn rects, not texture data)
  • Hard drop shadows (offset silhouette); glyph substitution, transforms, deform, all callbacks

What is disabled (one-time console warning if someone still tries to enable them):

  • Weight, outline in all forms, soft/spread/rounded shadows, two-tone ramps - all distance-field based

What is left:

  • Update to the actual demo
  • Actual testing - there might still be edge cases, especially related to rounding or absence of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant