In the last months i made two tutorials about phong shading in portuguese (here and here).
I developed two XNA 4.0 samples showing how to build (in hlsl) points, spot and directional lights. As a bonus, i also added some others cool stuffs in the projects =P Check it =P. All samples uses the PloobsEngine as a base.
The Links for download are:
The samples uses the PlobosEngine, but you can EASILY reuse the hlsl light shaders. The project was made for a tutorial, so it is not optimized.
You can do wherever you want with the code sample =P
ScreenShots:



Related posts:









[...] Comp Gráfica Tutoriais « XNA Point,Spot and Directional Light Samples [...]
[...] the same of the commom spot lights shaders, the only difference is the Soft shadow term. (Check our sample about light types without shadow [...]