Direct3D Rendering Cookbook

Direct3D Rendering Cookbook
eBook: $32.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $87.98    Print cover: $54.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Learn and implement the advanced rendering techniques in Direct3D 11.2 and bring your 3D graphics project to life
  • Study the source code and digital assets with a small rendering framework and explore the features of Direct3D 11.2
  • A practical, example-driven, technical cookbook with numerous illustrations and example images to help demonstrate the techniques described

Book Details

Language : English
Paperback : 430 pages [ 235mm x 191mm ]
Release Date : January 2014
ISBN : 1849697108
ISBN 13 : 9781849697101
Author(s) : Justin Stenning
Topics and Technologies : All Books, Game Development, Cookbooks

Table of Contents

Chapter 1: Getting Started with Direct3D
Chapter 2: Rendering with Direct3D
Chapter 3: Rendering Meshes
Chapter 4: Animating Meshes with Vertex Skinning
Chapter 5: Applying Hardware Tessellation
Chapter 6: Adding Surface Detail with Normal and Displacement Mapping
Chapter 7: Performing Image Processing Techniques
Chapter 8: Incorporating Physics and Simulations
Chapter 9: Rendering on Multiple Threads and Deferred Contexts
Chapter 10: Implementing Deferred Rendering
Chapter 11: Integrating Direct3D with XAML and Windows 8.1
Appendix: Further Reading
  • Chapter 1: Getting Started with Direct3D
    • Introduction
    • 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
  • Chapter 2: Rendering with Direct3D
    • Introduction
    • 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
  • Chapter 3: Rendering Meshes
    • Introduction
    • 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
  • Chapter 5: Applying Hardware Tessellation
    • Introduction
    • 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
  • Chapter 7: Performing Image Processing Techniques
    • Introduction
    • 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

Justin Stenning

Justin Stenning , a software enthusiast since DOS was king, has been working as a software engineer since he was 20. He has been the technical lead on a range of projects, from enterprise content management and software integrations to mobile apps, mapping, and biosecurity management systems. Justin has been involved in a number of open source projects, including capturing images from fullscreen Direct3D games and displaying in-game overlays, and enjoys giving a portion of his spare time to the open source community. Justin completed his Bachelor of Information Technology at Central Queensland University, Rockhampton. When not coding or gaming, he thinks about coding or gaming, or rides his motorbike. Justin lives with his awesome wife, and his cheeky and quirky children in Central Victoria, Australia.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 1 submitted: last submission 08 May 2014

Type: Grammatical | Page no 14

The line "A buffer resource is used to provide structured and unstructured data to stages of in the graphics pipeline"

should be "A buffer resource is used to provide structured and unstructured data to stages of the graphics pipeline"

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Direct3D Rendering Cookbook +    NetSuite OneWorld Implementation 2011 R2 =
50% Off
the second eBook
Price for both: $47.10

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Set up a Direct3D application and perform real-time 3D rendering with C# and SharpDX
  • Learn techniques for debugging your Direct3D application
  • Render a 3D environment with lights, shapes, and materials
  • Explore character animation using bones and vertex skinning
  • Create additional surface detail using tessellation with displacement mapping and displacement decals
  • Implement image post-processing tasks within compute shaders
  • Use real-time deferred rendering techniques to implement improved shading for lighting and shadows
  • Learn to Program the graphics pipeline with shaders using HLSL implemented by Shader Model 5

In Detail

The latest 3D graphics cards bring us amazing visuals in the latest games, from Indie to AAA titles. This is made possible on Microsoft® platforms including PC, Xbox consoles, and mobile devices thanks to Direct3D – a component of the DirectX API dedicated to exposing 3D graphics hardware to programmers. Microsoft DirectX is the graphics technology powering all of today's hottest games. The latest version— DirectX 11—features tessellation for film-like geometric detail, compute shaders for custom graphics effects, and improved multithreading for better hardware utilization. With it comes a number of fundamental game changing improvements to the way in which we render 3D graphics.

Direct3D Rendering Cookbook provides detailed .NET examples covering a wide range of advanced 3D rendering techniques available in Direct3D 11.2. With this book, you will learn how to use the new Visual Studio 2012 graphics content pipeline, how to perform character animation, how to use advanced hardware tessellation techniques, how to implement displacement mapping, perform image post-processing, and how to use compute shaders for general-purpose computing on GPUs.

After covering a few introductory topics about Direct3D 11.2 and working with the API using C# and SharpDX, we quickly ramp up to the implementation of a range of advanced rendering techniques, building upon the projects we create and the skills we learn in each subsequent chapter. Topics covered include using the new Visual Studio 2012 graphics content pipeline and graphics debugger, texture sampling, normal mapping, lighting and materials, loading meshes, character animation (vertex skinning), hardware tessellation, displacement mapping, using compute shaders for post-process effects, deferred rendering, and finally bringing all of this to Windows Store Apps for PC and mobile. After completing the recipes within Direct3D Rendering Cookbook, you will have an in-depth understanding of a range of advanced Direct3D rendering topics.


This is a practical cookbook that dives into the various methods of programming graphics with a focus on games. It is a perfect package of all the innovative and up-to-date 3D rendering techniques supported by numerous illustrations, strong sample code, and concise explanations.

Who this book is for

Direct3D Rendering Cookbook is for C# .NET developers who want to learn the advanced rendering techniques made possible with DirectX 11.2. It is expected that the reader has at least a cursory knowledge of graphics programming, and although some knowledge of Direct3D 10+ is helpful, it is not necessary. An understanding of vector and matrix algebra is required.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software