From 144a7a13fb97cad66e6a3e123e920718c05e172f Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Wed, 7 Mar 2012 09:31:10 +0000 Subject: [PATCH] GSdx: Better DX9 implementation of the Wild Arms Hack. Thanks, KrossX :p git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5122 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSSettingsDlg.cpp | 2 +- plugins/GSdx/res/tfx.fx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index 1cd4769907..bd035c0f8a 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -263,7 +263,7 @@ void GSSettingsDlg::UpdateControls() // Hacks EnableWindow(GetDlgItem(m_hWnd, IDC_HACKS_ENABLED), hw); - //EnableWindow(GetDlgItem(m_hWnd, IDC_HACKSBUTTON), hw && IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED) == BST_CHECKED); + EnableWindow(GetDlgItem(m_hWnd, IDC_HACKSBUTTON), hw /*&& IsDlgButtonChecked(m_hWnd, IDC_HACKS_ENABLED) == BST_CHECKED*/); } } diff --git a/plugins/GSdx/res/tfx.fx b/plugins/GSdx/res/tfx.fx index 8ac4741bba..f75732f53d 100644 --- a/plugins/GSdx/res/tfx.fx +++ b/plugins/GSdx/res/tfx.fx @@ -775,13 +775,13 @@ VS_OUTPUT vs_main(VS_INPUT input) if(VS_FST) { #if VS_WILDHACK == 1 - output.t.x = (input.t.x >= 16.0 ? input.t.x - 16.0 : input.t.x) * TextureScale.x; - output.t.y = (input.t.y >= 16.0 ? input.t.y - 16.0 : input.t.y) * TextureScale.y; + output.t.x = (frac(floor(input.t.x / 16.0)/2.0) > 0.4 ? input.t.x - 16.0 : input.t.x) * TextureScale.x; + output.t.y = (frac(floor(input.t.y / 16.0)/2.0) > 0.4 ? input.t.y - 16.0 : input.t.y) * TextureScale.y; #elif VS_WILDHACK == 2 - output.t.x = (input.t.x >= 8.0 ? input.t.x - 8.0 : input.t.x) * TextureScale.x; - output.t.y = (input.t.y >= 8.0 ? input.t.y - 8.0 : input.t.y) * TextureScale.y; + output.t.x = (frac(floor(input.t.x / 8.0)/2.0) > 0.4 ? input.t.x - 8.0 : input.t.x) * TextureScale.x; + output.t.y = (frac(floor(input.t.y / 8.0)/2.0) > 0.4 ? input.t.y - 8.0 : input.t.y) * TextureScale.y; #else - output.t.xy = input.t * TextureScale; + output.t.xy = input.t * TextureScale; #endif output.t.w = 1.0f; }