rendered paste bodyIndex: plugins/GSdx/GSDevice.cpp===================================================================--- plugins/GSdx/GSDevice.cpp (revision 1478)+++ plugins/GSdx/GSDevice.cpp (working copy)@@ -94,9 +94,10 @@ if(m_current) {- static int s_shader[3] = {0, 5, 6}; // FIXME+ static int s_shader[3] = {7, 0, 0};+ static bool s_linear[3] = {false, true, false}; - StretchRect(m_current, m_backbuffer, GSVector4(r), s_shader[shader]);+ StretchRect(m_current, m_backbuffer, GSVector4(r), s_shader[shader], s_linear[shader]); } Flip();Index: plugins/GSdx/GSDevice9.h===================================================================--- plugins/GSdx/GSDevice9.h (revision 1478)+++ plugins/GSdx/GSDevice9.h (working copy)@@ -110,7 +110,7 @@ { CComPtr<IDirect3DVertexDeclaration9> il; CComPtr<IDirect3DVertexShader9> vs;- CComPtr<IDirect3DPixelShader9> ps[7];+ CComPtr<IDirect3DPixelShader9> ps[8]; Direct3DSamplerState9 ln; Direct3DSamplerState9 pt; Direct3DDepthStencilState9 dss;Index: plugins/GSdx/GSdx_vs2008.vcproj===================================================================--- plugins/GSdx/GSdx_vs2008.vcproj (revision 1478)+++ plugins/GSdx/GSdx_vs2008.vcproj (working copy)@@ -43,6 +43,7 @@ /> <Tool Name="VCCLCompilerTool"+ PreprocessorDefinitions="D3DXSHADER_DEBUG=1 D3DXSHADER_SKIPOPTIMIZATION=1" UsePrecompiledHeader="2" /> <Tool@@ -780,6 +781,8 @@ </Configuration> <Configuration Name="Debug|Win32"+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"+ IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" > <ToolIndex: plugins/GSdx/res/convert.fx===================================================================--- plugins/GSdx/res/convert.fx (revision 1478)+++ plugins/GSdx/res/convert.fx (working copy)@@ -122,6 +122,66 @@ sampler Texture : register(s0); +const float texel = 1. / 1024;+const float halftexel = 1 / 2048;++const float3 dt = float3(1.4,1.4,1.4); // I have no fucking idea+const float4 d4 = float4(1,1,1,1);+const float mx = 1.00; // start smoothing wt.+const float k = -1.10; // wt. decrease factor+const float max_w = 0.90; // max filter weigth+const float min_w = 0.05; // min filter weigth+const float lum_add = 0.33; // effects smoothing++// here is where my fragile mind shuts down in self-defense++float4 hq4x (in float2 tc) : COLOR+{+ float3 c = tex2D(Texture, tc).xyz;+ float3 o1 = tex2D(Texture, tc + float2(-texel, -texel)).xyz;+ float3 o2 = tex2D(Texture, tc + float2( texel, -texel)).xyz;+ float3 o3 = tex2D(Texture, tc + float2( texel, texel)).xyz;+ float3 o4 = tex2D(Texture, tc + float2(-texel, texel)).xyz;+ float3 i1 = tex2D(Texture, tc + float2(-halftexel, -halftexel)).xyz;+ float3 i2 = tex2D(Texture, tc + float2( halftexel, -halftexel)).xyz;+ float3 i3 = tex2D(Texture, tc + float2( halftexel, halftexel)).xyz;+ float3 i4 = tex2D(Texture, tc + float2(-halftexel, halftexel)).xyz;+ float3 s1 = tex2D(Texture, tc + float2(-texel, 0 )).xyz;+ float3 s2 = tex2D(Texture, tc + float2( texel, 0 )).xyz;+ float3 s3 = tex2D(Texture, tc + float2( 0 , -texel)).xyz;+ float3 s4 = tex2D(Texture, tc + float2( 0 , texel)).xyz;++ float ko1=dot(abs(o1-c),dt);+ float ko2=dot(abs(o2-c),dt);+ float ko3=dot(abs(o3-c),dt);+ float ko4=dot(abs(o4-c),dt);++ float4 w;+ w.yw = min(dot(abs(i1-i3),dt),0.6*(ko1+ko3));+ w.xz = min(dot(abs(i2-i4),dt),0.6*(ko2+ko4));++ if (ko3<ko1) w.x*= ko3/ko1;+ if (ko4<ko2) w.y*= ko4/ko2;+ if (ko1<ko3) w.z*= ko1/ko3;+ if (ko2<ko4) w.w*= ko2/ko4;++ float3 c2 = (w.x*o1+w.y*o2+w.z*o3+w.w*o4+0.001*c)/(dot(w,d4)+0.001);++ w.x = k*dot(abs(i1-c)+abs(i3-c),dt)/(0.125*dot(i1+i3,dt)+lum_add);+ w.y = k*dot(abs(i2-c)+abs(i4-c),dt)/(0.125*dot(i2+i4,dt)+lum_add);+ w.z = k*dot(abs(s1-c)+abs(s2-c),dt)/(0.125*dot(s1+s2,dt)+lum_add);+ w.w = k*dot(abs(s3-c)+abs(s4-c),dt)/(0.125*dot(s3+s4,dt)+lum_add);++ w.x = clamp(w.x+mx,min_w,max_w); + w.y = clamp(w.y+mx,min_w,max_w);+ w.z = clamp(w.z+mx,min_w,max_w); + w.w = clamp(w.w+mx,min_w,max_w);++ float3 c3 = (w.x*(i1+i3)+w.y*(i2+i4)+w.z*(s1+s2)+w.w*(s3+s4)+c)/(2.0*dot(w,d4)+1.0);++ return float4(c3, 0);+}+ float4 ps_main0(float2 t : TEXCOORD0) : COLOR { return tex2D(Texture, t);@@ -181,4 +241,9 @@ return ps_crt(t, (p.x + (p.y % 3)) % 3); } +float4 ps_main7(float2 t : TEXCOORD0) : COLOR // hq4x OR IS IT?+{+ return hq4x(t);+}+ #endif\ No newline at end of file