Shaders often need to store data persistently. Init shaders may construct tables, preprocess parameters, or prepare other data that is common to all future shader calls and can be done once, in advance, instead of repeating the computation for every shader call. This can improve performance significantly if a shader is called millions of times for rendering a frame. There are three classes of storage: constant data, per-instance data, and per-thread data.
Copyright © 1986-2008 by mental images GmbH