diff options
| author | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-06-05 00:01:18 +0000 |
|---|---|---|
| committer | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-06-05 00:01:18 +0000 |
| commit | c98f8a96d2d504d6d383a4dec6ec44c254ba41f0 (patch) | |
| tree | 8a1493a56a5259b09643e541bb359e22e4594ac6 /Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp | |
| parent | 63dbcf4f97c89819f61b8709d77546e525769bed (diff) | |
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
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoDX9/Src/FramebufferManager.cpp | 32 |
1 files changed, 6 insertions, 26 deletions
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); |
