diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 07cb32f585..ad8c00d341 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -1896,6 +1896,7 @@ struct GSFrameInfo uint32 FBMSK; uint32 TBP0; uint32 TPSM; + uint32 TZTST; bool TME; }; @@ -2290,9 +2291,10 @@ bool GSC_GodOfWar(const GSFrameInfo& fi, int& skip) { skip = 1; // blur } - } - else - { + else if(fi.FBP == 0x00000 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT8 && ((fi.TZTST == 2 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 1 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 3 && fi.FBMSK == 0xFF000000))) + { + skip = 1; // wall of fog + } } return true; @@ -2482,6 +2484,7 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) fi.TME = PRIM->TME; fi.TBP0 = m_context->TEX0.TBP0; fi.TPSM = m_context->TEX0.PSM; + fi.TZTST = m_context->TEST.ZTST; static GetSkipCount map[CRC::TitleCount]; static bool inited = false; diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index b4d8f7e1ae..1850135ed4 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -423,9 +423,18 @@ void GSTextureCache::InvalidateLocalMem(const GSOffset* o, const GSVector4i& r) } else { - m_dst[RenderTarget].erase(j); - - delete t; + if (psm == PSM_PSMT4HH && t->m_TEX0.PSM == PSM_PSMCT32) + { + // Silent Hill Origins shadows: Read 8 bit using only the HIGH bits (4 bit) texture as 32 bit. + Read(t, r.rintersect(t->m_valid)); + return; + } + else + { + //printf("Trashing render target. We have a %d type texture and we are trying to write into a %d type texture\n", t->m_TEX0.PSM, psm); + m_dst[RenderTarget].erase(j); + delete t; + } } } }