Blurry pixels

BlitzMax Forums/BlitzMax Beginners Area/Blurry pixels

darkhog(Posted 2015) [#1]
I am working on "oldschool" shmup, which implies, among the other things, low resolution. I've chosen 640x480 (briefly considered 320x240, but decided against it as I wouldn't be able to put as much detail into sprites as I want to without making it obscenely big), but on the screen I'm using (actually a TV connected via HDMI since my ASUS died and can't afford new one) after going fullscreen (Graphics 640,480,32) pixels are blurry.

Is there any way to fix it?

//edit: Found about SetVirtualResolution that kinda solves my issue when using native resolution, however it just stretches it without proper letterboxing if aspect ratio of actual and virtual resolutions are different, which just look ugly.


xlsior(Posted 2015) [#2]
All LCD screens will look a bit blurry when you run them on a non-native resolution -- they have to, since there is a finite number of pixels of a fixed size. Non-native drawing leads to blending/smoothing, and blurry graphics.

(On some TV's you can switch 'modes', and setting a particular input to PC instead of TV may turn of some of the built-in enhancements that tend to make PC signals worse)

Two other things:

- Use integers for your image positioning, if you use floats to position them then you'll it will try to blend the edges of the images when drawing them to those locations

- By default images apply the MASKEDIMAGE | FILTEREDIMAGE flags, which will also cause some smoothing. If you want crisp edges, specify a different flag in the LoadImage statement.


darkhog(Posted 2015) [#3]

- By default images apply the MASKEDIMAGE | FILTEREDIMAGE flags, which will also cause some smoothing. If you want crisp edges, specify a different flag in the LoadImage statement.


Thanks, that was it!


coffeedotbean(Posted 2015) [#4]
best to use a virtual resolution, have the game render at the native resolution but scale up the graphics so it looks like you're playing a 320z240 game but actual resolution is 1080p, there are a number of posts on here but this works a treat and does letter boxes and aspect corrections http://www.blitzbasic.com/codearcs/codearcs.php?code=2879