Added acceleration structure caching.