Home > Store

Real-Time 3D Rendering with DirectX and HLSL: A Practical Guide to Graphics Programming, Rough Cuts

Rough Cuts

  • Available to Safari Subscribers
  • About Rough Cuts
  • Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.

Not for Sale

Description

  • Copyright 2014
  • Dimensions: 7" x 9"
  • Pages: 592
  • Edition: 1st
  • Rough Cuts
  • ISBN-10: 0-13-357015-0
  • ISBN-13: 978-0-13-357015-1

This is the Rough Cut version of the printed book.

Get Started Quickly with DirectX 3D Programming: No 3D Experience Needed

This step-by-step text demystifies modern graphics programming so you can quickly start writing professional code with DirectX and HLSL. Expert graphics instructor Paul Varcholik starts 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


Sample Content

Table of Contents

Introduction     1
PART I:  AN INTRODUCTION TO 3D RENDERING     5
Chapter 1  Introducing DirectX     7
A Bit of History     8
The Direct3D 11 Graphics Pipeline     9
Summary     21
Chapter 2  A 3D/Math Primer     23
Vectors     24
Matrices     27
Transformations     31
DirectXMath     35
Summary     41
Chapter 3  Tools of the Trade     43
Microsoft Visual Studio     44
NVIDIA FX Composer     47
Visual Studio Graphics Debugger     53
Graphics Debugging Alternatives     55
Summary     56
Exercises     56

PART II:  SHADER AUTHORING WITH HLSL     57
Chapter 4  Hello, Shaders!     59

Your First Shader      60
Hello, Structs!     68
Summary     70
Exercises     71
Chapter 5  Texture Mapping     73
An Introduction to Texture Mapping     74
A Texture Mapping Effect     75
Texture Filtering     81
Texture Addressing Modes     86
Summary     89
Exercises     89
Chapter 6  Lighting Models     91
Ambient Lighting     92
Diffuse Lighting     97
Specular Highlights     105
Summary      114
Exercises     114
Chapter 7  Additional Lighting Models     115
Point Lights     116
Spotlights     124
Multiple Lights     130
Summary     139
Exercises     139
Chapter 8  Gleaming the Cube     141
Texture Cubes     142
Skyboxes     145
Environment Mapping     149
Fog     154
Color Blending     159
Summary     167
Exercises     168
Chapter 9  Normal Mapping and Displacement Mapping     169
Normal Mapping     170
Displacement Mapping     178
Summary     181
Exercises     181

PART III:  RENDERING WITH DIRECTX     183
Chapter 10  Project Setup and Window Initialization     185

A New Beginning     186
Project Setup     186
The Game Loop     195
Window Initialization     199
Summary     204
Exercise     204
Chapter 11  Direct3D Initialization      205
Initializing Direct3D     206
Putting It All Together     219
Summary     232
Exercise     232
Chapter 12  Supporting Systems     233
Game Components     234
Device Input     248
Software Services     265
Summary     268
Exercises     268
Chapter 13  Cameras     269
A Base Camer

Updates

Submit Errata

More Information