mirror of https://github.com/PCSX2/pcsx2.git
GSdx:
- Bring the latest upscale hacks to dx9 mode as well. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2403 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
a63115988b
commit
7a349ca360
|
@ -435,7 +435,7 @@ bool GSRenderer::MakeSnapshot(const string& path)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
int bla=0;
|
||||
void GSRenderer::KeyEvent(GSKeyEventData* e, int param)
|
||||
{
|
||||
if(e->type == KEYPRESS)
|
||||
|
@ -450,7 +450,8 @@ void GSRenderer::KeyEvent(GSKeyEventData* e, int param)
|
|||
m_interlace = (m_interlace + 7 + step) % 7;
|
||||
return;
|
||||
case VK_F6:
|
||||
m_aspectratio = (m_aspectratio + 3 + step) % 3;
|
||||
bla+=1;
|
||||
//m_aspectratio = (m_aspectratio + 3 + step) % 3;
|
||||
return;
|
||||
case VK_F7:
|
||||
m_shader = (m_shader + 3 + step) % 3;
|
||||
|
|
|
@ -72,12 +72,61 @@ void GSRendererDX9::VertexKick(bool skip)
|
|||
{
|
||||
v.p = v.p.xyxy(GSVector4::load((float)m_v.XYZ.Z));
|
||||
}
|
||||
|
||||
int Uadjust = 0;
|
||||
int Vadjust = 0;
|
||||
|
||||
if(tme)
|
||||
{
|
||||
if(fst)
|
||||
{
|
||||
v.t = m_v.GetUV();
|
||||
|
||||
#ifdef USE_UPSCALE_HACKS
|
||||
|
||||
int Udiff = 0;
|
||||
int Vdiff = 0;
|
||||
int multiplier = upscale_Multiplier();
|
||||
|
||||
if (multiplier > 1) {
|
||||
|
||||
Udiff = m_v.UV.U & 4095;
|
||||
Vdiff = m_v.UV.V & 4095;
|
||||
if (Udiff != 0){
|
||||
if (Udiff >= 4080) {/*printf("U+ %d %d\n", Udiff, m_v.UV.U);*/ Uadjust = -1; }
|
||||
else if (Udiff <= 16) {/*printf("U- %d %d\n", Udiff, m_v.UV.U);*/ Uadjust = 1; }
|
||||
}
|
||||
if (Vdiff != 0){
|
||||
if (Vdiff >= 4080) {/*printf("V+ %d %d\n", Vdiff, m_v.UV.V);*/ Vadjust = -1; }
|
||||
else if (Vdiff <= 16) {/*printf("V- %d %d\n", Vdiff, m_v.UV.V);*/ Vadjust = 1; }
|
||||
}
|
||||
|
||||
Udiff = m_v.UV.U & 255;
|
||||
Vdiff = m_v.UV.V & 255;
|
||||
if (Udiff != 0){
|
||||
if (Udiff >= 248) { Uadjust = -1; }
|
||||
else if (Udiff <= 8) { Uadjust = 1; }
|
||||
}
|
||||
|
||||
if (Vdiff != 0){
|
||||
if (Vdiff >= 248) { Vadjust = -1; }
|
||||
else if (Vdiff <= 8) { Vadjust = 1; }
|
||||
}
|
||||
|
||||
Udiff = m_v.UV.U & 15;
|
||||
Vdiff = m_v.UV.V & 15;
|
||||
if (Udiff != 0){
|
||||
if (Udiff >= 15) { Uadjust = -1; }
|
||||
else if (Udiff <= 1) { Uadjust = 1; }
|
||||
}
|
||||
|
||||
if (Vdiff != 0){
|
||||
if (Vdiff >= 15) { Vadjust = -1; }
|
||||
else if (Vdiff <= 1) { Vadjust = 1; }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -89,6 +138,14 @@ void GSRendererDX9::VertexKick(bool skip)
|
|||
|
||||
dst = v;
|
||||
|
||||
#ifdef USE_UPSCALE_HACKS
|
||||
if(tme && fst)
|
||||
{
|
||||
dst.t.x -= (float) Uadjust;
|
||||
dst.t.y -= (float) Vadjust;
|
||||
}
|
||||
#endif
|
||||
|
||||
dst.c0 = m_v.RGBAQ.u32[0];
|
||||
dst.c1 = m_v.FOG.u32[1];
|
||||
|
||||
|
|
|
@ -175,14 +175,28 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
|
|||
int multiplier = m_renderer->upscale_Multiplier();
|
||||
if (multiplier > 1) //it's limited to a maximum of 4 on reading the config
|
||||
{
|
||||
dst->m_texture->SetScale(GSVector2((float)multiplier, (float)multiplier));
|
||||
#if 0 //#ifdef USE_UPSCALE_HACKS //not happy with this yet..
|
||||
float x = 1.0f;
|
||||
float y = 1.0f;
|
||||
|
||||
switch(multiplier)
|
||||
{
|
||||
case 2: x = 1.9375; y = 2.0f; break; // x res get's rid of vertical lines in many games
|
||||
case 3: x = 2.9375f; y = 2.9375f; break; // not helping much
|
||||
case 4: x = 3.875f; y = 3.875f; break; // not helping much
|
||||
default: __assume(0);
|
||||
}
|
||||
dst->m_texture->SetScale( GSVector2(x, y) );
|
||||
#else
|
||||
dst->m_texture->SetScale( GSVector2((float)multiplier, (float)multiplier) );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
GSVector4i fr = m_renderer->GetFrameRect();
|
||||
|
||||
int ww = (int)(fr.left + dst->m_TEX0.TBW * 64);
|
||||
int ww = (int)(fr.left + m_renderer->GetDisplayRect().width());
|
||||
int hh = (int)(fr.top + m_renderer->GetDisplayRect().height());
|
||||
|
||||
if(hh <= m_renderer->GetDeviceSize().y / 2)
|
||||
|
|
Loading…
Reference in New Issue