On Sat, 28 Aug 1999, Thor Henning Amdahl wrote:

> 
> I have found a bug with mip-map texturing only present using Voodoo 
> hardware. If you use the X11 driver everything is OK. Also if you use
> other than mip-map type filtering for GL_TEXTURE_MIN_FILTER the bug
> disapear.
 
> To see the problem use this version of texobj.c. The right quad texture
> gets distorted when the texture scale is very big.

It's not really a bug.

The registers inside the hardware that hold the current
texture coordinates are floating point - and have rather
limited precision.  Hence, when the absolute value of
a texture coordinate gets big, it's precision gets worse.
(That's just how floating point works.)

Software Mesa (the "X11 driver") will probably be using
full-up C 'float' precision (22 bits - excluding exponents 
and sign bits) and will therefore be unlikely to show
this problem unless you push it very hard.

I'd expect this to be present in all filtering modes - but
I can perhaps explain you findings since any jitter would
be more noticable when NEAREST modes are selected because
that hard texel edge jitters around more obviously than a
soft blended edge.

Anyway, this is something that you just have to learn to
live with on cheap hardware.  It's also possible to see
it on really expensive hardware too. I first saw it on
an SGI RE2 - but you need a MUCH larger set of texture
coordinates before it becomes obvious on that hardware.

I believe someone one told me that the Voodoo-1's texture
registers were something pathetic like 14 bits or so (I
could be wrong about that)...Voodoo-3 may not be much better,
I don't know.

With 256x256 maps, you'll need at least 8 bits of fractional
precision just to address the right texel - you'll need more than
that to stop it jittering to an acceptable degree. That means
that using even 6 bits of integer is certainly going to look
terrible. So with a coordinate up at around 64, you'd expect to
see the texture jumping back and forth by a whole texel. However,
even at a value of only 4 or so, you'll see some movement if
you zoom right up to the texture so that the individual texels
are big.

You get what you pay for I'm afraid.  Try to keep your
texture coordinates as small as possible - especially
on large maps and with GL_NEAREST filtering modes.

Steve Baker                (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc.      (817)619-2466 (Fax)
Work: [EMAIL PROTECTED]      http://www.hti.com
Home: [EMAIL PROTECTED] http://web2.airmail.net/sjbaker1



_______________________________________________
Mesa-dev maillist  -  [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev

Reply via email to