update terrain sample.