mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
after a good commit lets make some experiments:
implemented fixed efb scale to improve alignment and discard some error caused by incorrect scale. make both plugins work similar. this must improve opengl image quality a lot. also implemented dynamic resizing in opengl, this way the resolution math the windows resolution on resize. this is highly experimental so please test a lot. implemented shader dumping on error thinking in future experiments with shaders. enjoy :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5458 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -361,26 +361,27 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, boo
|
||||
int tex_w = (abs(source_rect.GetWidth()) >> bScaleByHalf);
|
||||
int tex_h = (abs(source_rect.GetHeight()) >> bScaleByHalf);
|
||||
//compensate the texture grow if supersampling is enabled to conserve memory usage
|
||||
float MultiSampleCompensation = 1.0f;
|
||||
float SuperSampleCompensation = 1.0f;
|
||||
float xScale = Renderer::GetTargetScaleX();
|
||||
float yScale = Renderer::GetTargetScaleY();
|
||||
if(g_ActiveConfig.iMultisampleMode > 0 && g_ActiveConfig.iMultisampleMode < 4)
|
||||
{
|
||||
switch (g_ActiveConfig.iMultisampleMode)
|
||||
{
|
||||
case 1:
|
||||
MultiSampleCompensation = 2.0f/3.0f;
|
||||
break;
|
||||
case 2:
|
||||
MultiSampleCompensation = 0.5f;
|
||||
SuperSampleCompensation = 0.5f;
|
||||
break;
|
||||
case 3:
|
||||
MultiSampleCompensation = 1.0f/3.0f;
|
||||
SuperSampleCompensation = 1.0f/3.0f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
int Scaledtex_w = (g_ActiveConfig.bCopyEFBScaled)?((int)(Renderer::GetTargetScaleX() * MultiSampleCompensation * tex_w)):tex_w;
|
||||
int Scaledtex_h = (g_ActiveConfig.bCopyEFBScaled)?((int)(Renderer::GetTargetScaleY() * MultiSampleCompensation * tex_h)):tex_h;
|
||||
int Scaledtex_w = (g_ActiveConfig.bCopyEFBScaled)?((int)(xScale * SuperSampleCompensation * tex_w)):tex_w;
|
||||
int Scaledtex_h = (g_ActiveConfig.bCopyEFBScaled)?((int)(yScale * SuperSampleCompensation * tex_h)):tex_h;
|
||||
|
||||
TexCache::iterator iter;
|
||||
LPDIRECT3DTEXTURE9 tex = NULL;
|
||||
|
Reference in New Issue
Block a user