mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Second Experimental commit:
corrected peek color and peek z to correctly emulate real hardware formats. implements native gamma correction.(i don't own any game that uses this functionality so i will appreciate feedback) i need a lot of feedback in this changes please enjoy git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6664 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -183,7 +183,7 @@ void XFBSource::DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
||||
TextureConverter::DecodeToTexture(xfbAddr, fbWidth, fbHeight, texture);
|
||||
}
|
||||
|
||||
void FramebufferManager::CopyToRealXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc)
|
||||
void FramebufferManager::CopyToRealXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc,float Gamma)
|
||||
{
|
||||
u8* xfb_in_ram = Memory_GetPtr(xfbAddr);
|
||||
if (!xfb_in_ram)
|
||||
@ -193,10 +193,10 @@ void FramebufferManager::CopyToRealXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, c
|
||||
}
|
||||
|
||||
TargetRectangle targetRc = g_renderer->ConvertEFBRectangle(sourceRc);
|
||||
TextureConverter::EncodeToRamYUYV(GetEFBColorTexture(), targetRc, xfb_in_ram, fbWidth, fbHeight);
|
||||
TextureConverter::EncodeToRamYUYV(GetEFBColorTexture(), targetRc, xfb_in_ram, fbWidth, fbHeight,Gamma);
|
||||
}
|
||||
|
||||
void XFBSource::CopyEFB()
|
||||
void XFBSource::CopyEFB(float Gamma)
|
||||
{
|
||||
// Copy EFB data to XFB and restore render target again
|
||||
LPDIRECT3DSURFACE9 Rendersurf = NULL;
|
||||
@ -230,7 +230,8 @@ void XFBSource::CopyEFB()
|
||||
texWidth,
|
||||
texHeight,
|
||||
PixelShaderCache::GetColorCopyProgram( g_ActiveConfig.iMultisampleMode),
|
||||
VertexShaderCache::GetSimpleVertexShader( g_ActiveConfig.iMultisampleMode));
|
||||
VertexShaderCache::GetSimpleVertexShader( g_ActiveConfig.iMultisampleMode),
|
||||
Gamma);
|
||||
|
||||
D3D::RefreshSamplerState(0, D3DSAMP_MINFILTER);
|
||||
D3D::RefreshSamplerState(0, D3DSAMP_MAGFILTER);
|
||||
|
Reference in New Issue
Block a user