Anti-aliasing options for text object?

  • Ashley

    I've opted to use text objects instead of spritefonts for a number of reasons, but primarily for translations.

    Problem is my game's resolution is 640x360 (large pixel art) and unless I set 'fullscreen quality' to high -- which has undesirable effects for the rest of my art amd drastically increases VRAM -- the text ends up being quite blurry at runtime.

    That said, would it be possible to get some anti-aliasing options for text, maybe even an option to disable it entirely so that it is less blurry at smaller sizes / lower resolutions? An option to resample only the text as if 'fullscreen quality' was set to high could work too, if that's possible.

    I can post to the suggestions platform if so, but I wanted to inquire / discuss possible solutions beforehand.

  • As far as I'm aware, browsers do not provide any control over this when rendering text to a canvas, I'm afraid.

    BTW changing the fullscreen quality should not have any major impact on GPU memory usage. It doesn't change which textures are loaded. It uses exactly the same memory resources, it just renders them at a different scale.

  • Ashley Thank you for the quick response. I just edited the original post with one other suggestion (resampling only the text as if 'fullscreen quality' was set to high). Is that within the realm of possibility?

    As for the gpu memory, I'll have to look at my debugger again but I recall the memory usage skyrocketing when 'fullscreen quality' was set to high and I maximized the window. I mean, it's not an unacceptable amount due to me using pixel art, but it was certainly higher than with it set to low.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • We don't have a way to render different layers at different resolutions right now. It could be a pretty tricky thing to do as well - currently it just renders the entire game to a small surface and then stretches it up. but if one layer is rendered at a different resolution, how is that supposed to alpha blend or process background effects with a different sized background surface? Other low-res layers on top presumably have to be rendered separately again and then stretched back over the top, all of which takes more GPU bandwidth, and then you'll probably quickly negate any performance benefits of low-quality fullscreen mode - or possibly end up even slower than high-quality fullscreen mode if there's lots of extra surface compositing that needs to be done to handle all of these cases. It's a difficult problem and I'm not clear what a good way to solve it would be. Really we just need a way to draw aliased text to a canvas! But that means requesting a new browser feature. Maybe you could try experimenting with the alpha clamp effect to cut off the low-alpha borders of the text.

    The GPU memory measurement includes the surface it is rendering to, which gets bigger when you maximize the window or use high-quality fullscreen mode. So if it increases a bit when changing those things, that's all it is.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)