From eac7527b9323f9fc88acd6c11071f9c2c27684e4 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Mon, 8 Oct 2018 21:51:43 +0200 Subject: [PATCH] GSdx-d3d: 24bit no alpha channel port from OpenGL. Commit: https://github.com/PCSX2/pcsx2/commit/419dfe054464eeacadd1fb725c1ca8a1687571d4 --- plugins/GSdx/GSRendererDX.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSRendererDX.cpp b/plugins/GSdx/GSRendererDX.cpp index 2f60036f54..673940e7e2 100644 --- a/plugins/GSdx/GSRendererDX.cpp +++ b/plugins/GSdx/GSRendererDX.cpp @@ -512,8 +512,16 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc EmulateTextureShuffleAndFbmask(); + uint8 afix = m_context->ALPHA.FIX; + if (m_ps_sel.dfmt == 1) { + if (m_context->ALPHA.C == 1) + { + // 24 bits no alpha channel so use 1.0f fix factor as equivalent + m_context->ALPHA.C = 2; + afix = 0x00000001; + } // Disable writing of the alpha channel om_bsel.wa = 0; } @@ -647,8 +655,6 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc dev->PSSetShaderResource(1, tex ? tex->m_palette : NULL); dev->PSSetShaderResource(2, rtcopy); - uint8 afix = m_context->ALPHA.FIX; - SetupIA(sx, sy); dev->SetupOM(om_dssel, om_bsel, afix);