I’m trying to draw a simple quad with only one part of a texture used to see how texture mapping works. It’s a 32 by 32 texture and I’m currently just trying to get the left strip of pixels shown.
I first tried to map the texture coordinates with the left X zero and the right X 1/32 (0.03125). This did not work when zoomed in it blended with the pixels to the right and had a dark edge to the left.
I read somewhere that openGL samples pixels from the center, so I tried again with 0 for left X and .5/32 (0.015625) for the right X . This was better, but still had a darker left border.
Finally I got it to work by using .5/32 (0.015625) for both the left and right X coordinates.
To come up with my solution I just messed with numbers until it worked, so I still do not know if I’m doing right. Can anyone explain how to exactly map only parts of a texture. Most tutorials say use zero for left and one for right, but this does not work.