Add MSDF and mipmap generation project settings for the default font - #60513
Conversation
This can be used to improve Label3D and scaled Control appearance in prototypes.
|
I wonder if MSDF can be defaulted on. I forget if mimaps are also able to be used or if it was exclusive. |
Defaulting to MSDF can be problematic for lower-end devices, as it's not that cheap to render on the GPU. Generating MSDF glyphs also takes a while, so there can be stuttering during gameplay when a character is rendered for the first time. In fact, it might be a good idea to prerender the ASCII range of the default font when the MSDF setting is enabled. MSDF fonts also tend to look worse at small sizes since they don't make use of hinting during the rendering process.
Mipmaps and MSDF can be used at the same time, as explained in the class reference. It's not essential, but it tends make downscaled fonts look a bit smoother. This can be good for Label3D when the camera moves. I wouldn't enable mipmaps by default though, as it wastes memory (and mipmap generation time) if fonts are never rendered in a downscaled manner. |
There was a problem hiding this comment.
I would say, if MSDF is enabled, it should always pre-render Basic Latin and Alphabetic Presentation Forms (only a few common Latin ligatures, like ffi).
Also, it's probably better to have an extra option to enable the pre-rendering of other glyphs (for the default font it can be just three bitflags to select):
- Extended Latin (
Latin-1 Supplement,Latin Extended-Aand a few chars fromLatin Extended-B/Latin Extended Additionalblocks). - Greek and Coptic.
- Cyrillic (
CyrillicandCyrillic Supplementblocks).
|
Thanks! |
…df-mipmap Add MSDF and mipmap generation project settings for the default font
…df-mipmap Add MSDF and mipmap generation project settings for the default font
…df-mipmap Add MSDF and mipmap generation project settings for the default font
This can be used to improve Label3D and scaled Control appearance in prototypes.