Speeds up terrain rendering with caching