Added 2D texture CPU sampling functionality.