check index range on texture