-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Advanced Settings" option for rounding texture coordinates from an upscaled internal resolution #2946
base: master
Are you sure you want to change the base?
Conversation
…an upscaled native resolution As per the title; normal DuckStation behavior is to floor the texture coordinates only when the native resolution is upscaled, instead of rounding them as done when the native resolution is unchanged (due to very blatant errors in some games). This adds a setting to force texture coordinates to be rounded even when the game is upscaled, as this provides a more accurate (relative to what the game looks like in its original resolution) behavior in certain games, such as the Crash Bandicoot series.
Yeah, that's why I never did myself.. my concern would be that it breaks more than it fixes. I suppose you could try limiting it to 3D polygons (either by ignoring it for sprites, or using the Z from PGXP). |
so after some investigation, the glitch that occurs in crash 1's title screen when enabling this option can probably be fixed that title screen is made up by |
Right, that's why I said "ignoring it for sprites" ;) |
well this is certainly how you can tell I'm less experienced in this subject matter lol |
f4c48a2
to
0ef2439
Compare
dbbf234
to
e3d9ba4
Compare
5bb1e94
to
f993f09
Compare
8fb8259
to
5ef2ba0
Compare
1f89203
to
084a76a
Compare
2005150
to
8867bb1
Compare
b26a4d7
to
7ea7d3b
Compare
349fcfa
to
6d3f01c
Compare
0cb0e34
to
55d96f8
Compare
The problem
In order to prevent issues with displaying textures in games with upscaled internal resolutions, DuckStation floors all texture coordinates whenever vertex offset values are multiplied according to the internal resolution upscaling option. To my understanding, at least.
Flooring the texture coordinates doesn't work best for certain games, however. The Crash Bandicoot series of platformers shows jagged edges on the textures of crates whenever the game is upscaled, which is a pretty noticeable error throughout the entire games. For these games, rounding the texture coordinates instead of flooring them provides more "accurate" behavior, in regards to looking the closest to what the game looks like with its internal resolution unchanged.
These are screenshots I took of the games Crash Bandicoot, Crash Bandicoot 2: Cortex Strikes Back, and Crash Bandicoot: WARPED. Beyond the settings mentioned in each screenshot, I also enabled the "True Color" option to disable dithering.
1x Internal Resolution
4x Internal Resolution (texture coordinates are floored, normal DuckStation behavior)
4x Internal Resolution (texture coordinates are rounded, modified DuckStation behavior)
What this commit does
This commit adds an option to force texture coordinates to always be rounded even when the internal resolution of the game is upscaled, found in the "Advanced Settings" category. While it would seem like a no-brainer to force this setting to be enabled for the games that look better with it, such as Crash Bandicoot...
It isn't actually perfect. Errors like these can be fixed simply by enabling PGXP, but, of course, that only benefits the people that wish to play with PGXP on. For such users, however, this option would be a no-brainer to enable.
P.S. the above screenshots were all with PGXP off, the game only looks bad right about there
Thanks to @ManDude for tipping me off on this problem and its (band-aid) solution.