View Full Version : Bitmap as texture
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?
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)
thank you Moz, but I can't access this site.
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.
I've changed de last parameter of glTexParameteri from GL_LINEAR to GL_NEAREST and it worked.
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
Thank you, again
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.