Which texel value is returned during Point sampling of the texture when more than one texels are at the equal distance?
Which texel value is returned during Point sampling of the texture when more than one texels are at the equal distance? Which texel value is returned by the sampler during Point/Nearest neighbor sampling when more than one texels are at the equal distance? Eg: In this case (after magnification) where for many pixels (or texture coordinates), 2 texels are at the same distance from its center. Which texel will be returned for the sampling of these pixels. black dots = center of the pixel yellow dots = center of the texel 1 Answer 1 From the OpenGL Wiki: If GL_NEAREST is used, then the implementation will select the texel nearest the texture coordinate So ultimately, the graphics card vendor decides what they consider the nearest texel. A possible formula multiplies the texture coordinates by the image width / image height and rounds it down to get the texel index. (i, j) = floor(uv * (width, height)),...