Added material class and parameters for choosing between pixel and fragment shaders.