You are previewing Real-Time Shader Programming.
O'Reilly logo
Real-Time Shader Programming

Book Description

Now that PC users have entered the realm of programmable hardware, graphics programmers can create 3D images and animations comparable to those produced by RenderMan's procedural programs—-but in real time. Here is a book that will bring this cutting-edge technology to your computer. Beginning with the mathematical basics of vertex and pixel shaders, and building to detailed accounts of programmable shader operations, Real-Time Shader Programming provides the foundation and techniques necessary for replicating popular cinema-style 3D graphics as well as creating your own real-time procedural shaders. A compelling writing style, color illustrations throughout, and scores of online resources make Real-Time Shader Programming an indispensable tutorial/reference for the game developer, graphics programmer, game artist, or visualization programmer, to create countless real-time 3D effects.

All disc-based content for this title is now available on the Web.



* Contains a complete reference of the low-level shader language for both DirectX 8 and DirectX 9 * Provides an interactive shader demonstration tool (RenderMonkeyTM) for testing and experimenting * Maintains an updated version of the detailed shader reference section at www.directx.com * Teaches the latest shader programming techniques for high-performance real-time 3D graphics

Table of Contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Dedication
  5. Copyright
  6. The Morgan Kaufmann Series in Computer Graphics and Geometric Modeling
  7. CRITICAL ACCLAIM FOR: Real-Time Shader Programming!
  8. PREFACE
  9. Chapter 1: INTRODUCTION
    1. RENDERMAN VS. REAL TIME
    2. WHAT YOU’LL LEARN FROM THIS BOOK
  10. Chapter 2: PRELIMINARY MATH
    1. CONVENTIONS AND NOTATION
    2. VERTICES
    3. POINTS
    4. VECTORS
    5. CREATING NORMALS OUT OF GEOMETRY
    6. MATHEMATICS OF COLOR IN COMPUTER GRAPHICS
  11. Chapter 3: MATHEMATICS OF LIGHTING AND SHADING
    1. LIGHTS AND MATERIALS
    2. TRADITIONAL 3D HARDWARE-ACCELERATED LIGHTING MODELS
    3. PHYSICALLY BASED ILLUMINATION
    4. PHYSICALLY BASED SURFACE MODELS
    5. THE BIDIRECTIONAL REFLECTANCE DISTRIBUTION FUNCTION (BRDF)
    6. NONPHOTOREALISTIC RENDERING (NPR)
  12. Chapter 4: INTRODUCTION TO SHADERS
    1. SHADERS AND THE EXISTING GRAPHICS PIPELINE
    2. VERTEX SHADERS: TECHNICAL OVERVIEW
    3. PIXEL SHADERS: TECHNICAL OVERVIEW
    4. VERTEX SHADERS, PIXEL SHADERS, AND THE FIXED FUNCTION PIPELINE
    5. VERTEX SHADERS
    6. Transformations and Projections
    7. PIXEL SHADERS
    8. No, No, It’s Not a Texture, It’s just Data
  13. Chapter 5: SHADER SETUP IN DIRECTX
    1. SELECTING YOUR D3D DEVICE
    2. CHECKING FOR SHADER SUPPORT
    3. VERTEX ELEMENTS
    4. CREATING A VERTEX SHADER INTERFACE DECLARATION
    5. CREATING A VERTEX BUFFER
    6. VERTEX DATA STREAMS
    7. CREATING WELL-FORMED VERTEX DATA
    8. CREATING AND USING PIXEL AND VERTEX SHADERS
    9. ASSEMBLING VERTEX AND PIXEL SHADERS
    10. SETTING A SHADER
    11. SETTING SHADER CONSTANTS
    12. RENDERING
  14. Chapter 6: SHADER TOOLS AND RESOURCES
    1. RENDERMONKEY
    2. NVIDIA EFFECTS BROWSER
    3. NVIDIA SHADER DEBUGGER
    4. SHADER STUDIO
    5. COLORSPACE TOOL
    6. RESOURCES
  15. Chapter 7: SHADER BUFFET
    1. VERTEX SHADERS
    2. VERTEX AND PIXEL SHADERS
  16. Chapter 8: SHADER REFERENCE
    1. SHADER STYLE AND COMMENTS
    2. SHADER REVISION HISTORY BY DIRECTX VERSION
  17. Part I: Vertex Shader Reference
    1. QUICK OVERVIEW
    2. VERTEX SHADER REVISION HISTORY
    3. INPUT REGISTERS
    4. INTERNAL TEMPORARY REGISTERS
    5. OUTPUT REGISTERS
    6. VERTEX SHADER INSTRUCTIONS
  18. Part II: Pixel Shader Reference
    1. QUICK OVERVIEW
    2. INSTRUCTION ORDER AND INSTRUCTION COUNTS
    3. TEXTURE ADDRESSING
    4. TEXTURE STAGE AND TEXTURE SAMPLE STATES
    5. PIXEL SHADER MATH PRECISION IN DIRECTX 8 CLASS HARDWARE
    6. PIXEL SHADER MATH PRECISION DIRECTX 9 CLASS HARDWARE
    7. PIXEL SHADER REVISION HISTORY
    8. OUTPUT REGISTERS
    9. INPUT REGISTERS
    10. TEMPORARY REGISTERS
    11. OUTPUT REGISTERS—THE MULTI-ELEMENT TEXTURE (MET) AND THE MULTIPLE RENDER TARGET (MRT)
  19. REFERENCES
  20. INDEX
  21. ABOUT THE AUTHOR
  22. ABOUT THE CD-ROM