Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MSAA border and pixel/texel offsets
#1
Running GSdx in DX11 Hardware and applying 4x MSAA to MGS2 gives me a 1px border of whitish noise along the left and top of the screen. This is a pretty common problem when forcing games to use MSAA when they don't support it. (Like Dishonored, for example.)

This guy talks about fixing it by doing the following:
Quote:How do you fix this? Turns out, it’s simple. When drawing a full-screen quad, instead of adding a half-texel to the uv coordinates, you should instead SUBTRACT a half-pixel from the position (not the uv coordinates). This shifts the quad so that it lies perfectly within the grid in the diagram, so that every MSAA sample hits the geometry. As an added bonus, it means that the UV samples that you get will already be in the texel centers; no more adding a half-texel required!

Note, that when I say “subtract a half-pixel from position,” what I mean is “move the position of the quad one half-pixel towards the upper-left. To do this, you actually add (-1/width, +1/height). The reason for the signs (-, +) is that you’re moving left and up. In post-projection space, -x is left, and +y is up. The reason that it’s 1/width instead of 0.5/width is because, in clip space, the coordinates range from -1 to 1 (width 2), and not from 0 to 1 (width 1) like they do in textures, so you need to double the movement to account for that.

Is it possible to apply this fix to GSdx? Or is this an entirely separate problem?

I've tried messing with the offsets in the hardware hacks options with no success. (Though I did find that with upscaling or forced MSAA in MGS2, I needed to apply a texture coordinate offset of 1000 on both X and Y to correct for misaligned HUD elements.)
Reply

Sponsored links

#2
Actually on further investigation MSAA causes a bunch of rendering problems in this game. So nevermind, I guess.
Reply
#3
(10-10-2014, 06:32 AM)Aleksandr Wrote: Running GSdx in DX11 Hardware and applying 4x MSAA to MGS2 gives me a 1px border of whitish noise along the left and top of the screen. This is a pretty common problem when forcing games to use MSAA when they don't support it. (Like Dishonored, for example.)

This guy talks about fixing it by doing the following:

Is it possible to apply this fix to GSdx? Or is this an entirely separate problem?

I've tried messing with the offsets in the hardware hacks options with no success. (Though I did find that with upscaling or forced MSAA in MGS2, I needed to apply a texture coordinate offset of 1000 on both X and Y to correct for misaligned HUD elements.)


Asmodean added a work/around fix for this issue with MSAA with in his latest Shader update, i dont think he added it the latest git build yet though. Also MSAA is know to cause graphic issue in games along with those lines you seeing on edge. it why for most part FXAA is recommend, not everyone likes FXAA do to it does at blurring even if Asmodean verison of FXAA seem to be one of the few FXAA i seen to very little blurring

http://forums.pcsx2.net/Thread-Custom-Sh...#pid383736
Reply
#4
Thanks for the link, the black border effect in Asmodean's shader should help fix the MSAA problem.
Reply




Users browsing this thread: 1 Guest(s)