thread for terrain rendering