From f06a8d5731376ad14c8062354a9abd251ec5c0c0 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 7 Oct 2010 18:20:28 +0000 Subject: [PATCH] fix broken shadows regression in wizard of oz --- desmume/src/rasterize.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/desmume/src/rasterize.cpp b/desmume/src/rasterize.cpp index dcadc9c63..715bb4e77 100644 --- a/desmume/src/rasterize.cpp +++ b/desmume/src/rasterize.cpp @@ -311,6 +311,15 @@ 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) + // + //this code needs to be here for shadows in wizard of oz to work. + switch((val>>6)&3) { case 0: return false; case 1: return backfacing;