mirror of https://github.com/PCSX2/pcsx2.git
GSdx:
Committing a hack KrossX prepared (thanks) ;) It can be used to fix bad character sprites in Gust games. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5101 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
78c1667a9c
commit
7e435329ca
|
@ -173,6 +173,7 @@ public:
|
|||
uint32 ltf:1;
|
||||
uint32 colclip:2;
|
||||
uint32 date:2;
|
||||
uint32 spritehack;
|
||||
};
|
||||
|
||||
uint32 key;
|
||||
|
|
|
@ -280,8 +280,9 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
|
|||
ps_sel.aem = env.TEXA.AEM;
|
||||
ps_sel.tfx = context->TEX0.TFX;
|
||||
ps_sel.tcc = context->TEX0.TCC;
|
||||
ps_sel.ltf = m_filter == 2 ? m_vt.IsLinear() : m_filter;
|
||||
ps_sel.ltf = m_filter == 2 ? m_vt.IsLinear() : m_filter;
|
||||
ps_sel.rt = tex->m_target;
|
||||
ps_sel.spritehack = tex->m_spritehack_t;
|
||||
|
||||
int w = tex->m_texture->GetWidth();
|
||||
int h = tex->m_texture->GetHeight();
|
||||
|
|
|
@ -109,6 +109,7 @@ void GSSettingsDlg::OnInit()
|
|||
// Hacks
|
||||
CheckDlgButton(m_hWnd, IDC_ALPHAHACK, theApp.GetConfig("UserHacks_AlphaHack", 0));
|
||||
CheckDlgButton(m_hWnd, IDC_OFFSETHACK, theApp.GetConfig("UserHacks_HalfPixelOffset", 0));
|
||||
CheckDlgButton(m_hWnd, IDC_SPRITEHACK, theApp.GetConfig("UserHacks_SpriteHack", 0));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETRANGE, 0, MAKELPARAM(1000, 0));
|
||||
SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("UserHacks_SkipDraw", 0), 0));
|
||||
|
||||
|
@ -275,6 +276,7 @@ bool GSSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
|||
// Hacks
|
||||
theApp.SetConfig("UserHacks_AlphaHack", (int)IsDlgButtonChecked(m_hWnd, IDC_ALPHAHACK));
|
||||
theApp.SetConfig("UserHacks_HalfPixelOffset", (int)IsDlgButtonChecked(m_hWnd, IDC_OFFSETHACK));
|
||||
theApp.SetConfig("UserHacks_SpriteHack", (int)IsDlgButtonChecked(m_hWnd, IDC_SPRITEHACK));
|
||||
theApp.SetConfig("UserHacks_SkipDraw", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), UDM_GETPOS, 0, 0));
|
||||
}
|
||||
|
||||
|
@ -287,6 +289,7 @@ void GSSettingsDlg::UpdateControls()
|
|||
INT_PTR i;
|
||||
|
||||
bool allowHacks = !!theApp.GetConfig("allowHacks", 0);
|
||||
theApp.SetConfig("allowHacks", (int)allowHacks);
|
||||
|
||||
int scaling = 1; // in case reading the combo doesn't work, enable the custom res control anyway
|
||||
|
||||
|
@ -324,12 +327,14 @@ void GSSettingsDlg::UpdateControls()
|
|||
EnableWindow(GetDlgItem(m_hWnd, IDC_MSAA), hw);
|
||||
|
||||
//ShowWindow(GetDlgItem(m_hWnd, IDC_USERHACKS), allowHacks && hw) ? SW_SHOW : SW_HIDE; //Don't disable the "Hacks" frame
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_HACKDISABLED), !(allowHacks && hw)) ? SW_SHOW : SW_HIDE;
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_MSAAEDIT), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_MSAA), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_STATIC_TEXT_HWAA), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_ALPHAHACK), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_OFFSETHACK), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_SPRITEHACK), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACKEDIT), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
ShowWindow(GetDlgItem(m_hWnd, IDC_SKIPDRAWHACK), allowHacks && hw) ? SW_SHOW : SW_HIDE;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
GSTextureCache::GSTextureCache(GSRenderer* r)
|
||||
: m_renderer(r)
|
||||
{
|
||||
m_spritehack = !!theApp.GetConfig("UserHacks_SpriteHack", 0);
|
||||
m_paltex = !!theApp.GetConfig("paltex", 0);
|
||||
|
||||
m_temp = (uint8*)_aligned_malloc(1024 * 1024 * sizeof(uint32), 32);
|
||||
|
@ -584,6 +585,11 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
|||
|
||||
if(dst == NULL)
|
||||
{
|
||||
if(m_spritehack && TEX0.CPSM == 2 && (TEX0.PSM == 19 || TEX0.PSM == 27))
|
||||
src->m_spritehack_t = true;
|
||||
else
|
||||
src->m_spritehack_t = false;
|
||||
|
||||
if(m_paltex && GSLocalMemory::m_psm[TEX0.PSM].pal > 0)
|
||||
{
|
||||
src->m_fmt = FMT_8;
|
||||
|
|
|
@ -75,6 +75,7 @@ public:
|
|||
bool m_target;
|
||||
bool m_complete;
|
||||
bool m_repeating;
|
||||
bool m_spritehack_t;
|
||||
vector<GSVector2i>* m_p2t;
|
||||
|
||||
public:
|
||||
|
@ -118,6 +119,7 @@ protected:
|
|||
SourceMap m_src;
|
||||
list<Target*> m_dst[2];
|
||||
bool m_paltex;
|
||||
bool m_spritehack;
|
||||
uint8* m_temp;
|
||||
|
||||
virtual Source* CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* t = NULL);
|
||||
|
|
|
@ -177,7 +177,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
|
|||
|
||||
if(i == m_ps.end())
|
||||
{
|
||||
string str[15];
|
||||
string str[16];
|
||||
|
||||
str[0] = format("%d", sel.fst);
|
||||
str[1] = format("%d", sel.wms);
|
||||
|
@ -194,6 +194,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
|
|||
str[12] = format("%d", sel.ltf);
|
||||
str[13] = format("%d", sel.colclip);
|
||||
str[14] = format("%d", sel.date);
|
||||
str[15] = format("%d", sel.spritehack);
|
||||
|
||||
D3D11_SHADER_MACRO macro[] =
|
||||
{
|
||||
|
@ -212,6 +213,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe
|
|||
{"PS_LTF", str[12].c_str()},
|
||||
{"PS_COLCLIP", str[13].c_str()},
|
||||
{"PS_DATE", str[14].c_str()},
|
||||
{"PS_SPRITEHACK", str[15].c_str()},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
|
|||
|
||||
if(i == m_ps.end())
|
||||
{
|
||||
string str[14];
|
||||
string str[15];
|
||||
|
||||
str[0] = format("%d", sel.fst);
|
||||
str[1] = format("%d", sel.wms);
|
||||
|
@ -151,6 +151,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
|
|||
str[11] = format("%d", sel.ltf);
|
||||
str[12] = format("%d", sel.colclip);
|
||||
str[13] = format("%d", sel.date);
|
||||
str[14] = format("%d", sel.spritehack);
|
||||
|
||||
D3DXMACRO macro[] =
|
||||
{
|
||||
|
@ -168,6 +169,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel
|
|||
{"PS_LTF", str[11].c_str()},
|
||||
{"PS_COLCLIP", str[12].c_str()},
|
||||
{"PS_DATE", str[13].c_str()},
|
||||
{"PS_SPRITEHACK", str[14].c_str()},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ IDB_LOGO10 BITMAP "res\\logo10.bmp"
|
|||
// Dialog
|
||||
//
|
||||
|
||||
IDD_CONFIG DIALOGEX 0, 0, 189, 351
|
||||
IDD_CONFIG DIALOGEX 0, 0, 189, 327
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Settings..."
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
|
@ -87,8 +87,8 @@ BEGIN
|
|||
COMBOBOX IDC_INTERLACE,71,86,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,104,60,8
|
||||
COMBOBOX IDC_ASPECTRATIO,71,101,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,43,323,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,96,323,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,43,303,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,96,303,50,14
|
||||
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,231,93,10
|
||||
LTEXT "D3D internal res:",IDC_STATIC,18,135,55,8
|
||||
EDITTEXT IDC_RESX_EDIT,82,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
|
@ -99,9 +99,9 @@ BEGIN
|
|||
COMBOBOX IDC_UPSCALE_MULTIPLIER,82,147,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Or use Scaling:",IDC_STATIC,18,150,49,8
|
||||
LTEXT "Or use original PS2 resolution :",IDC_STATIC,18,165,99,8
|
||||
EDITTEXT IDC_MSAAEDIT,75,258,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,109,261,11,14
|
||||
LTEXT "HW Anti Aliasing",IDC_STATIC_TEXT_HWAA,18,261,53,8
|
||||
EDITTEXT IDC_MSAAEDIT,45,259,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,76,261,11,14
|
||||
LTEXT "HW AA",IDC_STATIC_TEXT_HWAA,18,261,24,8
|
||||
GROUPBOX "D3D Enhancements (can cause glitches)",IDC_STATIC,7,117,175,66
|
||||
LTEXT "Extra rendering threads:",IDC_STATIC,7,189,80,8
|
||||
EDITTEXT IDC_SWTHREADS_EDIT,89,187,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
|
@ -111,12 +111,14 @@ BEGIN
|
|||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,217,82,10
|
||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,217,93,10
|
||||
CONTROL "Edge anti-aliasing",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,231,72,10
|
||||
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,279,51,10
|
||||
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,279,51,10
|
||||
GROUPBOX "Hacks",IDC_USERHACKS,13,244,161,71,BS_CENTER
|
||||
EDITTEXT IDC_SKIPDRAWHACKEDIT,55,291,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,94,293,11,14
|
||||
LTEXT "SkipDraw:",IDC_STATIC_TEXT_SKIPDRAW,20,293,33,8
|
||||
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,280,51,10
|
||||
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,67,280,51,10
|
||||
GROUPBOX "Hacks",IDC_USERHACKS,7,244,175,53,BS_CENTER
|
||||
EDITTEXT IDC_SKIPDRAWHACKEDIT,122,259,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,161,261,11,14
|
||||
LTEXT "SkipDraw:",IDC_STATIC_TEXT_SKIPDRAW,89,261,33,8
|
||||
CONTROL "Sprite Hack",IDC_SPRITEHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,280,51,10
|
||||
LTEXT "HACKS DISABLED",IDC_HACKDISABLED,64,268,57,8,WS_DISABLED
|
||||
END
|
||||
|
||||
IDD_CAPTURE DIALOGEX 0, 0, 279, 71
|
||||
|
@ -163,48 +165,50 @@ BEGIN
|
|||
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
|
||||
END
|
||||
|
||||
IDD_CONFIG2 DIALOGEX 0, 0, 187, 341
|
||||
IDD_CONFIG2 DIALOGEX 0, 0, 187, 325
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Settings..."
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,6,6,173,42
|
||||
DEFPUSHBUTTON "OK",IDOK,41,312,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,41,301,50,14
|
||||
LTEXT "Renderer:",IDC_STATIC,6,57,34,8
|
||||
COMBOBOX IDC_RENDERER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Interlacing (F5):",IDC_STATIC,6,73,81,8
|
||||
COMBOBOX IDC_INTERLACE,70,70,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Custom resolution:",IDC_STATIC,26,135,65,8
|
||||
LTEXT "Custom resolution:",IDC_STATIC,26,134,65,8
|
||||
EDITTEXT IDC_RESX_EDIT,92,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,120,135,11,14
|
||||
EDITTEXT IDC_RESY_EDIT,130,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,130,11,14
|
||||
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,105,33,10
|
||||
LTEXT "Extra rendering threads:",IDC_STATIC,19,214,80,8
|
||||
EDITTEXT IDC_SWTHREADS_EDIT,102,212,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,135,215,11,14
|
||||
LTEXT "Extra rendering threads:",IDC_STATIC,11,214,80,8
|
||||
EDITTEXT IDC_SWTHREADS_EDIT,94,212,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,127,215,11,14
|
||||
COMBOBOX IDC_UPSCALE_MULTIPLIER,92,117,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Or use Scaling:",IDC_STATIC,38,120,49,8
|
||||
LTEXT "Or use Scaling:",IDC_STATIC,38,119,49,8
|
||||
LTEXT "Original PS2 resolution :",IDC_STATIC,10,105,80,8
|
||||
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,230,93,10
|
||||
PUSHBUTTON "Cancel",IDCANCEL,95,312,50,14
|
||||
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,230,93,10
|
||||
PUSHBUTTON "Cancel",IDCANCEL,95,301,50,14
|
||||
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,6,6,175,44
|
||||
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,275,51,10
|
||||
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,87,275,51,10
|
||||
GROUPBOX "Hacks",IDC_USERHACKS,6,250,175,55,BS_CENTER
|
||||
EDITTEXT IDC_SKIPDRAWHACKEDIT,65,286,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,104,288,11,14
|
||||
LTEXT "Skipdraw Hack:",IDC_STATIC_TEXT_SKIPDRAW,11,289,50,8
|
||||
EDITTEXT IDC_MSAAEDIT,69,260,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,103,263,11,14
|
||||
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,279,51,10
|
||||
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,279,51,10
|
||||
GROUPBOX "Hacks",IDC_USERHACKS,6,250,175,45,BS_CENTER
|
||||
EDITTEXT IDC_SKIPDRAWHACKEDIT,125,260,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,164,262,11,14
|
||||
LTEXT "Skipdraw",IDC_STATIC_TEXT_SKIPDRAW,93,262,30,8
|
||||
EDITTEXT IDC_MSAAEDIT,38,260,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,72,263,11,14
|
||||
GROUPBOX "D3D Internal resolution (can cause glitches)",IDC_STATIC,6,87,175,64,BS_CENTER
|
||||
GROUPBOX "Software Mode Settings",IDC_STATIC,6,198,175,50,BS_CENTER
|
||||
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,152,175,45,BS_CENTER
|
||||
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,166,58,10
|
||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,179,87,10
|
||||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,179,82,10
|
||||
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,6,165,67,10
|
||||
LTEXT "HW Anti Aliasing",IDC_STATIC_TEXT_HWAA,11,263,53,8
|
||||
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,166,58,10
|
||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,179,87,10
|
||||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,179,82,10
|
||||
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,10,165,67,10
|
||||
LTEXT "HW AA",IDC_STATIC_TEXT_HWAA,11,262,24,8
|
||||
CONTROL "Sprite Hack",IDC_SPRITEHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,279,51,10
|
||||
LTEXT "HACKS DISABLED",IDC_HACKDISABLED,62,268,57,8,WS_DISABLED
|
||||
END
|
||||
|
||||
|
||||
|
@ -224,7 +228,7 @@ BEGIN
|
|||
VERTGUIDE, 89
|
||||
VERTGUIDE, 182
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 344
|
||||
BOTTOMMARGIN, 320
|
||||
HORZGUIDE, 49
|
||||
END
|
||||
|
||||
|
@ -252,7 +256,7 @@ BEGIN
|
|||
RIGHTMARGIN, 181
|
||||
VERTGUIDE, 87
|
||||
TOPMARGIN, 6
|
||||
BOTTOMMARGIN, 334
|
||||
BOTTOMMARGIN, 318
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#define PS_LTF 1
|
||||
#define PS_COLCLIP 0
|
||||
#define PS_DATE 0
|
||||
#define PS_SPRITEHACK 0
|
||||
#endif
|
||||
|
||||
struct VS_INPUT
|
||||
|
@ -412,7 +413,19 @@ float4 sample(float2 st, float q)
|
|||
|
||||
if(PS_LTF)
|
||||
{
|
||||
#if PS_SPRITEHACK
|
||||
c[0].rgb *= c[0].a;
|
||||
c[1].rgb *= c[1].a;
|
||||
c[2].rgb *= c[2].a;
|
||||
c[3].rgb *= c[3].a;
|
||||
#endif
|
||||
|
||||
t = lerp(lerp(c[0], c[1], dd.x), lerp(c[2], c[3], dd.x), dd.y);
|
||||
|
||||
#if PS_SPRITEHACK
|
||||
t.rgb /= t.a;
|
||||
if(t.a < 0.25) t.a = 0;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -422,6 +435,10 @@ float4 sample(float2 st, float q)
|
|||
|
||||
if(PS_FMT == FMT_32)
|
||||
{
|
||||
#if PS_SPRITEHACK
|
||||
if(t.a < 0.25) t.a = 0;
|
||||
#endif
|
||||
|
||||
#if SHADER_MODEL <= 0x300
|
||||
if(PS_RT) t.a *= 128.0f / 255;
|
||||
#endif
|
||||
|
|
|
@ -74,6 +74,8 @@
|
|||
#define IDC_USERHACKS 2047
|
||||
#define IDC_SKIPDRAWHACKEDIT 2048
|
||||
#define IDC_STATIC10 2049
|
||||
#define IDC_HACKDISABLED 2050
|
||||
#define IDC_SPRITEHACK 2051
|
||||
#define IDC_COLORSPACE 3000
|
||||
#define IDR_CONVERT_FX 10000
|
||||
#define IDR_TFX_FX 10001
|
||||
|
@ -89,7 +91,7 @@
|
|||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 10007
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 2050
|
||||
#define _APS_NEXT_CONTROL_VALUE 2052
|
||||
#define _APS_NEXT_SYMED_VALUE 5000
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue