Graphics Programming with Shaders (Direct X11)

Overview

In the graphics programming with shaders module I implemented several graphics programming techniques on the GPU. The following techniques were implemented in a Direct X11 framework:

  1. Vertex Manipulation (Heightmap) - In the Vertex Shader and Domain Shader
  2. Normal Mapping (TBN Matrix)
  3. Normal Sampling - Implemented Vertex Sampling and Pixel Sampling using partial derivatives.
  4. Postprocessing - Box Blur and Gaussian Blur.
  5. Lighting - Supporting directional, point and spotlights.
  6. Shadowmapping - Supporting hard shadows and soft shadows (PCF).
  7. Dynamic Level of Detail using Hull, Tesselation and Domain Shaders.
  8. Billboarding

Vertex Manipulation (VS & DS)

Centered in the scene is a plane that has been disstorted by a heightmap. The application contains an ordinary plane which has it's vertices disstorted in the vertex shader from a height map.

Additionally, a matrix of patches can be swapped into the scene demonstrating not only dynamic tessellation, see below, but also vertex displacement occurring in the domain shader.

Guassian Blur & Box Blur

The chosen post processing techniqes were guassian bluring and box blurring. Post-processing takes place after the scene has been initially written to a render target. A mask is created from the render target and stored in a subsequent texture ready for the blur pass.

Normal Mapping & Normal Sampling

The application supports normal mapping the extrapolation of world space normals from texture space by multiplying the coordinates by the TBN, Tangent, Bi-Tangent and Normal, matrix.

Additionally, using partial derivatives, a per-vertex and per-pixel normal function was implemented. This enabled the generation of normals on the fly, adding significant amount of detail on lower resolution height-maps.

Dynamic Tessellation

A GPU accelerated LOD surface patch algorithm was implemented across the hull shader and domain shader.

A 12-point control patch was uploaded from the CPU where each patch was tessellated with respects to the camera's position. This enabled high resolution vertex displacement close to the camera while rendering less geometry further from the camera.

Shadow Mapping

Shadow mapping was implemented for directional lighting and spotlights. Both hard shadows and soft shadows are supported. PCF was used as the method for soft shadows, supporting 3x3, 5x5 and 7x7 filtering.

FOOTER

This is where all the legal stuff goes I reckon.

POPULAR TAGS

Engine Programming Graphics Programming Software Engineering C++ C# HLSL Direct X Game Programming GLSL

Rhys Duff Portfolio