AnalyticalGraphicsInc/cesium — pull request #561 by kring (2013-03-11 20:29:51+00:00)
Title: Render just one texture per tile per layer

This is a fairly significant refactoring of the terrain/imagery system to render just one texture per layer per tile. Previously, one or more imagery textures would be sampled in the central body fragment shader, adding significantly to the complexity and and possibly the memory bandwidth requirements of that shader.

These changes yield a decent performance improvement. Here's what I saw on my desktop in the various views in the Terrain Sandcastle demo:

View	Before (FPS)	After (FPS)

Default	105	112

Everest	86	91

Half Dome	69	74

San Francisco Bay	53	59

I'll update this with numbers on a mobile device or two shortly.

In addition to the significant but not huge performance improvement, these changes put us in a better position to refine down through the tile hierarchy without waiting at each level for the tiles to load, which will create a much better experience in apps where the camera starts zoomed in close to the Earth. This pull request doesn't go all the way there yet, though.