The first part of the project I attempted was to implement sufficient lighting. I started off by implementing flat shading. This was relatively simple and was just an easy way of getting used to using HLSL and the intricacies that go along with it such as structure packing. After flat shading I implemented Gouraud shading with ambient, diffuse and specular light. Finally, I implemented Phong shading which was just a case of moving the calculations taking place from the vertex shader to the pixel shader, so calculations are carried out on a per pixel basis.
Once I had finished implementing the lighting, I looked at implementing different types of lights. In the end I implemented directional, point and spotlights. The spot and point lights used the constant-linear-quadratic attenuation equation to make the light to fall off at range. I used this equation as, although not physically accurate, it allows more control over the range of the light.