mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-21 17:59:50 +00:00
Disable color writing when alpha test always fails.
This commit is contained in:
parent
d26bcb0847
commit
be706a3977
4 changed files with 21 additions and 13 deletions
|
@ -646,10 +646,13 @@ void Renderer::SetColorMask()
|
|||
{
|
||||
// Only enable alpha channel if it's supported by the current EFB format
|
||||
GLenum ColorMask = GL_FALSE, AlphaMask = GL_FALSE;
|
||||
if (bpmem.blendmode.colorupdate)
|
||||
ColorMask = GL_TRUE;
|
||||
if (bpmem.blendmode.alphaupdate && (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24))
|
||||
AlphaMask = GL_TRUE;
|
||||
if (bpmem.alpha_test.TestResult() != AlphaTest::FAIL)
|
||||
{
|
||||
if (bpmem.blendmode.colorupdate)
|
||||
ColorMask = GL_TRUE;
|
||||
if (bpmem.blendmode.alphaupdate && (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24))
|
||||
AlphaMask = GL_TRUE;
|
||||
}
|
||||
glColorMask(ColorMask, ColorMask, ColorMask, AlphaMask);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue