Hi,
I found very big precision bug in NVidia’s ForceWare 56.72 drivers. Here is the code:
glBindTexture(GL_TEXTURE_2D, glowtex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, glow_tex_size, glow_tex_size, 0,
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, glow_tex_size, glow_tex_size);
/* clear and so on */
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_TEXTURE_2D);
// ----
glBindTexture(GL_TEXTURE_2D, glowtex);
glColor3f(1, 1, 1);
for(int bias = 0; bias < 12; bias++)
{
glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
GL_TEXTURE_LOD_BIAS_EXT,0.5 + (float)bias);
glBegin(GL_QUADS);
glTexCoord2f( 0, 1);
glVertex2f(0, 0);
glTexCoord2f( 1, 1);
glVertex2f(1, 0);
glTexCoord2f (1, 0);
glVertex2f(1, 1);
glTexCoord2f(0, 0);
glVertex2f(0, 1);
glEnd();
}
I read pixels from screen, then I blur it using LOD_BIAS from SGIS mipmaps.
There is a comparision of the same scene on diffrent drivers.
http://www.czacki.edu.pl/~tweety/precision_bug.jpg
I don’t like 56.72 anymore It causes my program to look awful
You can see that on 56.72 with bias > 8 it puts lighter pixels in the center, and black on the corners, and on 53.03 with bias > 8 it puts grey pixels all over the texture. I think it’s posibble that he has something very, very bad with mipmap generation.
What do you think about this ?
I’m running it on GeForce 4 4200.