-
Notifications
You must be signed in to change notification settings - Fork 46
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
Find cross-platform MSDF workaround #176
Comments
Get your shader stuff together, Yoyo >:( |
I belieeeeve I've found a solution for this, but YYG are apparently upgrading to Metal at some point in the future so I'll hold off on making Mac-related changes until the dust settles there. |
Bumped up the priority queue as this impacts more platforms than I was initially aware of. |
Sounds great, I'm looking forward to be able to use Scribble with MSDF Fonts in my project, as this solves some annoying issues I have with scaling and the standard text rendering. |
Fix open for testing in 7.1.2pre002 |
So I have been testing with the new version, and I have done all the previous mentioned test both on Android and iOS, and so far everything looks good just as on Windows, so absolutely perfect 👍 Thank you so much for looking in to this issue so fast Juju, very much appreciated :) A question regarding performance, I would love to use this in an app both for Android and iOS, and my question is regarding lower end devices mostly on Android, how is the MSDF font performance there, or is there not a difference to the "normal" way of drawing fonts? |
There's marginally more work being done for MSDF fonts, but they're basically the same speed as a standard font rendered through Scribble. As for performance versus GM's native text drawing? I've not tested it recently. I'd imagine Scribble is slower for simple strings, but simple strings don't have all the fun bits that make Scribble useful! |
Sounds good, I must admit I have not looked too deep in to Scribble, I just saw there where some shaders and thought of some lower end devices not being too happy about them, but I guess these are used to render the font initially and not draw the font in the end? |
Bulk of the shader burden is in the vertex shader so that's orders of magnitude less stressful than heavy fragment shaders. The work that's being done in there is for all the effects (rainbow, wave, typewriter easing etc.). MSDF fonts, like standard fonts, only require a single texture sample so memory bandwidth is rarely a problem. GM dynamically builds vertex buffers every frame for every piece of text you render, but Scribble caches vertex buffers. This vertex buffer caching offsets the extra cost of running a custom shader. |
Sounds great, thank you for the explanation, I'm looking very much forward to working with Scribble :) |
Implemented in v7.1.2 |
Mac unfortunately doesn't like the standard derivatives extension (at least not on our version of GLSL) so I need to find a workaround. Hopefully YYG provide us with a way to force the GLSL version + add extensions soon <_<
The text was updated successfully, but these errors were encountered: