From: Brian P. <br...@va...> - 2001-01-05 21:12:16
|
Abaco wrote: > > Hi, > > I´m sitting here in an internet-shop in Spain, so if you won´t be able to > mail me, for now. But monday I´m back in the Netherlands. > > I think an error exists in the function _swrast_choose_texture_sample_func > in the file src/swrast/s_texture.c. > > Instead of > > if (needLambda) { > /* Compute min/mag filter threshold */ > if (t->MagFilter==GL_LINEAR > && (t->MinFilter==GL_NEAREST_MIPMAP_NEAREST || > t->MinFilter==GL_LINEAR_MIPMAP_NEAREST)) { > swrast->_MinMagThresh[texUnit] = 0.5F; > } > > it should be > > if (needLambda) { > /* Compute min/mag filter threshold */ > if ((t->MagFilter==GL_LINEAR && > t->MinFilter==GL_LINEAR_MIPMAP_NEAREST) || > (t->MagFilter==GL_NEAREST && > t->MinFilter==GL_NEAREST_MIPMAP_NEAREST)) { > swrast->_MinMagThresh[texUnit] = 0.5F; > } See section 3.8.6 of the 1.2 spec. It says if the mag filter is GL_LINEAR and (min filter is GL_NEAREST_MIPMAP_NEAREST or min filter is GL_NEAREST_MIPMAP_LINEAR) then c = 0.5, else it's 0. Note that Mesa is indeed wrong, but not in the way you point out. I should replace GL_LINEAR_MIPMAP_NEAREST with GL_NEAREST_MIPMAP_LINEAR. I'm wonder if that got changed from the 1.0 spec at one point. -Brian |