DirectX Demo Scene 1

Download Video Here

This was created to demostrate shaders using DirectX and SGlib. The SGlib (Scene Graph Library) implements most of the functionality created in the OpenGL Demo Scene (to save re-inventing the wheel).

The Spotlight Shader uses the Phong shading model to render all of the objects in the scene. This included using ambient, diffuse and specular lighting. The shader takes a light position and finds the relation to the surface so it can calculate the brightness of every pixel. Texture mapping is also used in conjunction with the Phong Shader.

The Normal Map Shader takes everything the Standard spotlight shader does and enables Normal mapping to enhance the detail of the scene. The Shadow Shader applies Shadow Mapping to the scene, it also apples the functionality of the spotlight shader for efficiency. (Please note that the Normal Map Shader is not present in the video as it has not yet been implemented to work with the shadow shader).

The shadow shaders contains two techniques, the first one generates a shadow map, then second applies it to the scene with the colour calculated from the spotlight function. (The shadow shader implementation only allows for 1 light at the moment, I have plans to increase this in later demos).

The Sparkler effect is created with billboard sprites. They calculate the current position of the practical by taking the time passed, speed and direction. The Shader also takes a colour and a camera position. This allows the Sparkler to take on different colours and for the sparkles to stay the proper visual size when the camera becomes further away.