To avoid confusion added SSAA modes to the drop down this.

there are only to SSAA modes 1.5x and 2x as they give the best result.
please test and let me know the results

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5017 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado 2010-02-05 21:55:02 +00:00
parent 33a9e4c674
commit c65bfbdf7b
3 changed files with 12 additions and 10 deletions

View File

@ -161,9 +161,11 @@ void Enumerate()
D3D::D3D->GetAdapterIdentifier(i, 0, &a.ident); D3D::D3D->GetAdapterIdentifier(i, 0, &a.ident);
bool isNvidia = a.ident.VendorId == VENDOR_NVIDIA; bool isNvidia = a.ident.VendorId == VENDOR_NVIDIA;
// Add multisample modes // Add SuperSamples modes
a.aa_levels.push_back(AALevel("None", D3DMULTISAMPLE_NONE, 0)); a.aa_levels.push_back(AALevel("None", D3DMULTISAMPLE_NONE, 0));
a.aa_levels.push_back(AALevel("1.5x SSAA", D3DMULTISAMPLE_NONE, 0));
a.aa_levels.push_back(AALevel("2x SSAA", D3DMULTISAMPLE_NONE, 0));
//Add multisample modes
DWORD qlevels = 0; DWORD qlevels = 0;
if (D3DERR_NOTAVAILABLE != D3D::D3D->CheckDeviceMultiSampleType( if (D3DERR_NOTAVAILABLE != D3D::D3D->CheckDeviceMultiSampleType(
i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &qlevels)) i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &qlevels))

View File

@ -283,13 +283,13 @@ bool Renderer::Init()
// TODO: Grab target width from configured resolution? // TODO: Grab target width from configured resolution?
s_target_width = s_backbuffer_width; s_target_width = s_backbuffer_width;
s_target_height = s_backbuffer_height * ((float)EFB_HEIGHT / 480.0f); s_target_height = s_backbuffer_height * ((float)EFB_HEIGHT / 480.0f);
s_LastAA = g_ActiveConfig.iMultisampleMode % 2; s_LastAA = g_ActiveConfig.iMultisampleMode;
switch (s_LastAA) switch (s_LastAA)
{ {
case 1: case 1:
s_target_width = (s_target_width * 3) / 2; s_target_width = (s_target_width * 3) / 2;
s_target_height = (s_target_height *3) / 2; s_target_height = (s_target_height * 3) / 2;
break; break;
case 2: case 2:
s_target_width *= 2; s_target_width *= 2;
@ -580,7 +580,7 @@ static void EFBTextureToD3DBackBuffer(const EFBRectangle& sourceRc)
D3D::ChangeSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); D3D::ChangeSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
D3D::ChangeSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); D3D::ChangeSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
if(g_ActiveConfig.iMultisampleMode > 2 ) if(g_ActiveConfig.iMultisampleMode > 0 )
{ {
D3D::drawShadedTexQuad(read_texture,&sourcerect,Renderer::GetFullTargetWidth(),Renderer::GetFullTargetHeight(),PixelShaderCache::GetFSAAProgram(),VertexShaderCache::GetFSAAVertexShader()); D3D::drawShadedTexQuad(read_texture,&sourcerect,Renderer::GetFullTargetWidth(),Renderer::GetFullTargetHeight(),PixelShaderCache::GetFSAAProgram(),VertexShaderCache::GetFSAAVertexShader());
} }
@ -1143,7 +1143,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
CheckForResize(); CheckForResize();
u32 newAA = g_ActiveConfig.iMultisampleMode % 2; u32 newAA = g_ActiveConfig.iMultisampleMode;
if(newAA != s_LastAA) if(newAA != s_LastAA)
{ {
s_target_width = s_backbuffer_width; s_target_width = s_backbuffer_width;
@ -1153,7 +1153,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
{ {
case 1: case 1:
s_target_width = (s_target_width * 3) / 2; s_target_width = (s_target_width * 3) / 2;
s_target_height = (s_target_height *3) / 2; s_target_height = (s_target_height * 3) / 2;
break; break;
case 2: case 2:
s_target_width *= 2; s_target_width *= 2;

View File

@ -525,7 +525,7 @@ have_texture:
D3DFORMAT bformat = FBManager::GetEFBDepthRTSurfaceFormat(); D3DFORMAT bformat = FBManager::GetEFBDepthRTSurfaceFormat();
if(!bFromZBuffer && g_ActiveConfig.iMultisampleMode > 2) if(!bFromZBuffer && g_ActiveConfig.iMultisampleMode > 0)
{ {
D3D::drawShadedTexQuad(read_texture, D3D::drawShadedTexQuad(read_texture,
&sourcerect, &sourcerect,