DirectX 11 Showcase
This project is built in C++ with shaders written in HLSL and showcases many techniques and features of the programmable pipeline in DX11 including vertex manipulation, lighting and soft shadows, post processing utilising the compute shader, advanced dynamic tessellation, use of the geometry shader and more.
View the description of the video for details:
[0:00] Flyover of the scene. A mountain with a lake, and a tent orbited by a point light. There are also a user-controlled point light and spotlight.
[0:09] The mountain is generated from a heightmap, which stores height values as a texture. The video demonstrates dynamically changing how the height value is scaled, increasing and decreasing the height of the mountain. The video then shows the water being simulated in real-time using four Gerstner waves (Catlike Coding, 2018), and how the user can set variables used in the calculations to affect the simulation.
[0:45] The directional light is shown, with correct lighting and shadows, and how the user can manipulate the direction and colour. Diffuse intensity is the dot product of the light ray and the surface normal.
[1:04] The point light is shown, with correct lighting and shadows, and how the user can manipulate the position, colour, and attenuation factors. Diffuse is calculated similarly to the directional light but with attenuation applied. We can see the water has correct specular highlights, calculated using the Blinn-Phong method. Point light shadows use six different shadow maps for each direction.
[1:24] Manipulating the spotlight is shown. We also see correct lighting and shadows on and around the tent.
[1:43] PCF filtering (Luna, 2012) is used to give shadows soft edges.
[1:47] Shows changing the shadow bias.
[1:49] Shows lighting and normal debugging.
[1:56] Demonstrates viewing the various shadow maps. They are the depth buffers are rendered to a separate quad on the screen.
[2:12] Demonstrates the bloom post processing and the effect of setting the variables. Done with a gaussian blur in the compute shader.
[2:22] Screen area-based tessellation attempts to estimate the screen area taken up by each control patch and sets the factors accordingly. Tessellation is done using interlocking tiles algorithm (Zink, Pattineo and Hoxley, 2011).
[2:36] Distance based tessellation uses the same interlocking tiles algorithm but sets factors based on distance to the camera.
[2:53] Shows grass generated in the geometry shader (Roystan, 2018), with density controlled by tessellation.