LLK/scratch-flash — pull request #516 by cwillisf (2014-10-24 21:46:21+00:00)
Title: Minimal shader

DisplayObjectContainerIn3D will now build a shader that supports only those effects currently in use, reducing the number of shader instructions executed for each pixel/fragment in most cases.
The first time a particular set of effects is encountered a new shader will be built for that combination. Each shader built in this manner is cached, so that returning to a previous effect configuration will not require building a shader.
The cache is flushed if the device context is lost. In that case the cache will be rebuilt on demand, just as it was the first time around.