mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-13 03:29:11 +00:00
ClearScreen fixes:
- Clear alpha channel to 0xFF instead of 0x00 whenever we (re-)create the EFB texture - Disable color/alpha channels whenever the actual EFB format doesn't use them Fixes issue 2826. Fixes issue 1879. Please check if issue 3014 is fixed now, as well as any other games which might have broken due to ClearScreen changes. For what it's worth, Super Mario Sunshine still shows a small glitch even with these changes. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6635 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
38e80fe094
commit
6087987f85
4 changed files with 48 additions and 17 deletions
|
@ -662,8 +662,11 @@ bool Renderer::SetScissorRect()
|
|||
void Renderer::SetColorMask()
|
||||
{
|
||||
// Only enable alpha channel if it's supported by the current EFB format
|
||||
GLenum ColorMask = (bpmem.blendmode.colorupdate) ? GL_TRUE : GL_FALSE;
|
||||
GLenum AlphaMask = (bpmem.blendmode.alphaupdate && (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24)) ? GL_TRUE : GL_FALSE;
|
||||
GLenum ColorMask = GL_FALSE, AlphaMask = GL_FALSE;
|
||||
if (bpmem.blendmode.colorupdate && (bpmem.zcontrol.pixel_format == PIXELFMT_RGB8_Z24 || bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 || bpmem.zcontrol.pixel_format == PIXELFMT_RGB565_Z16))
|
||||
AlphaMask = GL_TRUE;
|
||||
if (bpmem.blendmode.alphaupdate && (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24))
|
||||
ColorMask = GL_TRUE;
|
||||
glColorMask(ColorMask, ColorMask, ColorMask, AlphaMask);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue