Fixed shadow counting on the terrain.