From 094af17674a22d899168f669c371d6f4de863c3f Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Sat, 17 Aug 2024 23:33:49 -0400 Subject: [PATCH] vectors need to be 64 bit or alternatively we might need to normalize them somehow? --- src/GPU3D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index ade5c417..b6018a75 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -980,8 +980,8 @@ void GPU3D::SubmitPolygon() noexcept // setup vectors for v0->v2 and v1->v2, with w serving as the z axis - s32 vector0[3] = { v0->Position[0] - v2->Position[0], v0->Position[1] - v2->Position[1], v0->Position[3] - v2->Position[3] }; - s32 vector1[3] = { v1->Position[0] - v2->Position[0], v1->Position[1] - v2->Position[1], v1->Position[3] - v2->Position[3] }; + s64 vector0[3] = { (s64)v0->Position[0] - v2->Position[0], (s64)v0->Position[1] - v2->Position[1], (s64)v0->Position[3] - v2->Position[3] }; + s64 vector1[3] = { (s64)v1->Position[0] - v2->Position[0], (s64)v1->Position[1] - v2->Position[1], (s64)v1->Position[3] - v2->Position[3] }; // if either vector is entirely 0, the polygon is accepted, and the front facing flag is set for the rasterizer if (((vector0[0] | vector0[1] | vector0[2]) == 0) || ((vector1[0] | vector1[1] | vector1[2]) == 0))