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?
Thanks,
Henrique
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?
Thanks,
Henrique
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
thank you Moz, but I can’t access this site.
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.
Thanks, folks
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