Skip to content

Commit

Permalink
gsdx ogl: trigger the special RW framebuffer shader when only Alpha i…
Browse files Browse the repository at this point in the history
…s 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
  • Loading branch information
gregory38 committed Sep 25, 2016
1 parent 6e2bf98 commit 6c6ed5f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
6 changes: 0 additions & 6 deletions plugins/GSdx/GSCrc.cpp
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions plugins/GSdx/GSCrc.h
Expand Up @@ -175,10 +175,6 @@ class CRC
SacredBlaze,
SuperManReturns,
ItadakiStreet,
Jak1,
Jak2,
Jak3,
JakX,
TitleCount,
};

Expand Down
3 changes: 2 additions & 1 deletion plugins/GSdx/GSRendererOGL.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 6c6ed5f

Please sign in to comment.