Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Cutoff text when trying to render pixel art text.

Author
Message
captainpicard
2
Years of Service
User Offline
Joined: 19th Feb 2022
Location:
Posted: 19th Feb 2022 13:37
I am creating a retro style game (resolution of 320x240). I have set it up for pixel perfect rendering where I turned off AA, turned of image mag/min filtering (set to zero), turned off the font image filtering as well, etc. I am rendering to
a fullscreen quad which has a shader applied so I can have a CRT screen effect. The example screenshot has the CRT shader turned off so you can see the problem better. I am also including my graphics init code and my text creation
code. The result is text that does not look correct. Parts of each letter are missing or some parts are thicker. How do I draw pixel art style text? I included an attached screenshot of the problem. I could just put my text on a image that I load but I need to be able to dynamically change the text... I have verified that my bitmap font is not blurry.

Code to setup my graphics:


Code where I create the text:

Attachments

Login to view attachments
captainpicard
2
Years of Service
User Offline
Joined: 19th Feb 2022
Location:
Posted: 19th Feb 2022 15:38
Forgot to mention, the text in question is in the bottom right where the button is. The title is a sprite
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 19th Feb 2022 16:22 Edited at: 19th Feb 2022 16:23
Quote: " bottom right"

that's bottom left in my neck of the woods

meanwhile, probably not the issue but it reminded me of this SetDefaultWrapU/V issue in HTML.

ie, try setting the image Min/Mag filters manually and individually via SetImageMin/MagFilter() vs relying on Default?

it's worth a shot.
captainpicard
2
Years of Service
User Offline
Joined: 19th Feb 2022
Location:
Posted: 19th Feb 2022 20:53 Edited at: 19th Feb 2022 21:26
Quote: "
ie, try setting the image Min/Mag filters manually and individually via SetImageMin/MagFilter() vs relying on Default?

it's worth a shot.
"

No luck. Thanks for the advice.

EDIT: forgot to mention that the way the text looks changes when I resize the window. The button sprite does this as well.

Login to post a reply

Server time is: 2024-04-19 01:55:37
Your offset time is: 2024-04-19 01:55:37