diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-04-11 23:56:36 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2020-04-11 23:56:36 +0200 |
commit | 4c560f3324e68e4aab20f6855ddc1a3f569ca0c7 (patch) | |
tree | 32929e134f26454e72d10c952049148914d89624 /src | |
parent | d412630a49b8fa07dde47c40f0f5f93d68c83f38 (diff) |
GPU3D: swap vin and vout during clipping, giving results that are closer to hardware.
fixes #598 and also fixes #379
Diffstat (limited to 'src')
-rw-r--r-- | src/GPU3D.cpp | 2 | ||||
-rw-r--r-- | src/libui_sdl/MelonCap.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index 52bc10f..1b316d5 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -888,7 +888,7 @@ void StallPolygonPipeline(s32 delay, s32 nonstalldelay) template<int comp, s32 plane, bool attribs> -void ClipSegment(Vertex* outbuf, Vertex* vout, Vertex* vin) +void ClipSegment(Vertex* outbuf, Vertex* vin, Vertex* vout) { s64 factor_num = vin->Position[3] - (plane*vin->Position[comp]); s32 factor_den = factor_num - (vout->Position[3] - (plane*vout->Position[comp])); diff --git a/src/libui_sdl/MelonCap.cpp b/src/libui_sdl/MelonCap.cpp index 6e45bf5..2658b66 100644 --- a/src/libui_sdl/MelonCap.cpp +++ b/src/libui_sdl/MelonCap.cpp @@ -336,8 +336,8 @@ void Update() colA &= mask; colB &= mask; - if (colA == colB) WinBitmapData[(y*768) + x + 512] = 0xFF00FF00; - else WinBitmapData[(y*768) + x + 512] = 0xFFFF0000; + if (colA == colB) WinBitmapData[(y*768) + x + 512] = 0xFF000000;//0xFF00FF00; + else WinBitmapData[(y*768) + x + 512] = 0xFFFFFFFF;//0xFFFF0000; } } |