Learn Vertex and Pixel Shader Programming with DirectX 9Because graphics systems for video games and game console hardware have become more complex, graphics applications must also advance. This is where programmable vertex and pixel shaders come in. This book shows how to write assembly language for programming the vertex shader and pixel shader hardware using DirectX 9 and covers the fundamentals of programming vectors using SIMD methodology in conjunction with the Direct3D 9 application interfaces. Features: Find out about the valid vertex shader and pixel shader instruction sets; Learn how branching and branchless code can be used for flow control; Understand the vertex shader instructions that support matrices; Discover how to use quaternions to accurately represent rotating objects; Use texturing with both vertex and pixel shaders, including bump mapping. |
Common terms and phrases
3sw This instruction additional information aSrc and stores bits Boolean bSrc bump map callnz Chapter color const Cross product cSrc CV WORLD D3DDECLUSAGE D3DXMATRIX D3DXQUATERNION D3DXVECTOR4 defb destination Dst Direct3D DirectX 9 DirectX C++ prototype dot product DWORD ê ê element endloop endrep Equation float floating-point function graphics hardware If-else-endif instruction occupies instruction results instruction slots integer l l l l l Listing little-endian loop macro instruction Math matrix mipmap mtxD multiply Note nVidia opcode Pixel shader Pixel shader tex predicate processor Pseudocode quaternion referenced render RGBA rotation row dp4 sample scalar shader instructions Shader Programming Significand sincos source aSrc source register stores the result supported swizzle texld texm3x3pad texture map tn Dst ú ú UINT Vector Game version 2.0 vertex and pixel vertex color Vertex shader video card Vn Src XXXX XXXX XXXX XYZW