* All is fixed now about Custom Projection Hack (problem was inverted memmber)
- added support to DX11 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6980 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c23663620f
commit
25af2ae9b8
|
@ -94,33 +94,31 @@ void UpdateProjectionHack(int iPhackvalue[], std::string sPhackvalue[])
|
||||||
bool bProjHack3 = false;
|
bool bProjHack3 = false;
|
||||||
const char *sTemp[2];
|
const char *sTemp[2];
|
||||||
|
|
||||||
if (iPhackvalue[0] == 0)
|
if (iPhackvalue[0] == 1)
|
||||||
goto hackDisabled;
|
{
|
||||||
|
NOTICE_LOG(VIDEO, "\t\t--- Ortographic Projection Hack ON ---");
|
||||||
|
|
||||||
|
fhacksign1 *= (iPhackvalue[1] == 1) ? -1.0f : fhacksign1;
|
||||||
|
sTemp[0] = (iPhackvalue[1] == 1) ? " * (-1)" : "";
|
||||||
|
fhacksign2 *= (iPhackvalue[2] == 1) ? -1.0f : fhacksign2;
|
||||||
|
sTemp[1] = (iPhackvalue[2] == 1) ? " * (-1)" : "";
|
||||||
|
|
||||||
|
fhackvalue1 = PHackValue(sPhackvalue[0]);
|
||||||
|
NOTICE_LOG(VIDEO, "- zNear Correction = (%f + zNear)%s", fhackvalue1, sTemp[0]);
|
||||||
|
|
||||||
NOTICE_LOG(VIDEO, "\t\t--- Ortographic Projection Hack ON ---");
|
fhackvalue2 = PHackValue(sPhackvalue[1]);
|
||||||
|
NOTICE_LOG(VIDEO, "- zFar Correction = (%f + zFar)%s", fhackvalue2, sTemp[1]);
|
||||||
fhacksign1 *= (iPhackvalue[1] == 1) ? -1.0f : fhacksign1;
|
|
||||||
sTemp[0] = (iPhackvalue[1] == 1) ? " * (-1)" : "";
|
sTemp[0] = "DISABLED";
|
||||||
fhacksign2 *= (iPhackvalue[2] == 1) ? -1.0f : fhacksign2;
|
bProjHack3 = (iPhackvalue[3] == 1) ? true : bProjHack3;
|
||||||
sTemp[1] = (iPhackvalue[2] == 1) ? " * (-1)" : "";
|
if (bProjHack3)
|
||||||
|
sTemp[0] = "ENABLED";
|
||||||
fhackvalue1 = PHackValue(sPhackvalue[0]);
|
NOTICE_LOG(VIDEO, "- Extra Parameter: %s", sTemp[0]);
|
||||||
NOTICE_LOG(VIDEO, "- zNear Correction = (%f + zNear)%s", fhackvalue1, sTemp[0]);
|
}
|
||||||
|
|
||||||
fhackvalue2 = PHackValue(sPhackvalue[1]);
|
|
||||||
NOTICE_LOG(VIDEO, "- zFar Correction = (%f + zFar)%s", fhackvalue2, sTemp[1]);
|
|
||||||
|
|
||||||
sTemp[0] = "DISABLED";
|
|
||||||
bProjHack3 = (iPhackvalue[3] == 1) ? true : bProjHack3;
|
|
||||||
if (bProjHack3)
|
|
||||||
sTemp[0] = "ENABLED";
|
|
||||||
NOTICE_LOG(VIDEO, "- Extra Parameter: %s", sTemp[0]);
|
|
||||||
|
|
||||||
hackDisabled:
|
|
||||||
|
|
||||||
// Set the projections hacks
|
// Set the projections hacks
|
||||||
g_ProjHack1 = ProjectionHack(fhackvalue1,fhacksign1);
|
g_ProjHack1 = ProjectionHack(fhacksign1, fhackvalue1);
|
||||||
g_ProjHack2 = ProjectionHack(fhackvalue2,fhacksign2);
|
g_ProjHack2 = ProjectionHack(fhacksign2, fhackvalue2);
|
||||||
g_ProjHack3 = bProjHack3;
|
g_ProjHack3 = bProjHack3;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -391,10 +389,8 @@ void VertexShaderManager::SetConstants()
|
||||||
|
|
||||||
g_fProjectionMatrix[8] = 0.0f;
|
g_fProjectionMatrix[8] = 0.0f;
|
||||||
g_fProjectionMatrix[9] = 0.0f;
|
g_fProjectionMatrix[9] = 0.0f;
|
||||||
//g_fProjectionMatrix[10] = (g_ProjHack1.value + xfregs.rawProjection[4]) * g_ProjHack1.sign;
|
g_fProjectionMatrix[10] = (g_ProjHack1.value + xfregs.rawProjection[4]) * ((g_ProjHack1.sign == 0) ? 1.0f : g_ProjHack1.sign);
|
||||||
//g_fProjectionMatrix[11] = (g_ProjHack2.value + xfregs.rawProjection[5]) * g_ProjHack2.sign;
|
g_fProjectionMatrix[11] = (g_ProjHack2.value + xfregs.rawProjection[5]) * ((g_ProjHack2.sign == 0) ? 1.0f : g_ProjHack2.sign);
|
||||||
g_fProjectionMatrix[10] = xfregs.rawProjection[4];
|
|
||||||
g_fProjectionMatrix[11] = xfregs.rawProjection[5];
|
|
||||||
|
|
||||||
g_fProjectionMatrix[12] = 0.0f;
|
g_fProjectionMatrix[12] = 0.0f;
|
||||||
g_fProjectionMatrix[13] = 0.0f;
|
g_fProjectionMatrix[13] = 0.0f;
|
||||||
|
|
|
@ -246,6 +246,7 @@ void Initialize(void *init)
|
||||||
|
|
||||||
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx11.ini").c_str());
|
g_Config.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_dx11.ini").c_str());
|
||||||
g_Config.GameIniLoad(globals->game_ini);
|
g_Config.GameIniLoad(globals->game_ini);
|
||||||
|
UpdateProjectionHack(g_Config.iPhackvalue, g_Config.sPhackvalue);
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
|
|
||||||
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, _T("Loading - Please wait."));
|
g_VideoInitialize.pWindowHandle = (void*)EmuWindow::Create((HWND)g_VideoInitialize.pWindowHandle, g_hInstance, _T("Loading - Please wait."));
|
||||||
|
|
Loading…
Reference in New Issue