gsdx ogl: trigger the special RW framebuffer shader when only Alpha is written (#1588)

* gsdx ogl: trigger the special RW framebuffer shader when only Alpha is written

It will work for both Jak and Ratchet&Clank and without CRC
This commit is contained in:
Gregory Hainaut 2016-09-25 10:05:44 +02:00 committed by GitHub
parent 6e2bf98d5f
commit 6c6ed5f443
3 changed files with 2 additions and 11 deletions

View File

@ -515,12 +515,6 @@ CRC::Game CRC::m_games[] =
{0XE1BF5DCA, SuperManReturns, US, 0},
{0x06A7506A, SacredBlaze, JP, 0},
{0x4CE7FB04, ItadakiStreet, JP, 0},
{0x9C712FF0, Jak1, EU, 0},
{0x472E7699, Jak1, US, 0},
{0x2479F4A9, Jak2, EU, 0},
{0x12804727, Jak3, EU, 0},
{0x644CFD03, Jak3, US, 0},
{0xDF659E77, JakX, EU, 0},
};
map<uint32, CRC::Game*> CRC::m_map;

View File

@ -175,10 +175,6 @@ public:
SacredBlaze,
SuperManReturns,
ItadakiStreet,
Jak1,
Jak2,
Jak3,
JakX,
TitleCount,
};

View File

@ -1155,7 +1155,8 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
// Always check if primitive overlap. The function will return PRIM_OVERLAP_UNKNOW for non sprite primitive
m_prim_overlap = PrimitiveOverlap();
if ((m_context->FRAME.Block() == m_context->TEX0.TBP0) && PRIM->TME && m_sw_blending && (m_prim_overlap != PRIM_OVERLAP_NO) && (m_vertex.next > 2)) {
if (m_game.title == CRC::Jak1 || m_game.title == CRC::Jak2 || m_game.title == CRC::Jak3 || m_game.title == CRC::JakX) {
if (m_context->FRAME.FBMSK == 0x00FFFFFF) {
// Ratchet & Clank / Jak uses this pattern to compute the shadows. Alpha (multiplication) tfx is mostly equivalent to -1/+1 stencil operation
GL_INS("ERROR: Source and Target are the same! Let's sample the framebuffer");
m_ps_sel.tex_is_fb = 1;
m_require_full_barrier = true;