mirror of https://github.com/PCSX2/pcsx2.git
GSdx:
- Added a macro that disables any upscale hacks. - More work on the dx10 renderer upscale hacks. PCSX2: - Changed a warning so it reads more like a notice :p git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2366 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
1a54ff0bb9
commit
c86fc2c9b9
|
@ -168,9 +168,10 @@ bool i18n_SetLanguage( int wxLangId )
|
||||||
|
|
||||||
if( !IsEnglish(wxLangId) && !locale->AddCatalog( L"pcsx2main" ) )
|
if( !IsEnglish(wxLangId) && !locale->AddCatalog( L"pcsx2main" ) )
|
||||||
{
|
{
|
||||||
Console.Warning( L"SetLanguage: Cannot find pcsx2main.mo file for language '%s' [%s]",
|
/*Console.Warning( L"SetLanguage: Cannot find pcsx2main.mo file for language '%s' [%s]",
|
||||||
wxLocale::GetLanguageName( locale->GetLanguage() ).c_str(), locale->GetCanonicalName().c_str()
|
wxLocale::GetLanguageName( locale->GetLanguage() ).c_str(), locale->GetCanonicalName().c_str()
|
||||||
);
|
);*/
|
||||||
|
Console.Warning("SetLanguage is not implemented yet, using English.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,8 +223,6 @@ bool GSRenderer::Merge(int field)
|
||||||
r += GSVector4i(0, 1).xyxy();
|
r += GSVector4i(0, 1).xyxy();
|
||||||
}
|
}
|
||||||
|
|
||||||
r += GSVector4i(1, 1, -1, -1); //crop a few of the outermost pixels, which are often buggy.
|
|
||||||
|
|
||||||
GSVector4 scale = GSVector4(tex[i]->GetScale()).xyxy();
|
GSVector4 scale = GSVector4(tex[i]->GetScale()).xyxy();
|
||||||
|
|
||||||
src[i] = GSVector4(r) * scale / GSVector4(tex[i]->GetSize()).xyxy();
|
src[i] = GSVector4(r) * scale / GSVector4(tex[i]->GetSize()).xyxy();
|
||||||
|
|
|
@ -46,6 +46,7 @@ void GSRendererDX10::VertexKick(bool skip)
|
||||||
dst.vi[0] = m_v.vi[0];
|
dst.vi[0] = m_v.vi[0];
|
||||||
dst.vi[1] = m_v.vi[1];
|
dst.vi[1] = m_v.vi[1];
|
||||||
|
|
||||||
|
#ifdef USE_UPSCALE_HACKS
|
||||||
if(tme && fst)
|
if(tme && fst)
|
||||||
{
|
{
|
||||||
//GSVector4::storel(&dst.ST, m_v.GetUV());
|
//GSVector4::storel(&dst.ST, m_v.GetUV());
|
||||||
|
@ -57,49 +58,56 @@ void GSRendererDX10::VertexKick(bool skip)
|
||||||
|
|
||||||
if (multiplier > 1) {
|
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;
|
Udiff = m_v.UV.U & 255;
|
||||||
Vdiff = m_v.UV.V & 255;
|
Vdiff = m_v.UV.V & 255;
|
||||||
|
|
||||||
if (Udiff != 0){
|
if (Udiff != 0){
|
||||||
if (Udiff > 247) Uadjust = -1; //Mana Khemia 2
|
if (Udiff >= 248) { Uadjust = -1; }
|
||||||
else if (Udiff < 9) Uadjust = 1; //Ar Tonelico 2
|
else if (Udiff <= 8) { Uadjust = 1; }
|
||||||
else
|
|
||||||
{
|
|
||||||
//float jaja = (float)m_v.UV.U / (float)(m_context->TEX0.TW*64);
|
|
||||||
//int test = (int)jaja ;
|
|
||||||
//float result = jaja-(float)test;
|
|
||||||
//
|
|
||||||
//if (result < 0.031251f || m_v.UV.U == 272 || m_v.UV.U == 400){
|
|
||||||
// Uadjust = 16; //Wild Arms Engine, still problems with Odin Sphere
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
Uadjust = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else Uadjust = 0;
|
|
||||||
|
|
||||||
if (Vdiff != 0){
|
if (Vdiff != 0){
|
||||||
if (Vdiff > 247) Vadjust = -1;
|
if (Vdiff >= 248) { Vadjust = -1; }
|
||||||
else if (Vdiff < 9) Vadjust = 1;
|
else if (Vdiff <= 8) { Vadjust = 1; }
|
||||||
else
|
}
|
||||||
{
|
|
||||||
//float jaja = (float)m_v.UV.V / (float)(m_context->TEX0.TH*64);
|
Udiff = m_v.UV.U & 15;
|
||||||
//int test = (int)jaja ;
|
Vdiff = m_v.UV.V & 15;
|
||||||
//float result = jaja-(float)test;
|
if (Udiff != 0){
|
||||||
//
|
if (Udiff >= 15) { Uadjust = -1; }
|
||||||
//if (result < 0.031251f || m_v.UV.V == 272 || m_v.UV.V == 400){
|
else if (Udiff <= 1) { Uadjust = 1; }
|
||||||
// Vadjust = 16; //Wild Arms Engine, still problems with Odin Sphere
|
}
|
||||||
//}
|
|
||||||
//else
|
if (Vdiff != 0){
|
||||||
Vadjust = 0;
|
if (Vdiff >= 15) { Vadjust = -1; }
|
||||||
}
|
else if (Vdiff <= 1) { Vadjust = 1; }
|
||||||
}
|
}
|
||||||
else Vadjust = 0;
|
|
||||||
}
|
}
|
||||||
dst.ST.S = (float)m_v.UV.U - Uadjust;
|
dst.ST.S = (float)m_v.UV.U - Uadjust;
|
||||||
dst.ST.T = (float)m_v.UV.V - Vadjust;
|
dst.ST.T = (float)m_v.UV.V - Vadjust;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (tme)
|
||||||
|
{
|
||||||
|
// Wip :p
|
||||||
|
//dst.XYZ.X += 5;
|
||||||
|
//dst.XYZ.Y += 5;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if(tme && fst)
|
||||||
|
{
|
||||||
|
GSVector4::storel(&dst.ST, m_v.GetUV());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|
|
@ -624,6 +624,7 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
||||||
|
|
||||||
GSVector4 dr(0, 0, w, h);
|
GSVector4 dr(0, 0, w, h);
|
||||||
|
|
||||||
|
#ifdef USE_UPSCALE_HACKS
|
||||||
float multiplier = (float) m_renderer->upscale_Multiplier()-1;
|
float multiplier = (float) m_renderer->upscale_Multiplier()-1;
|
||||||
//dr += a few pixels, to fight blur/brightness layers beeing more offset the more we upscale
|
//dr += a few pixels, to fight blur/brightness layers beeing more offset the more we upscale
|
||||||
if(w > dstsize.x)
|
if(w > dstsize.x)
|
||||||
|
@ -643,6 +644,21 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con
|
||||||
dr += GSVector4 (0.0f, 0.25f*multiplier, 0.0f, 0.25f*multiplier);
|
dr += GSVector4 (0.0f, 0.25f*multiplier, 0.0f, 0.25f*multiplier);
|
||||||
}
|
}
|
||||||
else dr += GSVector4 (0.0f, 0.5f*multiplier, 0.0f, 0.5f*multiplier);
|
else dr += GSVector4 (0.0f, 0.5f*multiplier, 0.0f, 0.5f*multiplier);
|
||||||
|
#else
|
||||||
|
if(w > dstsize.x)
|
||||||
|
{
|
||||||
|
scale.x = (float)dstsize.x / tw;
|
||||||
|
dr.z = (float)dstsize.x * scale.x / dst->m_texture->GetScale().x;
|
||||||
|
w = dstsize.x;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(h > dstsize.y)
|
||||||
|
{
|
||||||
|
scale.y = (float)dstsize.y / th;
|
||||||
|
dr.w = (float)dstsize.y * scale.y / dst->m_texture->GetScale().y;
|
||||||
|
h = dstsize.y;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
GSVector4 sr(0, 0, w, h);
|
GSVector4 sr(0, 0, w, h);
|
||||||
|
|
||||||
|
|
|
@ -96,5 +96,12 @@ GSVector4i GSVector4i::fit(int preset) const
|
||||||
r = *this;
|
r = *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_UPSCALE_HACKS //don't show outermost pixels, they're often buggy
|
||||||
|
r.x-=1;
|
||||||
|
r.y-=1;
|
||||||
|
r.z+=1;
|
||||||
|
r.w+=1;
|
||||||
|
#endif
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,8 @@ typedef signed long long int64;
|
||||||
|
|
||||||
#define D3DCOLORWRITEENABLE_RGBA (D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE | D3DCOLORWRITEENABLE_ALPHA)
|
#define D3DCOLORWRITEENABLE_RGBA (D3DCOLORWRITEENABLE_RED | D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_BLUE | D3DCOLORWRITEENABLE_ALPHA)
|
||||||
|
|
||||||
|
#define USE_UPSCALE_HACKS //Hacks intended to fix upscaling / rendering glitches in HW renderers
|
||||||
|
|
||||||
// dxsdk beta missing these:
|
// dxsdk beta missing these:
|
||||||
#define D3D11_SHADER_MACRO D3D10_SHADER_MACRO
|
#define D3D11_SHADER_MACRO D3D10_SHADER_MACRO
|
||||||
#define ID3D11Blob ID3D10Blob
|
#define ID3D11Blob ID3D10Blob
|
||||||
|
|
Loading…
Reference in New Issue