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.
- 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
All of the book’s source code can be found at bitbucket.org.
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.
If you have any questions or comments about the book, please visit the book’s forum.
- Visual Studio 2013 Express
- Windows SDK
- Effects 11 Library
- DirectX Tool Kit
- DirectX Texture Processing Library
- WIC TGA Codec
- NVIDIA Nsight Visual Studio Edition
- AMD GPU PerfStudio 2
- NVIDIA Legacy Texture Tools
- Great texture cubes from Emil Persson
- Vue from e-on Software
- Terragen 3
- MSDN Article: Common Techniques to Improve Shadow Depth Maps
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!