Did some optimizations on the occlusion querying.