[Solved][Dev] Question about GUI edit (Text descriptions for hacks)
#21
Just curious,is it possible to make the hacks to work in a different way(using different code)depending on what game is running.
That way Ryudo can add his change and the hack will work that way only when ToA is running
Reply

Sponsored links

#22
There is, using the crc management system baked in to gsdx already
[Image: ref-sig-anim.gif]

Reply
#23
(07-19-2015, 01:01 PM)Ryudo Wrote: Old:
Code:
ox2 *= rt->OffsetHack_modx;
oy2 *= rt->OffsetHack_mody;

New:
Code:
ox2 *= rtsize.x / 1024.0f * 1.8f;
oy2 *= rtsize.y / 816.2f * 1.8f;


The new code is aimed for ToA. It might work for other games, but I doubt it. You're welcome to try it though. http://forums.pcsx2.net/Thread-tota-s-gh...#pid444255 (Version of may 5th can be downloaded there. Still gotta update it with the latest GSdx)

Is it the only modification?

Maybe the hack can be done in a different way. Current hack change the vertex offset but I think that rounding texture coordinate will yield better result. It can be done easily on the vertex shader so it won't impact perf. I need to do some tests on GoW2.
Reply
#24
Code:
Index: plugins/GSdx/GSRendererDX.cpp
===================================================================
--- plugins/GSdx/GSRendererDX.cpp    (revision 5323)
+++ plugins/GSdx/GSRendererDX.cpp    (working copy)
@@ -198,11 +198,10 @@
    if(rt->LikelyOffset)
    {
        // DX9 has pixelcenter set to 0.0, so give it some value here
+        if(m_pixelcenter.x == 0 && m_pixelcenter.y == 0) { ox2 = -0.0003f; oy2 = -0.0003f; }

-        if(m_pixelcenter.x == 0 && m_pixelcenter.y == 0) { ox2 = -0.0003f; oy2 = -0.0003f; }
-        
-        ox2 *= rt->OffsetHack_modx;
-        oy2 *= rt->OffsetHack_mody;
+        ox2 *= rtsize.x / 1024.0f * 1.8f;
+        oy2 *= rtsize.y / 816.2f * 1.8f;
    }

    vs_cb.VertexScale  = GSVector4(sx, -sy, ldexpf(1, -32), 0.0f);
Index: plugins/GSdx/GSRendererHW.cpp
===================================================================
--- plugins/GSdx/GSRendererHW.cpp    (revision 5323)
+++ plugins/GSdx/GSRendererHW.cpp    (working copy)
@@ -920,5 +920,6 @@

    uint32 FBP = m_context->FRAME.Block();

-    return FBP != 0x036e0 && FBP != 0x03560 && FBP != 0x038e0;
+    //return FBP != 0x036e0 && FBP != 0x03560 && FBP != 0x038e0;
+    return FBP != 0x03560 && FBP != 0x038e0;
}
AMD Ryzen 5 3600 @ 3.60~4.20 GHz | Corsair Vengeance LPX 32 GB (2x16GB) DDR4-3200
MSI GeForce GTX 1660 Super @ 6 GB | Samsung 980 1TB | Windows 10 Pro x64 (22H2)
Reply
#25

(07-19-2015, 11:27 AM)Ryudo Wrote: In the case of this hack it is. It's completely made for ToA and no other game lol. (already tested it out on other games with ghost issues)

It's basically a completely separate custom GSdx just for ToA. That's why I wanted to label the hack that way too, rather than something general.

it has uses for other games too so changing it name problem not best of ideas
Reply
#26
(07-20-2015, 08:48 PM)tsunami2311 Wrote:

it has uses for other games too so changing it name problem not best of ideas

Again, don't mistake it for the normal Halfpixel offset hack.

This was specifically done for ToA. So unless someone actually tests the plugin (http://forums.pcsx2.net/Thread-tota-s-gh...#pid444255) with GoW2 you can't claim it works for that game.
AMD Ryzen 5 3600 @ 3.60~4.20 GHz | Corsair Vengeance LPX 32 GB (2x16GB) DDR4-3200
MSI GeForce GTX 1660 Super @ 6 GB | Samsung 980 1TB | Windows 10 Pro x64 (22H2)
Reply
#27
(07-21-2015, 01:30 AM)Ryudo Wrote: Again, don't mistake it for the normal Halfpixel offset hack.

This was specifically done for ToA. So unless someone actually tests the plugin (http://forums.pcsx2.net/Thread-tota-s-gh...#pid444255) with GoW2 you can't claim it works for that game.

Ofc, GoW2 would only be a testcase to validate that the new method can still help with ghosting. And then later check that it can help others games like ToA. Maybe it will work, maybe not.

Anyway, it is low priority for me as I need to finish the correct blending emulation first.
Reply
#28
Yeah exactly. I'd test it myself, but I don't have GoW2, so I can't help there.

For now it won't harm anyone with the current method, since it's a completely separate stand-alone plugin download that's customized for ToA only.
AMD Ryzen 5 3600 @ 3.60~4.20 GHz | Corsair Vengeance LPX 32 GB (2x16GB) DDR4-3200
MSI GeForce GTX 1660 Super @ 6 GB | Samsung 980 1TB | Windows 10 Pro x64 (22H2)
Reply
#29
(07-21-2015, 01:30 AM)Ryudo Wrote: So unless someone actually tests the plugin (http://forums.pcsx2.net/Thread-tota-s-gh...#pid444255) with GoW2 you can't claim it works for that game.
Ok then,I did test the game(latest beta of pcsx2 and your gsdx version(avx2)and the ghost disappear when I enable the option


Attached Files Thumbnail(s)
       
Reply
#30
I think I was not clear, sorry. What I mean,

Current half offset hack, move the positions of the screen by one pixels for every effects. It works only for effect that has an half pixels offset.

Ryudo updates the value of the current hack. However I think it isn't the best solutions. I suspect that ToA is in case 3 below.

I want to test another really new method, truncates the texture coordinates.
1/ If the offset is 0, it will 0 (-0.5 with current hack) (it explains extra border issues)
2/ If the offset is 0.5, it will become 0 like the current hack
3/ If the offset is 0.9375 it will become 0 instead of 0.4375 for current hack.
Reply




Users browsing this thread: 1 Guest(s)