I've put some general information about how to use sun light, dynamic lights, and fog in HLSL shaders on the Wiki:

http://www.conitecserver.com/wiki/index.php/ShaderHints