Learn Vertex and Pixel Shader Programming with DirectX 9

Free Download

Authors:

Edition: illustrated edition

ISBN: 9781556222870, 1-55622-287-4

Size: 7 MB (7265002 bytes)

Pages: 304/304

File format:

Language:

Publishing Year:

Category:

James Leiterman9781556222870, 1-55622-287-4

Text shows how to write assembly language for programming the vertex shader and pixel shader hardware using DirectX 9. Covers the fundamentals of programming vectors using SIMD methodology in conjunction with the Direct3D 9 application interfaces. For game developers. Softcover. DLC: Vector processing (Computer science).

Table of contents :
Cover……Page 1
Contents……Page 6
Preface……Page 10
1 Introduction……Page 16
2 Getting Started……Page 22
DirectX Version Checking……Page 24
Video Cards……Page 27
Version( s) Determination: Vertex and Pixel Shader……Page 30
Plumbing: The Rendering Pipeline……Page 39
The Vector……Page 41
Graphics Processor Unit (GPU) Swizzling Data……Page 45
Figure 2-9: Examples of data swizzling……Page 46
Tools……Page 47
Part I Vertex Shaders……Page 48
3 Vertex Shaders…….Page 50
*Vertex Shader Registers……Page 51
Instruction Modifiers……Page 54
Vertex Input Streams……Page 55
Vertex Shader Instructions……Page 56
Assembly ( Scripting) Commands……Page 59
dcl_……Page 66
Vertex Shader Assembly……Page 67
Vertex Shader Instructions ( Data Conversions)……Page 70
Vertex Shader Instructions ( Mathematics)……Page 73
3D Cartesian Coordinate System……Page 74
Reciprocals……Page 83
rsq:……Page 88
Special Functions……Page 90
Branchless Coding……Page 98
Branching Code……Page 106
5 Matrix Math…….Page 116
Vectors……Page 117
The Matrix……Page 118
Matrix Summation D = A + B……Page 122
Scalar Matrix Product rA……Page 124
Apply Matrix to Vector (Multiplication) vA……Page 125
Matrix Multiplication D = AB……Page 130
Matrix Set Identity……Page 133
Scaling Triangles……Page 135
Matrix Set Scale……Page 136
Matrix Set Translation……Page 137
Matrix Transpose……Page 138
Matrix Inverse mD = mA ¨C 1……Page 139
sincos:……Page 144
Sine and Cosine Functions……Page 146
vmp_ SinCos ( X86)……Page 148
Matrix Rotations……Page 149
Matrix Set X Rotation……Page 150
Matrix Set Y Rotation……Page 151
Matrix Set Z Rotation……Page 152
7 Quaternions……Page 154
Quaternion Addition……Page 158
Quaternion Dot Product ( Inner Product)……Page 159
Quaternion Normalization……Page 160
Quaternion Inversion D= A ¨C 1……Page 162
Quaternion Multiplication D= AB……Page 163
Quaternion Division……Page 164
D3DX9 Sample: VertexShader. cpp……Page 166
A Wee Bit o` Simple Particle Physics……Page 173
9 Texture 101……Page 180
What Is Shading?……Page 181
What Is Color Mixing?……Page 182
What Is a Texture?……Page 184
Texture Dimensional……Page 186
Bump Mapping……Page 189
Part II Pixel Shaders……Page 196
10 Pixel Shaders……Page 198
Pixel Shader Version Checking……Page 199
*Pixel Shader Registers……Page 200
Pixel Shader Instructions……Page 202
Assembly ( Scripting) Commands……Page 207
IDirect3DDevice9::SetPixelShaderConstantF()……Page 209
Pixel Shader Instructions ( Data Conversions)……Page 212
Pixel Shader Assembly……Page 213
Instruction Modifiers……Page 215
Pixel Shader Instructions ( Mathematics)……Page 216
Special Functions……Page 221
Branchless Code……Page 224
Branching Code……Page 228
Matrices……Page 234
Texture Registers……Page 238
Pixel Shader Instructions ( Texture Matrices)……Page 253
Pixel Shading for Fun and Profit……Page 260
Listing 12-1: Portion of ShaderDefs.h from Paul Stapley……Page 261
Listing 12-2: Portion of ShaderMacros.h from Paul Stapley……Page 262
Epilogue……Page 264
Appendix A Shaders — Opcode Ordered……Page 266
Appendix B Shaders — Mnemonic Ordered……Page 270
***Appendix C Instruction Dissection……Page 274
The Parameter ( Argument) Dword……Page 276
Register Identifier Code……Page 277
Source Swizzled {XYZW} Elements……Page 278
***Appendix D Floating-Point 101……Page 282
Floating- Point Comparison……Page 285
Glossary……Page 288
References……Page 292
Index……Page 296

Reviews

There are no reviews yet.

Be the first to review “Learn Vertex and Pixel Shader Programming with DirectX 9”
Shopping Cart
Scroll to Top