https://developer.download.nvidia.com/CgTutorial/cg_tutorial...
Granted, Cg is now just a curiousity in the context of shading languages, it is nevertheless interesting to read.