Skip to content

fix(element): keep msdfPS chunk version at 2.20#8992

Merged
willeastcott merged 2 commits into
mainfrom
fix/msdf-chunk-version-2.20
Jun 30, 2026
Merged

fix(element): keep msdfPS chunk version at 2.20#8992
willeastcott merged 2 commits into
mainfrom
fix/msdf-chunk-version-2.20

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

Follow-up to #8990.

#8990 re-added the font_pxrange uniform and bumped the msdfPS chunk version to 2.21. That bump isn't needed: the change is additive, so it doesn't break existing overrides.

  • A 2.20-era override (uses fwidth(sigDist), never declares font_pxrange) just ignores the extra setParameter — PlayCanvas drops parameters with no matching uniform — and keeps working.
  • The overrides that do break are pre-2.20 ones that read the removed font_textureWidth, and those are already flagged by the existing '2.20' marker (their apiVersion < 2.20).

So '2.20' already catches every override that actually breaks; '2.21' would only emit a spurious "please update" warning to 2.20-era authors whose chunks are fine. 2.20 is the last breaking change to the chunk.

This also keeps msdfPS consistent between main and release-2.20 (the #8990 backport deliberately kept '2.20'). Shader/text-element changes from #8990 are unaffected — only this one bookkeeping line changes.

#8990 re-added the font_pxrange uniform and bumped msdfPS to 2.21, but that
change is additive: a 2.20-era override that doesn't read font_pxrange just
ignores the extra uniform and keeps working. The only overrides that break
are pre-2.20 ones (they read the removed font_textureWidth), and those are
already flagged by the existing 2.20 marker. 2.20 stays the last breaking
change to the chunk, and this keeps main and release-2.20 consistent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Build size report

This PR does not change the size of the minified bundles.

Bundle Minified Gzip Brotli
playcanvas.min.js 2270.0 KB — 584.3 KB — 453.7 KB —
playcanvas.min.mjs 2267.4 KB — 583.4 KB — 453.6 KB —

@willeastcott willeastcott merged commit 0396347 into main Jun 30, 2026
10 checks passed
@willeastcott willeastcott deleted the fix/msdf-chunk-version-2.20 branch June 30, 2026 14:05
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