3D: keep the rasterizer from accidentally going out of bounds when given very flat X-major edge slopes.

this, by a fucking shitshow of butterfly effect, ends up fixing #234. technically, the rasterizer was going out of bounds, which, under certain circumstances, caused interpolation to shit itself and generate Z values that were out of range (but still ended up in the zbuffer). sometimes those values ended up negative, which caused these glitches when polygons had to be drawn over those.

about fucking time.
This commit is contained in:
StapleButter
2018-11-04 23:21:58 +01:00
parent fb284f33ad
commit b4165cc0a9
7 changed files with 165 additions and 14 deletions

View File

@ -87,6 +87,13 @@ typedef struct
} Timer;
typedef struct
{
u8* Mem;
u32 Mask;
} MemRegion;
// hax
extern u32 IME[2];
extern u32 IE[2];
@ -157,6 +164,8 @@ void ARM9Write8(u32 addr, u8 val);
void ARM9Write16(u32 addr, u16 val);
void ARM9Write32(u32 addr, u32 val);
bool ARM9GetMemRegion(u32 addr, bool write, MemRegion* region);
u8 ARM7Read8(u32 addr);
u16 ARM7Read16(u32 addr);
u32 ARM7Read32(u32 addr);
@ -164,6 +173,8 @@ void ARM7Write8(u32 addr, u8 val);
void ARM7Write16(u32 addr, u16 val);
void ARM7Write32(u32 addr, u32 val);
bool ARM7GetMemRegion(u32 addr, bool write, MemRegion* region);
u8 ARM9IORead8(u32 addr);
u16 ARM9IORead16(u32 addr);
u32 ARM9IORead32(u32 addr);