Custom shaders support

Added some code to support custom shaders.