Version with using texture memory.