DirectX Book

BookCover

Published May 21, 2014 by Addison-Wesley Professional. Part of the Game Design series.

Overview

This step-by-step text demystifies modern graphics programming so you can quickly start writing professional code with DirectX and HLSL.

You’ll start with the basics: a tour of the Direct3D graphics pipeline, a 3D math primer, and an introduction to the best tools and support libraries.

Next, you’ll discover shader authoring with HLSL. You’ll implement basic lighting models, including ambient lighting, diffuse lighting, and specular highlighting. You’ll write shaders to support point lights, spotlights, environment mapping, fog, color blending, normal mapping, and more.

Then you’ll employ C++ and the Direct3D API to develop a robust, extensible rendering engine. You’ll learn about virtual cameras, loading and rendering 3D models, mouse and keyboard input, and you’ll create a flexible effect and material system to integrate your shaders.

Finally, you’ll extend your graphics knowledge with more advanced material, including post-processing techniques for color filtering, Gaussian blurring, bloom, and distortion mapping. You’ll develop shaders for casting shadows, work with geometry and tessellation shaders, and implement a complete skeletal animation system for importing and rendering animated models.

You don’t need any experience with 3D graphics or the associated math: Everything’s taught hands-on, and all graphics-specific code is fully explained.

Coverage includes

  • The Direct3D API and graphics pipeline
  • A 3D math primer: vectors, matrices, coordinate systems, transformations, and the DirectX Math library
  • Free and low-cost tools for authoring, debugging, and profiling shaders
  • Extensive treatment of HLSL shader authoring
  • Development of a C++ rendering engine
  • Cameras, 3D models, materials, and lighting
  • Post-processing effects
  • Device input, component-based architecture, and software services
  • Shadow mapping, depth maps, and projective texture mapping
  • Skeletal animation
  • Geometry and tessellation shaders
  • Survey of rendering optimization, global illumination, compute shaders, deferred shading, and data-driven engine architecture

Source Code

All of the book’s source code can be found at bitbucket.org.

For Instructors

If you’re interested in adopting this book for a course, please visit the book’s site at pearsonhighered.com. There you’ll find instructor resources, including over 400 slides covering every chapter in the book.

** Attention Windows 8.1 Users **

The latest revision of NVIDIA FX Composer (which is used in Chapters 4-9) does not run under Windows 8.1. However, an older version (2.51.0701.1135) does work. I’ve tested all of the .fxcproj files included with the book’s source code, they all load correctly and their corresponding shaders run without issue.

Forum

If you have any questions or comments about the book, please visit the book’s forum.

Links

Errata

All Errors

Have you found incorrect information in the book? In the comments field below, please tell me the page number, location of the error on the page, and a description of the error. Thank you!