AnalyticalGraphicsInc/cesium — pull request #1144 by pjcozzi (2013-09-12 19:29:29+00:00)
Title: Graphics performance improvements

Various render and central body changes that improve performance for scenes that need to execute lots of draw commands. Using the Everest view in the Sandcastle terrain example, I had the following results on my MacBook Pro (12-18 fps on an already high fps):
```
Original sampler uniform CB FS #defines mergeUniforms
-------- --------------- -------------- -------------
fps 135-140 143-147 150-152 152-153
```

* sampler uniform - factored out `uniform1i` calls for samplers per command - completely dropped `uniform1i` from profile (> 1%).
* CB FS #defines - avoid setting several unused uniform float arrays - dropped `uniform1f` from 4.7% to 2% in the profile.
* mergeUniforms - factored out calling `mergeUniforms` per tile - completely dropped `mergeUniforms` from profile (0.5%).
* null program & texture binds - removed per-command calls to bind the current program and textures to null - no noticeable improvement, but it reduced a lot of WebGL calls.