LightsAndShadowsDemoPortfolio

Developed in just over 2 months for a University module, this tech demo demonstrates my programming abilities with a modern graphics API. The shadowing technique is basic shadow mapping, which I then down-sample, blur and then up-sample for the final render pass to create soft shadows. There are 6 basic point lights within the scene, however, theoretically there can be thousands of lights within a scene, due to the development structure. The tech demo also makes use of diffuse, normal and specular mapping, all of which affects the lighting.

Other than the font rendering, which was taken from FW1FontWrapper – CodePlex, the entire rendering implementation of the Direct3D 11 API is solely my own code in C++, this also includes the HLSL Vertex and Pixel shaders.

Features

  • Point light w/ ambient, diffuse and specularity.
  • Soft shadow mapping which is affected by the light’s ambient.
  • Renders and supports Diffuse, Normal and Specular mapping.
  • Currently runs with 6 lights, which can be increased to a much greater amount.
  • Loads OBJ models correctly to the format guidelines, with their appropriate materials.
  • Each 3D model loaded within the scene can have multiple sub-meshes.
  • Camera movement can be controlled with the mouse and keyboard via DirectInput.
  • Soft or basic shadow mapping can be applied.
  • Can render different outputs, such as the normals and the diffuse of the scene.
  • Maintains the vertical sync rate of the system on medium rated hardware.
  • Has backwards compatibility with Direct3D 10 and 9 hardware.

Video

Download

Source Code (64MB)

Notes

  • You will need DirectX SDK June ’10 or greater and Visual Studio 2010 or greater to run the solution.
  •  The normals and specularity in this scene are exaggerated for demonstration purposes and the castle model was taken from Epic Games’ Unreal Development Kit (UDK).
  • This is a standard forward rendering demo.