Texture as data in shader has odd behavior

Try using texelFetch() with integer coordinates instead of texture2D() using texture coordinates. texelFetch doesn’t interpolate the texture data.

https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/texelFetch.xhtml

1 Like