I made this project in January to model and render a Lego model, coded from scratch in C++ and DirectX 9.0c, with the invaluable assistance of Luna’s book, Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach.
Bricks are procedurally generated from a custom text file that specifies the size, position and colour of each brick.
Phong shading was used as the lighting model, implemented using a pixel shader. There is only one directional light in the scene.
Download the Visual Studio project (89Kb) (build with x86 Debug/Release configuration):
https://onedrive.live.com/redir?resid=56CD19EB372DF550!1218&authkey=!AC0hjMKlGn9EK9g&ithint=file%2czip
Git repository:
https://bitbucket.org/handyj443/graphics-assignment-1-lego/