gsdx-ogl-wnd:

* properly set the stencil write mask
* Multiply Y coodinates by -1. Let's hope it fixes shadows gliches.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5656 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2013-06-12 20:57:16 +00:00
parent 041bf4cee6
commit 382258ec03
2 changed files with 7 additions and 4 deletions

View File

@ -209,8 +209,11 @@ public:
uint32 ref = sref;
if (m_stencil_enable) {
glEnable(GL_STENCIL_TEST);
// Note: here the mask control which bitplane is considered by the operation
glStencilFunc(m_stencil_func, ref, m_stencil_mask);
glStencilOp(m_stencil_sfail_op, m_stencil_spass_dfail_op, m_stencil_spass_dpass_op);
// Control which stencil bitplane are written
glStencilMask(m_stencil_mask);
} else
glDisable(GL_STENCIL_TEST);
}

View File

@ -238,10 +238,10 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
{GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(src.x, src.w)},
{GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(src.z, src.w)},
#else
{GSVector4(dst.x, -dst.w, 0.5f, 1.0f), GSVector2(src.x, src.y)},
{GSVector4(dst.z, -dst.w, 0.5f, 1.0f), GSVector2(src.z, src.y)},
{GSVector4(dst.x, -dst.y, 0.5f, 1.0f), GSVector2(src.x, src.w)},
{GSVector4(dst.z, -dst.y, 0.5f, 1.0f), GSVector2(src.z, src.w)},
{GSVector4(dst.x, dst.y, 0.5f, 1.0f), GSVector2(src.x, src.y)},
{GSVector4(dst.z, dst.y, 0.5f, 1.0f), GSVector2(src.z, src.y)},
{GSVector4(dst.x, dst.w, 0.5f, 1.0f), GSVector2(src.x, src.w)},
{GSVector4(dst.z, dst.w, 0.5f, 1.0f), GSVector2(src.z, src.w)},
#endif
};
//fprintf(stderr, "DATE A:%fx%f B:%fx%f\n", dst.x, -dst.y, dst.z, -dst.w);