Jump to content

Best typography with WebGL renderer


nuthinking
 Share

Recommended Posts

I am trying to figure out the limitations in text rendering of Pixi (or WebGL). Because I am working on a project for Smart TV, the text needs to be as crispier as possible, but I would really do with 60fps.

I opened an issue on GitHub and discovered some strange behaviours when caching to bitmap and even comparing vanilla canvas with pixi canvas rendering: https://github.com/pixijs/pixi.js/issues/2393

I get that I can't expect in WebGL the same quality of DOM rendering but I still have hope that I could get closer.

Is there some good examples, maybe retina friendly, that I could review?

 

Thanks a lot for any help!

Link to comment
Share on other sites

@mattstyles yes I have a very animated and typographic UI to build and if I use the DOM I probably get around 20fps on the device (which unfortunately is not a PC). I think I need to find a compromise. Would be very happy with 40fps and a bit less crispiness. I tried with canvas elements and the performance doesn't get much better. I believe with an unchanged design the only two options left are Pixi 3d or a single big 2d vanilla canvas (if pixi can't match its rendering with a canvas renderer).

Link to comment
Share on other sites

Nothing special really. Just detect device resolution, take pixel ratio into account and resize Pixi.text accordingly. Dont forget to round font size and position coordinates for better results... 

If there is more you would like to know about it, I'll be happy to answer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...