Virtual Resolution sampling?

  • Posts: 5
11 months 2 weeks ago #1 by beanluv
Hello. I need some help with a shader, more specifically, one called Virtual Resolution.

(For context about my request, open the spoiler below.)
Warning: Spoiler! [ Click to expand ]

I have a (hopefully) small request. Could somebody edit the shader so its sampling is nearest neighbor?

Shader: www.dropbox.com/s/jo9nsw5wb19nghy/VirtualResolution.fx?dl=0

Please Log in or Create an account to join the conversation.

  • Posts: 20
11 months 2 weeks ago #2 by Matt Gore
Well, the shader already supports that. Just add VIRTUAL_RESOLUTION_DOWNFILTER=POINT to your PreprocessorDefinitions.
The following user(s) said Thank You: beanluv

Please Log in or Create an account to join the conversation.

  • Posts: 5
11 months 2 weeks ago #3 by beanluv

Matt Gore wrote: Well, the shader already supports that. Just add VIRTUAL_RESOLUTION_DOWNFILTER=POINT to your PreprocessorDefinitions.

Okay, so I tried adding it in through both the UI and the preset file, and nothing's really changed.
Here's what I'm trying to do:

Please Log in or Create an account to join the conversation.

  • Posts: 20
11 months 2 weeks ago #4 by Matt Gore
Well, all three images are identical and use nearest neighbor :D

So the game already scales the image the way you like, no reason to use shaders. Unless you would rather use bilinear:

Please Log in or Create an account to join the conversation.

  • Posts: 5
11 months 2 weeks ago #5 by beanluv

Matt Gore wrote: Well, all three images are identical and use nearest neighbor :D

So the game already scales the image the way you like, no reason to use shaders. Unless you would rather use bilinear:


Actually, if you look at the user display at the top for each screenshot, their positioning is somewhat different, not to mention the third one's user display is kinda blurry. :)

Please Log in or Create an account to join the conversation.

  • Posts: 20
11 months 2 weeks ago #6 by Matt Gore
Ah ok, I didn't look there. It seems to be shifted by one pixel compared to the rest and will get blurry because of the linear scaling. I don't know why the preprocessor definition isn't working but you can also just change line 8 to: #define VIRTUAL_RESOLUTION_DOWNFILTER POINT

Btw, ReShade comes with a HQ4X shader, this is probably the best method.

Please Log in or Create an account to join the conversation.

  • Posts: 5
11 months 2 weeks ago #7 by beanluv

Matt Gore wrote: Ah ok, I didn't look there. It seems to be shifted by one pixel compared to the rest and will get blurry because of the linear scaling. I don't know why the preprocessor definition isn't working but you can also just change line 8 to: #define VIRTUAL_RESOLUTION_DOWNFILTER POINT

Btw, ReShade comes with a HQ4X shader, this is probably the best method.


It didn't change anything. I did however notice that offsetting the width and height by one pixel makes the blurry pixels look normal while everything else is the opposite. I also had already changed line 8, and it didn't change anything.

As for the HQ4X shader, what settings do you recommend?

Please Log in or Create an account to join the conversation.

  • Posts: 20
11 months 2 weeks ago #8 by Matt Gore

beanluv wrote: As for the HQ4X shader, what settings do you recommend?


Sorry, I only know of its existence but don't have any games to use it x)

Please Log in or Create an account to join the conversation.

  • Posts: 5
11 months 1 week ago - 11 months 1 week ago #9 by beanluv
Alright, so I just realized as I was resizing a screenshot through Paint.NET using some sort of sampling to prevent sprite theft that the sampling used was Super Sampling. It appears to be the same exact sampling the Virtual Resolution filter is using. Perhaps that could be disabled somehow?

Please Log in or Create an account to join the conversation.