Skip to content

textRenderingMsdf is broken #555

Closed
Closed

Description

@greggman

https://webgpu.github.io/webgpu-samples/?sample=textRenderingMsdf gets the following error

GPUPipelineError: fine derivative builtins (dpdxFine, dpdyFine, fwidthFine) can not be used in compatibility mode in stage (Fragment), entry point "fragmentMain"

What's the proper fix?

  1. make it require core
  2. use dpdx, dpdy, and fwidth instead of the fine versions
  3. choose fine versions on core and non-fine on compat
  4. ???

Activity

  1. kainino0x commented on Jan 26, 2026

    @kainino0x
    Collaborator
    • use dpdx, dpdy, and fwidth instead of the fine versions

    I would do this one as long as coarse derivatives work OK for the sample. We can test by switching to the Coarse versions and running it on some devices that has actually-coarse derivatives. Offhand, the only place I know this is supposed to be true is D3D, see gpuweb/gpuweb#4325.

  2. toji commented on Jan 26, 2026

    @toji
    Contributor

    For what it's worth the original sample didn't include the derivatives at all, they were introduced in #405 by @rconde01 to improve the aliasing of the text. Their implementation references Chlumsky/msdfgen#22 (comment) as the source of the AA algorithm. It did make a very noticeable difference in text clarity, so we want to keep it as much as possible.

    It's not clear to me from reading that thread how impactful using the coarse derivatives would be, so we'll just have to give it a try as Kai mentioned.

  3. toji commented on Jan 27, 2026

    @toji
    Contributor

    This should be resolved now with Gregg's fix in #556

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions