Skip to content
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

GS: Support upscaled region repeat #5853

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TellowKrinkle
Copy link
Member

Description of Changes

  • Add support for upscaling region repeat
  • Adjust region clamp coordinates for upscaling

Rationale behind Changes

More upscaling is nice

Suggested Testing Steps

  • Make sure my changes to region clamp didn't make things worse. I don't think they would, but who knows
  • Test DX and GL (I only tested Metal and Vk)
  • Test upscaled region repeat. If you don't know of a game to test, comment out GSRendererHW:1373-1378 and GSRendererHW:1387-1391 and run this trace

@refractionpcsx2
Copy link
Member

Apparently this makes #5851 worse? I assume it was meant to address that.

@TellowKrinkle
Copy link
Member Author

If it's the last commit causing it, I mostly wanted to see what that did affect, and had no specific games in mind when I changed it

It makes it more in line with what our hw sampler would do to a similar upscale, which is nice as I don't have to worry about side effects of swapping between the two.

The change is to how clamping is handled. The PS2 clamps with min and max values, rather than min and max+1. This means that if you upscale a 4x4 texture to 16x16, the equivalent max value goes from 3 to 12, rather than 3 to 15. Obviously if you use a hw sampler, clamping goes to the edge of the texture, which will of course be 15. #5851 being affected by both this and #5387 makes sense though, since #5387 is what enabled clamping with the hw sampler when available, which this adjustment is attempting to match in the sw sampler.

@seta-san
Copy link
Contributor

can we please rebase this? there are a couple games I'd like to test it with.

@Uzarkis
Copy link

Uzarkis commented Oct 25, 2023

@TellowKrinkle - Will you make new updates to this? Or will you close this request? Do you need any more tests from us?

@TellowKrinkle
Copy link
Member Author

It reveals a whole bunch more upscaling issues in games, so it's waiting on some improved upscale hacks which I keep not getting around to working on

@TellowKrinkle TellowKrinkle marked this pull request as draft October 25, 2023 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants