OK, I made a first version of it now. I still have to look what can be made better and more efficient
and maybe some adittional features (if you're still missing something) - but not today.
here's the code.
Have a look at the first 45 lines.
At the moment the SunColor is used as AmbientColor and FogColor.
The Spotlight arc is static for all lights (but it's adjustable).
And please say if you can find any bugs.
EDIT: Another thing:
The shader uses PixelShader 3.0, It doesn't work with lower versions
keep in mind that people need at least a DirectX 9.0c graphics card to use it.
Well... - even my grandma's PC has got a DX9.0c card... but you might add this to the
minimum system requirements if you're working on something commercial.