[ATTACH=CONFIG]1447[/ATTACH] [ATTACH=CONFIG]1448[/ATTACH]
On the first image it is present the result when I am using GL_UNSIGNED_BYTE:
glVertexAttribPointer(texcoord_attrib_index, 2, GL_UNSIGNED_BYTE, GL_TRUE, 0, NULL);
...
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture.w, texture.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture.data);
glGenerateMipmap(GL_TEXTURE_2D);
When I am using UV coordinates with GL_FLOAT [0.0 - 1.0] - it is all ok (second image), and GPU cutting textures from the image correctly. But when I am using GL_UNSIGNED_BYTE format [0 - 255] I can’t cut image textured fragment exactly at the pixel boundary. What is wrong?