Skip to content

Commit

Permalink
GSdx-d3d: 24bit no alpha channel port from OpenGL.
Browse files Browse the repository at this point in the history
Commit:

419dfe0
  • Loading branch information
lightningterror committed Oct 9, 2018
1 parent 54ddf5b commit eac7527
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/GSdx/GSRendererDX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit eac7527

Please sign in to comment.