- _mm_rcp_ps may be faster but its precision is too poor

This commit is contained in:
Magnus Norddahl 2018-11-29 00:17:40 +01:00
parent 4ee7cf2de1
commit fa185693d2
1 changed files with 1 additions and 1 deletions

View File

@ -528,7 +528,7 @@ void StepSpan(int y, int x0, int x1, const TriDrawTriangleArgs *args, PolyTriang
for (int x = x0; x < x1; x += 4) for (int x = x0; x < x1; x += 4)
{ {
__m128 rcp_posW = _mm_rcp_ps(mposW); __m128 rcp_posW = _mm_div_ps(_mm_set1_ps(1.0f), mposW); // precision of _mm_rcp_ps(mposW) is terrible!
if (OptT::Flags & SWOPT_DynLights) if (OptT::Flags & SWOPT_DynLights)
{ {