Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This book presents an introduction to programming interactive computer graphics, with an emphasis on game development, using real-time shaders with DirectX 9.0. The book is divided into three parts that explain basic mathematical and 3D concepts, show how to describe 3D worlds and implement fundamental 3D rendering techniques, and demonstrate the application of Direct3D to create a variety of special effects. Features include: understand basic mathematical tools used in video game creation such as vectors, matrices, and transformations; discover how to describe and draw interactive 3D scenes using Direct3D and the D3DX library; learn how to implement lighting, texture mapping, alpha blending, and stencilling using shaders and the high-level shading language (HLSL); explore a variety of techniques for creating special effects, including vertex blending, character animation, terrain rendering, multi-texturing, particle systems, reflections, shadows, and normal mapping; find out how to work with meshes, load and render .X files, program terrain/camera collision detection, and implement 3D object picking; and review key ideas, gain programming experience, and explore new topics with th full source code for every sample application.

Author(s): Frank Luna
Publisher: Wordware Publishing
Year: 2006

Language: English
Pages: 626

00.0 Introduction to 3D Game Programming with DirectX 9.0c - A Shader Approach
Introduction
00.1 Introduction
00.2 Changes from an Earlier Version
00.3 Intended Audience
00.4 Prerequisites
00.5 Required Development Tools and Recommended Hardware
00.6 Use of the D3DX Library
00.7 Using the DirectX SDK Documentation and SDK Samples
00.8 Clarity
00.9 Sample Programs and Online Supplements
Chapter 1 Vector Algebra
01.01 Chapter 1_Vector Algebra - Overview
01.1 Vectors
01.2 Length and Unit Vectors
01.3 The Dot Product
01.4 The Cross Product
01.5 Change of Frame
01.6 Rays Lines and Segments
01.7 D3DX Vectors
01.8 Summary
01.9 Exercises
Chapter 2_Matrix Algebra - Overview
02.1 Definition
02.2 Matrix Multiplication
02.3 The Transpose of a Matrix
02.4 The Identity Matrix
02.5 The Inverse of a Matrix
02.6 D3DX Matrices
02.7 Summary
02.8 Exercises
Chapter 3_Transformations and Planes - Overview
03.1 Linear Transformations
03.2 Affine Transformations
03.3 D3DX Transformation Functions
03.4 Composition of Affine Transformations
03.5 Planes
03.6 Summary
03.7 Exercises
Part II_Direct3D Foundations
04.01 Chapter 4_Direct3D Initialization - Overview
04.1 Direct3D Overview
04.2 Some Preliminaries
04.3 Initializing DirectSD
04.4 Lost Devices
04.5 The Demo Application Framework
04.6 Demo Application_Hello Direct3D
04.7 Debugging Direct3D Applications
04.8 Summary
04.9 Exercises
Chapter 5_Timing Direct Input and Animation and Sprites - Overview
05.1 The Performance Timer
05.2 Direct Input Primer
05.3 Sprites and Animation
05.4 Summary
05.5 Exercises
Chapter 6_The Rendering Pipeline - Overview
06.1 The 3D Illusion
06.2 Model Representation
6.2.3 Indices
06.3 The Virtual Camera
06.4 The Rendering Pipeline
6.4.8 Rasterization
06.5 Summary
06.6 Exercises
Chapter 7_Drawing in Direct3D - Part I - Overview
07.1 Vertex_Index Buffers
07.2 Drawing Methods
07.3 Drawing Preparations
7.3.3 Setting the Vertex Declaration
07.4 Cube Demo
07.5 Summary
07.6 Exercises
Chapter 8_Drawing in Direct3D - Part II - Overview
08.1 Checking for Shader Support
08.2 Shaders and the FX Framework
8.2.4 Creating an Effect
08.3 Applying the Effect
08.4 Triangle Grid Demo
08.5 D3DX Geometric Objects
08.6 Summary
08.7 Exercises
Chapter 9_Color - Overview
09.1 Color Representation
09.2 Vertex Colors
09.3 Color Cube Demo
09.4 Digression_Traveling Sine Waves
09.5 Colored Waves Demo
09.6 Summary
09.7 Exercises
Chapter 10_Lighting - Overview
10.1 Light and Material Interaction
10.2 Diffuse Lighting
10.2.4.3 The Vertex Shader
10.2.4.4 The Pixel Shader and Technique
10.3 Ambient Lighting
10.4 Specular Lighting
10.5 Point Lights
10.6 Spotlights
10.7 Attenuation
10.8 The Point Light Demo
10.9 The Spotlight Demo
10.10 Phong Shading
10.11 Summary
10.12 Exercises
Chapter 11_Texturing - Overview
11.1 Texture Coordinates
11.2 Creating and Enabling a Texture
11.3 Filters
11.4 Mipmaps
11.5 Crate Demo
11.6 Address Modes
11.7 Tiled Ground Demo
11.8 Multi-texturing
11.9 Spherical and Cylindrical Texturing
11.10 Texture Animation
11.11 Compressed Textures and the DXTex Tool
11.12 Summary
11.13 Exercises
Chapter 12_Blending - Overview
12.1 The Blending Equation
12.2 Blend Factors
12.3 Transparent Teapot Demo
12.4 Transparent Teapot Demo with Texture Alpha Channel
12.5 The Alpha Test
12.6 Summary
12.7 Exercises
Chapter 13_Stenciling - Overview
13.1 Using the Stencil Buffer
13.2 Mirror Demo
13.3 Sample Application_Planar Shadows
13.4 Summary
13.5 Exercises
Chapter 14_Meshes - Overview
14.1 Geometry Info
14.2 Subsets and the Attribute Buffer
14.3 Drawing
14.4 Adjacency Info
14.5 Optimizing
14.6 The Attribute Table
14.7 Cloning
14.8 Creating a Mesh (DSDXCreateMesh)
14.9 .X Files
14.10 Bounding Volumes
14.11 Survey of Other D3DX Mesh Functions
14.12 Summary
14.13 Exercises
Chapter 15_Mesh Hierarchy Animation Part I - Rigid Meshes - Overview
15.1 Robot Arm Demo
15.2 Solar System Demo
15.3 Keyframes and Animation
15.4 Summary
15.5 Exercises
Chapter 16
Mesh Hierarchy Animation Part II - Skinned Meshes - Overview
16.1 Overview of Skinned Meshes
16.2 Skinned Mesh Demo
16.3 Summary
16.4 Exercises
Chapter 17_Terrain Rendering - Part I - Overview
17.1 Heightmaps
17.2 Basic Terrain Demo
17.3 Multi-Sub-Grid Terrain
17.4 Building a Flexible Camera
17.5 "Walking" on the Terrain
17.6 Summary
17.7 Exercises
Chapter 18_Terrain Rendering - Part II - Overview
18.1 Sub-Grid Culling and Sorting
18.2 Trees and Castle
18.3 Fog
18.4 Grass
18.5 Water
18.6 Summary
18.7 Exercises
Chapter 19_Particle Systems
19.1 Particles and Point Sprites
19.2 Particle System Framework
19.3 Example 1_Fire Ring
19.4 Example 2_Rain
19.5 Example 3_Sprinkler
19.6 Example 4_Bolt Gun
19.7 Summary
19.8 Exercises
Chapter 20_Picking
20.1 Screen to Projection Window Transform
20.2 World Space Picking Ray
20.3 Ray_Object Intersection Tests
20.4 Tri-Pick Demo
20.5 Asteroids Demo
20.6 Summary
20.7 Exercises
Chapter 21_Advanced Texturing - Part I - Overview
21.1 Cube Mapping
21.2 Normal Mapping
21.3 Render to Texture
21.4 Summary
21.5 Exercises
Chapter 22_Advanced Texturing - Part II - Overview
22.1 Projective Texturing
22.2 Shadow Mapping
22.3 Displacement Mapping
22.4 Summary
22.5 Exercises
Appendix A_Introduction to Windows Programming - Highlights
23.1 Appendix A_Introduction to Windows Programming - Overview
24 Appendix A_Introduction to Windows Programming - A Better Message Loop
24 Appendix A_Introduction to Windows Programming - Explaining Hello World
24 Appendix A_Introduction to Windows Programming - Hello World Windows Application
24 Appendix A_Introduction to Windows Programming - Summary
24 Appendix B_High-Level Shading Language Reference - Keywords and Operators
24 Appendix B_High-Level Shading Language Reference - Program Flow
24 Appendix B_High-Level Shading Language Reference - User Defined Functions
24 Appendix B_High-Level Shading Language Reference - Variable Types
24 Part III_Applied Direct3D and the D3DX Library
References