Hi ,

I am trying to render texture to FBO with larger than original size.
I dont want OpenGL to apply any type of filtering in order to fit my new FBO size.

I did following after I load my texture after I loaded my texture.

glTexParameterf(m_textureTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(m_textureTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

My understanding was this should disable texture filtering but I am confused because
difference between texelFetch() and texture2D() sampling functions I use in my shader.

As per my knowledge texture2D() internally applies some filtering while fetching texel.
So my question is as I have added GL_NEAREST will usage of texture2D() is safe? ( by safe I mean can I be sure texture2D() function will not do any filtering by itself?)


should I just use texelFetch() to sample my texture ?