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 / One Pixel Lines and Virtual resolution Issue.

Author
Message
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 8th Nov 2020 21:26
I have seen this mentioned a number of times both on this board and over on the Steam forums. When SetWindowSize differs from SetVirtualResolution, some single pixel lines either disappear, or appear wider than one pixel. This is especially noticeable when rendering grids. Is there any work around for this?

smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 10th Nov 2020 04:02
Change virtual resolution to window size

Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 10th Nov 2020 14:06
smerf wrote: "Change virtual resolution to window size"


Thank you for taking the time to reply.

Assigning SetVirtualResolution() and SetWindowSize() to the same resolution does indeed fix the issue, however, doesn't that defeat the purpose of SetVirtualResolution()?
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 10th Nov 2020 16:11
You don't even have to use virtual resolution it can cause problems and it's kind of complicated in certain cases. You can choose to just use resolution. virtual resolution is just supposed to be a little bit more convenient and easy. Because u don't have to use percentage scaling like u do nomally. Just remember a virtual resolution is exactly that virtual. So if u set a 200 px wide window to a virtual size of 100 u will be trying to stretch a pixel into two pixels or vise versa u will loose lines. Setting actual res to window size is a 1 to 1 pixel ratio pixel perfect result.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 13th Nov 2020 04:44
If you insist on using virtual resolution, make sure to turn off mip mapping, which tends to muddy up images/textures/others and cause artifacts when scaling or offsetting them on screen. Especially for static, non-moving/scalable images, which renders MIPs pointless.
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 13th Nov 2020 13:15
JLMoondog wrote: "If you insist on using virtual resolution, make sure to turn off mip mapping, which tends to muddy up images/textures/others and cause artifacts when scaling or offsetting them on screen. Especially for static, non-moving/scalable images, which renders MIPs pointless."


Isn't mipmapping off by default? https://www.appgamekit.com/documentation/Reference/Core/SetGenerateMipmaps.htm
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 16th Nov 2020 03:11
Sorry, I meant set the min/mag filter. Which is similar to mipmapping, but instead of setting up a LOD in half steps, it will blend pixels together if they occupy the same screen pixel space. I always turn filtering off, especially when using retro low rez style graphics, as the filter tends to muddy and blur everything together, loosing the implied detail you get from good pixel art.

Login to post a reply

Server time is: 2024-04-19 11:58:33
Your offset time is: 2024-04-19 11:58:33