a lot of people don't get convinced by my "Pseudo-antialiasing " effect and is true is not near the quality of the true effect so :)

true antialiasing using supersampling:
3 modes implemented:
2x = is a one and a half samples supersampled buffer with a linear texture fetch, this produce a similar result of a 2x MSAA
4x = four samples with a aligned texture fetch in the center of the 4 samples, this produce a little best effect that the first mode.
8x = is a four samples with a  rotated grid fetching producing a nicer (really nicer in some cases) antialiasing.
please test an let me know if you like this :)
i remember to everyone that supersampling is expensive so don't complain in speed drops :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5006 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-02-03 22:19:00 +00:00
parent d89c5dddcd
commit 090d7ec534
6 changed files with 106 additions and 163 deletions

View File

@ -525,22 +525,14 @@ have_texture:
D3DFORMAT bformat = FBManager::GetEFBDepthRTSurfaceFormat();
if(!bFromZBuffer && g_ActiveConfig.iMultisampleMode != 0)
if(!bFromZBuffer && g_ActiveConfig.iMultisampleMode > 2)
{
D3D::ChangeSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_POINT);
D3D::ChangeSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_POINT);
D3D::drawFSAATexQuad(
read_texture,
FBManager::GetEFBDepthTexture(source_rect),
D3D::drawShadedTexQuad(read_texture,
&sourcerect,
Renderer::GetFullTargetWidth() ,
Renderer::GetFullTargetHeight(),
PixelShaderCache::GetFSAAColorMatrixProgram(),
VertexShaderCache::GetFSAAVertexShader(),
g_ActiveConfig.iMultisampleMode,1.0f);
D3D::RefreshSamplerState(1, D3DSAMP_MINFILTER);
D3D::RefreshSamplerState(1, D3DSAMP_MAGFILTER);
D3D::SetTexture(1,NULL);
VertexShaderCache::GetFSAAVertexShader());
}
else
{