Here is an example (look under step 4):

http://manual.3dgamestudio.net/WED_shaderguide.htm