..:: PCSX2 Forums ::..

Full Version: Offset Hack(GSdx) questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I got somewhat nostalgic and turned off skipdraw hacks(or rather build a custom GSdx without those skipdraw fixes) for my games which bad scalling glitches are fixed by killing all post processing.

Obviously low res hits the eye, but still long time I didn't saw those effects, made me even more nostalgic, especially that other than that it was pretty much perfect;/.

Then I upscaled it, just to made a screenshot of obvious bug:
[attachment=29555]

And finally used offset hack to fix the scalling bug and bring 2 other bugs:
[attachment=29556]

Well the offset hack among with fixing the effect position also results in "few" bad pixels in the left, isn't such a few when the effect that "burns" there is completely unrelated to the rest of the map like a pink line from a planet on a space background;P as it seems to freeze there what it had during map load.

Reading some comments in the code:
Code:
        //This hack subtracts around half a pixel from OFX and OFY. (Cannot do this directly,
        //because DX10 and DX9 have a different pixel center.)
        //
        //The resulting shifted output aligns better with common blending / corona / blurring effects,
        //but introduces a few bad pixels on the edges.

Does it mean it can be corrected by dedicating it to just DX10?

Also second bug that is made by offset hack shadows in the ground, it looks like a frame on which shadow is drawn is moved by an offset too resulting in broken/strange shadow around normal character shadows.

Soo can this hack be customized abit to skip certain frames in similar way like skipdraw hack?

Soo that's like 2 questions, third would be - is there any place/blog/longer post I could actually read about this offset hack? Forum search widely brings only suggestions to use this...Tongue

Something unrelated get's my mind currently and whenever I look at the pcsx2/gsdx code I feel even more stupid than I really am resulting in this post with few questions instead of trying to waste a few days to find the answers on my own.

Any lecture to read that would help me understand it on my own or suggestions which part of the code could be customized resulting even in useless to community yet another custom build kept in the shadows would be nice.

Is it even possible to fix those shadows and that frozen effect line on the left/top by customizing offset hack, or it works in a way it's impossible?Tongue I kind of don't wanna spend whole day looking and fail at it;] and that's only of my ps2 games that actually is glitched in pcsx - well it works perfectly fine with skipdraw hacks, but then again, if it would be possible to restore all flashy effects and still be able to use hi res - it could be even better. :X

I mainly ask about that, couse there is already some existing custom GSdx, that most people know which doesn't have such scalling problems and result in:
[attachment=29557]
Feels perfect, but the "perfectness" effect isn't stable and at least the shadow bug reappears after transformation into other flashy char(too much hair power in this game etc.Tongue), I would simply call it's quality as "made in china". >.< Besides I don't like that plugin as they don't share it's source and don't wanna talk about it.

Anyway it does leave a feeling that offset hack could be improved a bit.
There used to be an option in the plugin where you could accommodate the post processing effects moving the X/Y pixel offset manually, however that required a lot of tweaking to get right for each game and it was dropped in favor of the current 1 click "offset hack", I suppose the custom GSdx you are using has that working with preset values for this game (if it doesnt then doing that for yet another custom version would probably work better), however trying to do the same for every game that needs offset hack is kind of insane... too many games would be needing the values and actually I think some people showed it needing different values between different graphic cards too...

There's probably going to be more work to get the scaling and post-process effects to appear in the right place in the future, but for now the "offset hack" works most of the time and is a simple click solution (and I doubt rama or anyone wants to keep improving the hack version Tongue2).
Well that explains a bit as that custom gsdx had manual x/y offset control, if that was based on older GSdx, then I guess I'll spend some time looking at old revisions. But still manual setting x/y is enough to fix broken shadows and that top/left frozen effect? Or it had preset values for this game other than manual offset hack, can't really say from chinese descriptions.

Gotta mess around it during weekend, strangely wasting time like that gives me more joy than playingTongue. Hah but why manual x/y control offset hack wasn't left inside additionally to automatic one? Everyone knows the more buttons and settings the bigger the fun;P.

I wonder, does the offset hack affect only choosen frames like skipdraw? Then both of those glitches in offset hack for this game could be fixed by excluding it in the automatic hack. Couse with all love to manual settings, basically I think it works just fine automatically as the glow effect is automatically set exactly same as while centering it manually, just along with this effect, two different ones which are already correct got messed up somehow. Maybe offset hack could get some presets like skipdraw hack currently too in not soo very distant future? Or maybe too many workaround leftovers from the past already and the time is for bigger stuff like last few bigger commits^_^. *Trying to read Shadow Lady's mind to check future pcsx2 updates* ;X heheh "right place in the future" nearly always means after you test it, who knows...Tongue

Anyway thanks, guess you motivated me making everything sound soo simple.


Edit:
I think I found out how it's made in chinese GSdx, it has nothing to do with manual offset hack. Simply skipdraw can be used to kill those bugs which happens with offset hack while LEAVING all correct postprocessing effects Ohmy

This is what I got by turning off current skipdraw fix(only modification), using offset hack and using skipdraw to fix those bugs from offset hack:
[attachment=29574]

It also gets like 1-2 pixels at the left/top wrong like in that chinese build, but I guess that's how offset hack should normally be seen without that blurry effect^_^. Gonna mess with it more and see if I can completely fix also shadows, as they seem to reappear buggy at times. Anyway it's cool to play again with all that shining, glowing and other eyecandy stuff. <3

I somewhat still wonder if changing offset hack to apply just to those effects which are actually scalled bad is possibleTongue and then I'll probably wonder if it can be "fixed" soo those few pixels at the top and left wouldn't corrupt(or whatever happens with them) at all.

Anyway it's cool enough it's possible to gain same effect without much messing around with latest official GSdx. :3
Sorry for ruining this thread with unrelated questions, but with that pixel offset, what kind of generic values could you use? When running at 4x sample, what kind of offset should I try?
I posted my patch for custom offset hack here. Through it can still be a bit off in higher internal res. Possibly it can look a bit different on different hardwareTongue.
x4 would be modx = 4.3f; mody = 4.3f;

Edit: oh and if somebody care adding FBP == 0x03980 to this custom offset hack of mine will made the patch working also for BT1, althrough I found that only for PAL and I'm not really sure if it's same for NTSC as of yet.
Hello, I'm having graphic problems with one of my games, I tried to pm you but you've reached your pm quota. Any help would be greatly appreciated.
Thank you
The most recent post in this thread is more than 8 months old. Please create a new thread and refrain from posting in threads older than 8 months in the future. Please also review the forum rules. Thank you.