rasterize: remove a recent depth buffering regression in advance wars tile rendering

This commit is contained in:
zeromus 2009-06-21 06:26:09 +00:00
parent 642cbae742
commit 83d9d24747
2 changed files with 5 additions and 2 deletions

View File

@ -53,7 +53,10 @@
inline u32 gfx3d_extendDepth_15_to_24(u32 depth)
{
//formula from http://nocash.emubase.de/gbatek.htm#ds3drearplane
return (depth*0x200)+((depth+1)>>15)*0x01FF;
//return (depth*0x200)+((depth+1)>>15)*0x01FF;
//but this is identical for values 0..0x7FFF. prove it to yourself with brute force.
//i think this isnt right since we can't get up to 0x00FFFFFF
return depth<<9;
}
#define TEXMODE_NONE 0

View File

@ -501,7 +501,7 @@ static FORCEINLINE void pixel(int adr,float r, float g, float b, float invu, flo
}
else
{
if(depth>=destFragment.depth+1)
if(depth>=destFragment.depth)
{
goto depth_fail;
}