Texture as data in shader has odd behavior

If i use the nearest interpolation i get the right values but i dont know how can i make it work with a graphic