rasterize: another fix for shadows. fixes most, if not all, of the recently broken shadows.

This commit is contained in:
zeromus 2009-08-02 08:18:13 +00:00
parent f1fa6973ab
commit 573f321508
1 changed files with 7 additions and 0 deletions

View File

@ -198,6 +198,13 @@ struct PolyAttr
bool isVisible(bool backfacing)
{
//this was added after adding multi-bit stencil buffer
//it seems that we also need to prevent drawing back faces of shadow polys for rendering
u32 mode = (val>>4)&0x3;
if(mode==3 && polyid !=0) return !backfacing;
//another reasonable possibility is that we should be forcing back faces to draw (mariokart doesnt use them)
//and then only using a single bit buffer (but a cursory test of this doesnt actually work)
switch((val>>6)&3) {
case 0: return false;
case 1: return backfacing;