1. A method to generate optimized shader programs at run-time, comprising: receiving a designated graphics effect from an application at run-time, the designated graphics effect being represented as a mask including a pattern of bits; determining a change in a number or a sequence of instructions of a currently instantiated shader program is needed to perform the designated graphics effect; in response to the determined need, determining whether an optimized shader program capable of performing the designated graphics effect is stored in memory; obtaining the optimized shader program from memory when the optimized shader program is determined to be in memory; preparing the optimized shader program when the optimized shader program is not stored in memory, the preparing of the optimized shader program including: automatically applying the mask to the currently instantiated shader program, removing shader program source instructions of the currently instantiated shader program that fail to correspond to the pattern of bits, designating unremoved shader program source instructions as one or more identified shader program source instructions, and automatically compiling only the one or more identified shader program source instructions to generate the optimized shader program; and executing the optimized shader program.