View Full Version : Bitmap as texture

02-08-2001, 05:50 AM
Hi! Can someone help me, please?

I have to display many textures side by side to form a big image, but the result isn't good. In the edge of each texture appears a shadow. How can I eliminate it?


02-08-2001, 06:01 AM
Looks like a job for texture borders.
Lucky you, that's in the red book : http://helios.scripps.edu/ebt-bin/nph-in..._RESTART_N%25#X (http://helios.scripps.edu/ebt-bin/nph-infosrch/infosrch/SGI_Developer/OpenGL_PG/@ebt-link;pt=17743?target=%25N%15_18810_START_RESTART_N %25#X)

02-08-2001, 06:45 AM
thank you Moz, but I can't access this site.

Michael Steinberg
02-08-2001, 11:23 AM
That is due to bilinear interpolation at the edges of the texture. An easy way of making a fix is to shrink the texture 1 pixel in every 4 directions and duplicate any pixel at the outer rectangle. Then don't give tex coords from the edges but give them moved 1 pixel diagonaly to the opposing corner.

02-09-2001, 02:57 AM
Thanks, folks

I've changed de last parameter of glTexParameteri from GL_LINEAR to GL_NEAREST and it worked.


Thank you, again