没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Introduction to 3D Game Programming with DirectX 9.0c—A Shader
Approach
Frank D. Luna
Wordware Publishing, Inc.
Library of Congress Cataloging-in-Publication Data
Luna, Frank D.
Introduction to 3D game programming with DirectX 9.0c : a shader approach
/ by Frank D. Luna.
p. cm.
Includes index.
ISBN-13:
978-1-59822-016-2
ISBN-10:1-59822-016-0 (pbk.)
1. Computer games--Programming 2. DirectX. I. Title.
QA76.76.C672L833 2006
794.8'1526--dc22 2006006448
© 2006, Wordware Publishing, Inc.
All Rights Reserved
2320 Los Rios Boulevard
Plano, Texas 75074
No part of this book may be reproduced in any form or by any means without permission in writing from Wordware Publishing, Inc.
Printed in the United States of America
ISBN-13: 978-1-59822-016-2
ISBN-10: 1-59822-016-0
10 9 8 7 6 5 4 3 2 1
0605
DirectX is a registered trademark of Microsoft Corporation in the United States and other countries. Other brand names and product names mentioned in this book
are trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as
intent to infringe on the property of others. The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to
distinguish their products.
This book is sold as is, without warranty of any kind, either express or implied, respecting the contents of this book and any disks or programs that may accompany
it, including but not limited to implied warranties for the book's quality, performance, merchantability, or fitness for any particular purpose. Neither Wordware
Publishing, Inc. nor its dealers or distributors shall be liable to the purchaser or any other person or entity with respect to any liability, loss, or damage caused or
alleged to have been caused directly or indirectly by this book.
All inquiries for volume purchases of this book should be addressed to Wordware Publishing, Inc., at the above address. Telephone inquiries may be made by
calling:
(972) 423-0090
To my parents, Frank and Kathryn
Acknowledgments
I would like to thank Rod Lopez, Jim Leiterman, Hanley Leung, Rick Falck, Tybon Wu, Tuomas Sandroos, and Eric Sandegren for putting in the time to review this
book for both accuracy and improvements. I also want to thank Dale E. La Force, Adam Hault, Gary Simmons, James Lambers, and William Chin for their
assistance. Lastly, I want to thank the staff at Wordware Publishing, in particular, Wes Beckwith, Beth Kohler, Martha McCuller, Denise McEvoy, and Alan McCuller.
1
Introduction
Overview
This book presents an introduction to programming interactive computer graphics, with an emphasis on game development, using real-time shaders with DirectX
9.0c. It teaches the fundamentals of Direct3D and shader programming, after which the reader will be prepared to go on and learn more advanced techniques. The
book is divided into three main parts. Part I explains the mathematical tools that will be used throughout this book. Part II shows how to implement elementary 3D
techniques, such as defining 3D geometry, lighting, texturing, alpha blending, and stenciling, using shaders and the HLSL. Part III is largely about applying Direct3D
to implement a variety of interesting techniques and special effects, such as working with meshes, character animation, terrain rendering, picking, particle systems,
environment mapping, normal mapping, and rendering to textures.
For the beginner, this book is best read front to back. The chapters have been organized so that the difficulty increases progressively with each chapter. In this way,
there are no sudden jumps in complexity that leave the reader lost. In general, for a particular chapter, we will use the techniques and concepts previously
developed. Therefore, it is important that you have mastered the material of a chapter before continuing. Readers who are experienced Direct3D users can pick the
chapters of interest.
Finally, you may be wondering what kinds of games you can develop after reading this book. The answer to that question is best obtained by skimming through the
book and seeing the types of applications that are developed. From that you should be able to visualize the types of games that can be developed based on the
techniques taught in this book and some of your own ingenuity.
2
Changes from an Earlier Version
This update to the author's Introduction to 3D Game Programming with DirectX 9.0 has been rewritten almost from scratch. This book largely abandons the fixed
pipeline used in the earlier version to give a complete programmable, or shader, approach. From Chapter 8 onward, we are transforming, lighting, and coloring
vertices and pixels in vertex and pixel shaders. This significant revision in approach reflects the fact that the fixed pipeline will not exist in DirectX 10.
Another key feature is the inclusion of end of chapter exercises. The exercises serve three purposes: first, to test the reader's understanding of each chapter's
contents; second, to provide the reader with Direct3D programming experience; and third, to extend the chapter's topics by asking the reader to investigate new
ideas on his or her own. In many cases, the exercises are not of the "plug and chug" type, but require the reader to determine how to apply the chapter's topics to
the particular assignment. Readers are encouraged to complete chapter exercises before moving on to the next chapter.
3
Intended Audience
This book was designed with the following three audiences in mind:
Intermediate level C++ programmers who would like an introduction to 3D programming using the latest iteration of Direct3D — Direct3D 9.0.
3D programmers experienced with an API other than DirectX (e.g., OpenGL) who would like an introduction to Direct3D 9.0.
Experienced fixed-function Direct3D programmers who would like to take a shader approach.
4
Prerequisites
It should be emphasized that this is an introduction to Direct3D, shader, and game programming; it is not an introduction to general computer programming. The
reader should satisfy the following prerequisites:
General knowledge of high school mathematics: algebra, trigonometry, and (mathematical) functions, for example.
Competent with Visual Studio: should know how to create projects, add files, and specify external libraries to link, for example.
Intermediate C++ and data structure skills: comfortable with pointers, arrays, operator overloading, linked lists, inheritance and polymorphism, for
example. We also use a small subset of the STL, in particular, std::string, std::vector, and std::list.
Familiarity with Windows programming with the Win32 API is helpful but not required; we provide a Win32 primer in Appendix A.
5
剩余412页未读,继续阅读
资源评论
- Spring-TAO2017-01-16不错的资源。
- ming_rui2014-05-28不好看,格式是凌乱的
- aisajiajiao2014-01-21瞎忽悠人,明明是chm转换成的,很难看,有书签到时是的
IsaacDarwin
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 《CKA/CKAD应试指南/从docker到kubernetes 完全攻略》学习笔记 第1章docker基础(1.1-1.4)
- 基于python实现的水下压缩空气储能互补系统建模仿真与经济效益分析+源代码+论文
- 华中科技大学-自然语言处理实验,Bi-LSTM+CRF的中文分词框架,并且利用基于深度学习的方法进行中文命名实体识别++源码报告
- 基于动态罚函数的铁路车流分配与径路优化模型python源码
- 鱼群算法求解组环问题python源码+文档说明
- 基于决策优化的多波束测深测线规划模型MATLAB代码
- 课程设计-基于python实现的多目标优化算法求解带时间窗的车辆路径规划问题+源代码+文档说明+界面截图+pptx
- 基于通信信号与通信系统的MATLAB仿真源码-课程设计
- 嵌入式-信号机制(概念,发送,定时,捕捉,SIGCHLD 信号实现回收子进程)
- c语言管理系统大一大二笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功