Made mipmapping a little less aggressive

This commit is contained in:
Magnus Norddahl 2016-06-27 11:57:27 +02:00
parent 200d357b0d
commit 7a65a0f595
1 changed files with 4 additions and 3 deletions

View File

@ -1147,11 +1147,12 @@ WallscanSampler::WallscanSampler(int y1, float swal, double yrepeat, fixed_t xof
if (r_mipmap && texture->Mipmapped())
{
uint32_t xpos = (uint32_t)((((uint64_t)xoffset) << FRACBITS) / mip_width);
int level = (int)MAX(magnitude - 1.0, 0.0);
while (level != 0)
double texture_bias = 1.7f;
double level = MAX(magnitude - 3.0, 0.0);
while (level > texture_bias)
{
mipmap_offset += mip_width * mip_height;
level >>= 1;
level *= 0.5f;
mip_width = MAX(mip_width >> 1, 1);
mip_height = MAX(mip_height >> 1, 1);
}