1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix alpha compare for cycleType == G_CYC_COPY.

Fixed weird background texrects in Mario Golf intro.
This commit is contained in:
Sergey Lipskiy 2014-12-16 20:43:18 +06:00
parent 7ca20f8a42
commit 284f5ca7b1

View File

@ -826,6 +826,14 @@ void ShaderCombiner::updateAlphaTestInfo(bool _bForce) {
if (gDP.otherMode.cycleType == G_CYC_FILL) {
_setIUniform(m_uniforms.uEnableAlphaTest, 0, _bForce);
_setFUniform(m_uniforms.uAlphaTestValue, 0.0f, _bForce);
} else if (gDP.otherMode.cycleType == G_CYC_COPY) {
if (gDP.otherMode.alphaCompare == G_AC_THRESHOLD) {
_setIUniform(m_uniforms.uEnableAlphaTest, 1, _bForce);
_setFUniform(m_uniforms.uAlphaTestValue, 0.5f, _bForce);
} else {
_setIUniform(m_uniforms.uEnableAlphaTest, 0, _bForce);
_setFUniform(m_uniforms.uAlphaTestValue, 0.0f, _bForce);
}
} else if ((gDP.otherMode.alphaCompare == G_AC_THRESHOLD) && !(gDP.otherMode.alphaCvgSel)) {
_setIUniform(m_uniforms.uEnableAlphaTest, 1, _bForce);
_setFUniform(m_uniforms.uAlphaTestValue, gDP.blendColor.a, _bForce);