fix distance selection for mip level

This commit is contained in:
Denis Pauk 2019-06-05 22:50:50 +03:00
parent a2af07c9fc
commit 65888e6b9b
2 changed files with 4 additions and 12 deletions

View File

@ -43,9 +43,7 @@ D_ViewChanged
static void
D_ViewChanged (void)
{
scale_for_mip = xscale;
if (yscale > xscale)
scale_for_mip = yscale;
scale_for_mip = sqrt(xscale*xscale + yscale*yscale);
d_pix_min = r_refdef.vrect.height / 240;
if (d_pix_min < 1)

View File

@ -494,15 +494,9 @@ Mod_LoadTexinfo (lump_t *l)
}
len1 = VectorLength (out->vecs[0]);
len2 = VectorLength (out->vecs[1]);
len1 = (len1 + len2)/2;
if (len1 < 0.32)
out->mipadjust = 4;
else if (len1 < 0.49)
out->mipadjust = 3;
else if (len1 < 0.99)
out->mipadjust = 2;
else
out->mipadjust = 1;
out->mipadjust = sqrt(len1*len1 + len2*len2);
if (out->mipadjust < 0.01)
out->mipadjust = 0.01;
out->flags = LittleLong (in->flags);