mirror of https://github.com/PCSX2/pcsx2.git
GSdx:
Finish up my scanlines attempt. Now the 2 old shaders are back in and all 3 cycle on F7. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5809 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
f5257b2c3c
commit
2ac3c47c42
|
@ -106,7 +106,7 @@ void GSDevice::Present(const GSVector4i& r, int shader)
|
||||||
|
|
||||||
if(m_current)
|
if(m_current)
|
||||||
{
|
{
|
||||||
static int s_shader[3] = {0, 5, 6}; // FIXME
|
static int s_shader[4] = {0, 5, 6, 8}; // FIXME
|
||||||
|
|
||||||
Present(m_current, m_backbuffer, GSVector4(r), s_shader[shader]);
|
Present(m_current, m_backbuffer, GSVector4(r), s_shader[shader]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ public: // TODO
|
||||||
{
|
{
|
||||||
CComPtr<ID3D11InputLayout> il;
|
CComPtr<ID3D11InputLayout> il;
|
||||||
CComPtr<ID3D11VertexShader> vs;
|
CComPtr<ID3D11VertexShader> vs;
|
||||||
CComPtr<ID3D11PixelShader> ps[8];
|
CComPtr<ID3D11PixelShader> ps[9];
|
||||||
CComPtr<ID3D11SamplerState> ln;
|
CComPtr<ID3D11SamplerState> ln;
|
||||||
CComPtr<ID3D11SamplerState> pt;
|
CComPtr<ID3D11SamplerState> pt;
|
||||||
CComPtr<ID3D11DepthStencilState> dss;
|
CComPtr<ID3D11DepthStencilState> dss;
|
||||||
|
|
|
@ -119,7 +119,7 @@ public: // TODO
|
||||||
{
|
{
|
||||||
CComPtr<IDirect3DVertexDeclaration9> il;
|
CComPtr<IDirect3DVertexDeclaration9> il;
|
||||||
CComPtr<IDirect3DVertexShader9> vs;
|
CComPtr<IDirect3DVertexShader9> vs;
|
||||||
CComPtr<IDirect3DPixelShader9> ps[8];
|
CComPtr<IDirect3DPixelShader9> ps[9];
|
||||||
Direct3DSamplerState9 ln;
|
Direct3DSamplerState9 ln;
|
||||||
Direct3DSamplerState9 pt;
|
Direct3DSamplerState9 pt;
|
||||||
Direct3DDepthStencilState9 dss;
|
Direct3DDepthStencilState9 dss;
|
||||||
|
|
|
@ -550,7 +550,7 @@ void GSRenderer::KeyEvent(GSKeyEventData* e)
|
||||||
m_aspectratio = (m_aspectratio + 3 + step) % 3;
|
m_aspectratio = (m_aspectratio + 3 + step) % 3;
|
||||||
return;
|
return;
|
||||||
case VK_F7:
|
case VK_F7:
|
||||||
m_shader = (m_shader + 3 + step) % 3;
|
m_shader = (m_shader + 4 + step) % 4;
|
||||||
printf("GSdx: Set shader %d.\n", (int)m_shader);
|
printf("GSdx: Set shader %d.\n", (int)m_shader);
|
||||||
return;
|
return;
|
||||||
case VK_DELETE:
|
case VK_DELETE:
|
||||||
|
|
|
@ -170,26 +170,36 @@ PS_OUTPUT ps_main4(PS_INPUT input)
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main5(PS_INPUT input) // triangular
|
PS_OUTPUT ps_main5(PS_INPUT input) // scanlines
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
uint4 p = (uint4)input.p;
|
uint4 p = (uint4)input.p;
|
||||||
|
|
||||||
// output.c = ps_crt(input, ((p.x + (p.y & 1) * 3) >> 1) % 3);
|
output.c = ps_scanlines(input, p.y % 2);
|
||||||
output.c = ps_crt(input, ((p.x + ((p.y >> 1) & 1) * 3) >> 1) % 3);
|
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal (repurposed for scanlines for now)
|
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
uint4 p = (uint4)input.p;
|
uint4 p = (uint4)input.p;
|
||||||
|
|
||||||
output.c = ps_scanlines(input, p.y % 2); // scanlines
|
output.c = ps_crt(input, (p.x + (p.y % 3)) % 3);
|
||||||
//output.c = ps_crt(input, (p.x + (p.y % 3)) % 3); // diagonal
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
PS_OUTPUT ps_main8(PS_INPUT input) // triangular
|
||||||
|
{
|
||||||
|
PS_OUTPUT output;
|
||||||
|
|
||||||
|
uint4 p = (uint4)input.p;
|
||||||
|
|
||||||
|
// output.c = ps_crt(input, ((p.x + (p.y & 1) * 3) >> 1) % 3);
|
||||||
|
output.c = ps_crt(input, ((p.x + ((p.y >> 1) & 1) * 3) >> 1) % 3);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
@ -240,26 +250,36 @@ PS_OUTPUT ps_main4(PS_INPUT input)
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main5(PS_INPUT input) // triangular
|
PS_OUTPUT ps_main5(PS_INPUT input) // scanlines
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
int4 p = (int4)input.p;
|
int4 p = (int4)input.p;
|
||||||
|
|
||||||
|
output.c = ps_scanlines(input, p.y % 2);
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal
|
||||||
|
{
|
||||||
|
PS_OUTPUT output;
|
||||||
|
|
||||||
|
int4 p = (int4)input.p;
|
||||||
|
|
||||||
|
output.c = ps_crt(input, (p.x + (p.y % 3)) % 3);
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
PS_OUTPUT ps_main8(PS_INPUT input) // triangular
|
||||||
|
{
|
||||||
|
PS_OUTPUT output;
|
||||||
|
|
||||||
|
int4 p = (int4)input.p;
|
||||||
|
|
||||||
// output.c = ps_crt(input, ((p.x + (p.y % 2) * 3) / 2) % 3);
|
// output.c = ps_crt(input, ((p.x + (p.y % 2) * 3) / 2) % 3);
|
||||||
output.c = ps_crt(input, ((p.x + ((p.y / 2) % 2) * 3) / 2) % 3);
|
output.c = ps_crt(input, ((p.x + ((p.y / 2) % 2) * 3) / 2) % 3);
|
||||||
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal (repurposed for scanlines for now)
|
|
||||||
{
|
|
||||||
PS_OUTPUT output;
|
|
||||||
|
|
||||||
int4 p = (int4)input.p;
|
|
||||||
|
|
||||||
output.c = ps_scanlines(input, p.y % 2); // scanlines
|
|
||||||
//output.c = ps_crt(input, (p.x + (p.y % 3)) % 3); // diagonal
|
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue