PacktLib: Direct3D Rendering Cookbook

Direct3D Rendering Cookbook


About the Author

About the Reviewers


Getting Started with Direct3D


Introducing Direct3D 11.1 and 11.2

Building a Direct3D 11 application with C# and SharpDX

Initializing a Direct3D 11.1/11.2 device and swap chain

Debugging your Direct3D application

Rendering with Direct3D


Using the sample rendering framework

Creating device-dependent resources

Creating size-dependent resources

Creating a Direct3D renderer class

Rendering primitives

Applying multisample anti-aliasing

Implementing texture sampling

Rendering Meshes


Rendering a cube and sphere

Preparing the vertex and constant buffers for materials and lighting

Adding material and lighting

Using a right-handed coordinate system

Loading a static mesh from a file

Animating Meshes with Vertex Skinning


Preparing the vertex shader and buffers for vertex skinning

Loading bones in the mesh renderer

Animating bones

Applying Hardware Tessellation


Preparing the vertex shader and buffers for tessellation

Tessellating a triangle and quad

Tessellating bicubic Bezier surfaces

Refining meshes with Phong tessellation

Optimizing tessellation through back-face culling and dynamic Level-of-Detail

Adding Surface Detail with Normal and Displacement Mapping


Referencing multiple textures in a material

Adding surface detail with normal mapping

Adding surface detail with displacement mapping

Implementing displacement decals

Optimizing tessellation based on displacement decal (displacement adaptive tessellation)

Performing Image Processing Techniques


Running a compute shader – desaturation (grayscale)

Adjusting the contrast and brightness

Implementing box blur using separable convolution filters

Implementing a Gaussian blur filter

Detecting edges with the Sobel edge-detection filter

Calculating an image's luminance histogram

Incorporating Physics and Simulations


Using a physics engine

Simulating ocean waves

Rendering particles

Rendering on Multiple Threads and Deferred Contexts


Benchmarking multithreaded rendering

Implementing multithreaded dynamic cubic environment mapping

Implementing dual paraboloid environment mapping

Implementing Deferred Rendering


Filling the G-Buffer

Implementing a screen-aligned quad renderer

Reading the G-Buffer

Adding multiple lights

Incorporating multisample anti-aliasing

Integrating Direct3D with XAML and Windows 8.1


Preparing the swap chain for a Windows Store app

Rendering to a CoreWindow

Rendering to an XAML SwapChainPanel

Loading and compiling resources asynchronously

Further Reading