-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad rendering method in the OpenGLES based demo. #45
Comments
Thank you for your report, I will look at it. Do you have the comparison results of method 1 and 2 ? |
No. But I think you may have a look at this SO post. I should say it is common sense to reduce drawcalls. |
at this time,
solutions:
this is a sample of msdf texture font, fast and scalable!
latest subpixel font texture rendering with GLES2 (PREVIEW) gives a very cripes look! pic 3: Tahoma, 8 pt, (1) No AutoFit , (2) with AutoFit, pic 4: render with OpenGLES2, Text is rendering with PixelFarm's MiniAgg+ the Typography. |
Yes. That should be avoided. MSDF is a good way to render glyphs on any platforms. But personally, I prefer 3D-graphics-only method to render glyphs. Because pixels in a mobile screen are so small that anti-aliasing is no longer needed and it's quite easy to implement (just fill the line-segments and bezier curves). We may possibly find some way to improve the rendered result by adjusting it in the vertex or pixel shader in the future for desktop platforms. My opinion may not be right. It's just my personal preference to try something new. 😄 |
Now, I'm tackling this with VBO. |
From this, we can see each
GlyphRun
uses a drawcall and it harms performance badly when rendering a string containing many characters.I think we should apply the offset when we fill the vertex buffer. I mean, bake the offset into vertex instead of offset every glyph in vertex shader,
just like what I have done before in my original OpenGLES demo.Update:
No, my soultion is incorrect partially. The mesh should only be moved after it is built. Otherwise we can not re-use the old mesh when the position of text is changed but its content and style remains the same. But I think the offset of each glyph should be applied to built vertices.
@prepare's note:
The text was updated successfully, but these errors were encountered: