diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index e26614d285..4fa96379ac 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -997,9 +997,10 @@ void DrawTriangleSlice( Vec4 texcolor_tr = Vec4::FromRGBA(SampleNearest(texlevel, u[1], v[1], tptr, bufwbits)); Vec4 texcolor_bl = Vec4::FromRGBA(SampleNearest(texlevel, u[2], v[2], tptr, bufwbits)); Vec4 texcolor_br = Vec4::FromRGBA(SampleNearest(texlevel, u[3], v[3], tptr, bufwbits)); - Vec4 t = texcolor_tl * (0xff - frac_u) + texcolor_tr * frac_u; - Vec4 b = texcolor_bl * (0xff - frac_u) + texcolor_br * frac_u; - texcolor = (t * (0xff - frac_v) + b * frac_v) / (256 * 256); + // 0x100 causes a slight bias to tl, but without it we'd have to divide by 255 * 255. + Vec4 t = texcolor_tl * (0x100 - frac_u) + texcolor_tr * frac_u; + Vec4 b = texcolor_bl * (0x100 - frac_u) + texcolor_br * frac_u; + texcolor = (t * (0x100 - frac_v) + b * frac_v) / (256 * 256); } Vec4 out = GetTextureFunctionOutput(prim_color_rgb, prim_color_a, texcolor); prim_color_rgb = out.rgb();