mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 00:28:56 +00:00
Vulkan: Clear alpha channel to 0 when pixel format has no alpha channel
This commit is contained in:
parent
8e506cb974
commit
d1dd910f17
1 changed files with 3 additions and 2 deletions
|
@ -345,9 +345,10 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool color_enable, bool alpha
|
||||||
bpmem.zcontrol.pixel_format == PEControl::RGB8_Z24 ||
|
bpmem.zcontrol.pixel_format == PEControl::RGB8_Z24 ||
|
||||||
bpmem.zcontrol.pixel_format == PEControl::Z24)
|
bpmem.zcontrol.pixel_format == PEControl::Z24)
|
||||||
{
|
{
|
||||||
// Force alpha writes, and set the color to 0xFF.
|
// Force alpha writes, and clear the alpha channel. This is different to the other backends,
|
||||||
|
// where the existing values of the alpha channel are preserved.
|
||||||
alpha_enable = true;
|
alpha_enable = true;
|
||||||
color |= 0xFF000000;
|
color &= 0x00FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert RGBA8 -> floating-point values.
|
// Convert RGBA8 -> floating-point values.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue