From c98f8a96d2d504d6d383a4dec6ec44c254ba41f0 Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Sat, 5 Jun 2010 00:01:18 +0000 Subject: HUGE commit :) in general cleanup and bugfix disable pierre patch for the moment as it causes problem in some games and hopefully fix the remaining missing textures for nvidia users in opengl. make the code in pixelshadergen looks nice and readable. D3D: this is a ultra experimental commit please check for regressions or error. make the efb Scale / super sampling level customizable to improve the output quality and let the user configure quality according to his hardware. is everyone likes this change will translate it to opengl please test git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5612 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_VideoDX9/Src/FramebufferManager.cpp | 32 ++++------------------ 1 file changed, 6 insertions(+), 26 deletions(-) (limited to 'Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp') diff --git a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp index 5a7248bd4d..6149cbde80 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp @@ -325,31 +325,12 @@ void FramebufferManager::copyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight float SuperSampleCompensation = 1.0f; float scaleX = Renderer::GetXFBScaleX(); float scaleY = Renderer::GetXFBScaleY(); - if(g_ActiveConfig.iMultisampleMode > 0 && g_ActiveConfig.iMultisampleMode < 4) - { - switch (g_ActiveConfig.iMultisampleMode) - { - case 1: - break; - case 2: - SuperSampleCompensation = 0.5f; - break; - case 3: - SuperSampleCompensation = 1.0f/3.0f; - break; - default: - break; - }; - } - - scaleX *= SuperSampleCompensation ; - scaleY *= SuperSampleCompensation; TargetRectangle targetSource,efbSource; efbSource = Renderer::ConvertEFBRectangle(sourceRc); - targetSource.top = (sourceRc.top *scaleY); - targetSource.bottom = (sourceRc.bottom *scaleY); - targetSource.left = (sourceRc.left *scaleX); - targetSource.right = (sourceRc.right * scaleX); + targetSource.top = (int)(sourceRc.top *scaleY); + targetSource.bottom = (int)(sourceRc.bottom *scaleY); + targetSource.left = (int)(sourceRc.left *scaleX); + targetSource.right = (int)(sourceRc.right * scaleX); int target_width = targetSource.right - targetSource.left; int target_height = targetSource.bottom - targetSource.top; if (it != m_virtualXFBList.end()) @@ -445,7 +426,6 @@ void FramebufferManager::copyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight D3D::ChangeSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - int SSAAMode = ( g_ActiveConfig.iMultisampleMode > 3 )? 0 : g_ActiveConfig.iMultisampleMode; D3D::drawShadedTexQuad( read_texture, &sourcerect, @@ -453,8 +433,8 @@ void FramebufferManager::copyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight Renderer::GetFullTargetHeight(), target_width, target_height, - PixelShaderCache::GetColorCopyProgram(SSAAMode), - (SSAAMode != 0)? VertexShaderCache::GetFSAAVertexShader() : VertexShaderCache::GetSimpleVertexShader()); + PixelShaderCache::GetColorCopyProgram( g_ActiveConfig.iMultisampleMode), + VertexShaderCache::GetSimpleVertexShader( g_ActiveConfig.iMultisampleMode)); D3D::RefreshSamplerState(0, D3DSAMP_MINFILTER); -- cgit v1.2.3