fix alpha testing for texture format 7

This commit is contained in:
Ian Curtis 2016-05-22 19:17:15 +00:00
parent 65d6342947
commit c5ce2b9679

View file

@ -896,6 +896,11 @@ void CNew3D::CacheModel(Model *m, const UINT32 *data)
if (ph.TexEnabled()) {
currentMesh->format = m_texSheet.GetTexFormat(ph.TexFormat(), ph.AlphaTest());
if (currentMesh->format == 7) {
currentMesh-> alphaTest = false; // alpha test is a 1 bit test, this format needs a lower threshold, since it has 16 levels of transparency
}
currentMesh->x = ph.X();
currentMesh->y = ph.Y();
currentMesh->width = ph.TexWidth();