From 345328d34d998d67ac89305f849c4c09eabc2bdb Mon Sep 17 00:00:00 2001 From: fleroviux Date: Thu, 18 Jan 2024 01:15:18 +0100 Subject: [PATCH] Slight cleanup --- .../src/nds/video_unit/gpu/renderer/software/rasterizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dual/src/nds/video_unit/gpu/renderer/software/rasterizer.cpp b/src/dual/src/nds/video_unit/gpu/renderer/software/rasterizer.cpp index e4ab555..a0254b0 100644 --- a/src/dual/src/nds/video_unit/gpu/renderer/software/rasterizer.cpp +++ b/src/dual/src/nds/video_unit/gpu/renderer/software/rasterizer.cpp @@ -65,7 +65,7 @@ namespace dual::nds::gpu { const i32 x = (i32)(((( (i64)position.X().Raw() + w) * viewport.width + 0x800) / two_w) + viewport.x0); const i32 y = (i32)((((-(i64)position.Y().Raw() + w) * viewport.height + 0x800) / two_w) + viewport.y0); - const u32 depth = (u32)std::clamp(((((i64)position.Z().Raw() << 14) / (u32)w + 0x3FFF) << 9), 0ll, 0xFFFFFFll); + const u32 depth = (u32)std::clamp(((((i64)position.Z().Raw() << 14) / w + 0x3FFF) << 9), 0ll, 0xFFFFFFll); points[i] = Edge::Point{x, y, depth, (i32)w, vertex};