This is explained at the begining of the shader code I posted. Also don't forget to resave the textures as bmp files (rgb-mode...also the shadowmap) with InfranView or windows paint. If you still got problems, read the whole thread once more and you'll manage