Tải bản đầy đủ (.pdf) (542 trang)

microsoft xna unleashed

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (13.13 MB, 542 trang )

www.it-ebooks.info
Microsoft
®
XNA

UNLEASHED
800 East 96th Street, Indianapolis, Indiana 46240 USA
Chad Carter
Graphics and Game
Programming for
Xbox 360 and Windows
www.it-ebooks.info
Microsoft® XNA™ Unleashed: Graphics and Game Programming for
Xbox 360 and Windows
Copyright © 2008 by Chad Carter
All rights reserved. No part of this book shall be reproduced, stored in a retrieval
system, or transmitted by any means, electronic, mechanical, photocopying, recording,
or otherwise, without written permission from the publisher. No patent liability is
assumed with respect to the use of the information contained herein. Although every
precaution has been taken in the preparation of this book, the publisher and author
assume no responsibility for errors or omissions. Nor is any liability assumed for
damages resulting from the use of the information contained herein.
ISBN-13: 978-0-672-32964-7
ISBN-10: 0-672-32964-6
Library of Congress Cataloging-in-Publication Data
Carter, Chad.
Microsoft XNA unleashed : graphics and game programming for Xbox 360 and
Windows / Chad Carter. — 1st ed.
p. cm.
ISBN 0-672-32964-6
1. Microsoft XNA (Computer file) 2. Computer games—Programming. 3. Video


games. I. Title.
QA76.76.C672C383 2007
794.8’1526—dc22
2007025607
Printed in the United States of America
First Printing July 2007
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks
have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of
this information. Use of a term in this book should not be regarded as affecting the
validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possi-
ble, but no warranty or fitness is implied. The information provided is on an “as is”
basis. The author and the publisher shall have neither liability nor responsibility to any
person or entity with respect to any loss or damages arising from the information
contained in this book or from the use of the CD or programs accompanying it.
Bulk Sales
Pearson offers excellent discounts on this book when ordered in quantity for bulk
purchases or special sales. For more information, please contact:
U.S. Corporate and Government Sales
1-800-382-3419

For sales outside of the U.S., please contact:
International Sales

Editor-in-Chief
Karen Gettman
Acquisitions Editor
Neil Rowe

Development Editor
Mark Renfrow
Managing Editor
Gina Kanouse
Project Editor
Andy Beaster
Copy Editor
Teresa Horton
Indexer
Erika Millen
Proofreader
Eileen Clark
Technical Editor
Shawn Hargreaves
Team Coordinator
Cindy Teeters
Media Developer
Dan Scherf
Book Designer
Gary Adair
Composition
Fastpages
www.it-ebooks.info
Contents at a Glance
Introduction 1
Part I Get Up and Running with XNA on Your PC and Xbox 360
1 Introducing XNA and XNA Game Studio Express 7
2 XNA and the Xbox 360
19
3 Performance Considerations

35
Part II Understanding XNA Basics
4 Creating 3D Objects 59
5 Input Devices and Cameras
85
Part III Content Pipeline
6 Loading and Texturing 3D Objects 113
7 Sound and Music
123
8 Extending the Content Pipeline
153
Part IV 2D in XNA
9 2D Basics 171
10 2D Effects
191
11 Creating a 2D Game
217
Part V High Level Shader Language
12 HLSL Basics 255
13 Advanced HLSL
275
Part VI Physics and Artificial Intelligence
14 Physics Basics 289
15 Finite State Machines and Game State Management
307
16 AI Algorithms
337
Part VII 3D Effects
17 Advanced Texturing Techniques 353
18 Special Effects

379
19 Particle System
397
Part VIII Putting It Into Practice
20 Creating a 3D Game 433
21 Improving the Game
463
22 Finishing Touches
479
Index
501
www.it-ebooks.info
Table of Contents
Introduction 1
Part I Get Up and Running with XNA on Your PC and Xbox 360
1 Introducing XNA and XNA Game Studio Express 7
What Is the XNA Framework?
7
The Foundation of the XNA Framework
8
XNA Today
9
Installing Visual C# Express
10
Installing the DirectX Runtime
14
Installing XNA Game Studio Express
15
Creating Spacewar Windows Project
17

Compiling and Running Spacewar
17
Summary
17
2 XNA and the Xbox 360 19
Creating Spacewar Xbox 360 Project
19
Buying the XNA Creators Club Subscription
20
Connecting the Xbox 360 to the PC
22
Deploying on the Xbox 360
23
Debugging on the Xbox 360
25
Creating a Test Demo for the Xbox 360
25
Programming for Dual Platforms
28
The .NET Compact Framework on the Xbox 360
33
Summary
33
3 Performance Considerations 35
Measure, Measure, Measure
35
The 80–20 Rule
36
Creating a Benchmark
37

Monitoring Performance on the Xbox 360
39
Managing Memory
40
Understanding the Garbage Collector
41
On the .NET Framework (Windows)
41
On the .NET Compact Framework (Xbox 360)
42
Optimization Suggestions
43
Creating a Micro-Benchmark Framework
43
www.it-ebooks.info
Sealing Virtual Methods 53
Collections
53
Summary
54
Part II Understanding XNA Basics
4 Creating 3D Objects 59
Vertices
59
Vectors
59
Matrices
60
Transformations
60

Translation
60
Scaling
60
Rotation
60
Transformations Reloaded
60
Creating a Camera
61
Projection
61
View
62
World
63
Vertex Buffers
63
Effects
66
Textures
68
Index Buffers
69
XNA Game Components
72
Checking Performance
75
Transformations Revolutions
79

Summary
83
5 Input Devices and Cameras 85
Creating a Game Service
85
Starting a Library
88
Working with Input Devices
91
Keyboard
91
Game Pad
95
Mouse (Windows Only)
98
Creating a Stationary Camera
100
Creating a First Person Camera
103
Creating a Split Screen
106
Summary
110
Contents
v
www.it-ebooks.info
Part III Content Pipeline
6 Loading and Texturing 3D Objects 113
Understanding the Content Pipeline
113

Loading 3D Models
114
Texturing 3D Models
120
Summary
121
7 Sounds and Music 123
Microsoft Cross-Platform Audio Creation Tool (XACT)
123
Wave Banks
124
Sounds Banks
125
Understanding Variations
125
Updating Our Input Handlers
134
Plugging In Our Sound Manager
140
Creating a Sound Demo
147
Summary
151
8 Extending the Content Pipeline 153
Creating a Skybox
153
Creating the Skybox Content Object
154
Creating the Skybox Processor
154

Creating the Skybox Compiler
162
Creating the Skybox Reader
164
Using the Skybox
165
Debugging the Content Pipeline Extension
167
Summary
168
Part IV 2D in XNA
9 2D Basics 171
Sprite Batches
171
Sprite Blend Modes
173
Sprite Sort Modes
173
Save State Modes
174
Practical Sprite Batches
175
Splash or Loading Screen Demo
176
Drawing Multiple Sprites from One Texture Demo
178
Sprite Batch Blend and Sort Mode Demo
179
Progress Bar Demo
184

Using Sprite Fonts
188
Importing Truetype Fonts
188
Microsoft XNA Unleashed
vi
www.it-ebooks.info
Creating Bitmap Fonts 189
Drawing 2D Text
189
Summary
190
10 2D Effects 191
Cel Animation
191
Rotating and Scaling
201
Blending Mode Example
203
Fade to Color
204
Making Fire Old School Style
206
Explosions
214
Summary
216
11 Creating a 2D Game 217
Setting Up the Game Skeleton
217

Creating Parallax Scrolling
220
Switching States
229
Drawing Our Hero
230
Drawing Our Enemies
235
Handling Collision Detection
241
Winning and Losing
243
Adding Transitions
244
Adding Explosions
247
Adding Sounds
252
Summary
252
Part V High Level Shader Language
12 HLSL Basics 255
Understanding the Shader Process
257
HLSL Syntax
258
Variable Types
258
Semantics
260

Structs
260
Intrinsic Functions
263
Loops and Conditions
267
Vertext Shaders
267
Pixel Shaders
268
Techniques
269
Passes
269
Passing Application Data to the GPU
270
HLSL Demo
270
Summary
274
Contents
vii
www.it-ebooks.info
13 Advanced HLSL 275
Vertex Displacement
275
Postprocessing
277
Setting Up Our Game Code
277

Setting Up Our Effect Code
280
More Postprocessing Examples
281
Negative Image
281
Switching RGB Values
281
Sharpening the Image
282
Blurring an Image
282
Embossed
283
Grayscale
283
Chalk
284
Wavy
284
Summary
285
Part VI Physics and Artificial Intelligence
14 Physics Basics 289
Kinesmatics
289
Velocity
290
Acceleration
290

Force
294
Collisions
295
Momentum
295
Impulse
296
Conservation of Momentum
296
Kinetic Energy
296
Coefficient of Restitution
296
Conservation of Kinetic Energy
297
Solving Our Final Velocities
297
Creating a Collision Response Demo
297
Summary
305
15 Finite State Machines and Game State Management 307
Finite State Machine
307
Object-Oriented Design
308
Managing Game States
309
Managing Game States Demo

312
Summary
335
Microsoft XNA Unleashed
viii
www.it-ebooks.info
16 AI Algorithms 337
Setting Up Our Demo
337
Chase Algorithm
342
A Better Chase Algorithm
343
Evading Algorithm
344
Random Movement
344
Creating a Finite State Machine
346
Summary
349
Part VII 3D Effects
17 Advanced Texturing Techniques 353
3D Lighting
353
Creating a Custom Vertex Format
353
Creating the Demo
356
Ambient Lighting

359
Directional Lighting
361
Bump Mapping
364
Normal Mapping
365
Parallax Mapping
369
Relief Mapping
372
Texture Animation
376
Summary
378
18 Special Effects 379
Transitions
379
Cross-Fade (Dissolve)
384
Directional Wipes
385
Making Fire
390
Summary
396
19 Particle System 397
Particle System Defined
397
Point Sprite Defined

398
Creating the Particle Class
398
Creating the
VertexPointerSprite Struct 404
Creating the Particle System Engine
405
Point Sprite Effect File
414
Particle System Demo
417
Creating Particle Effects
420
Rain
420
Contents
ix
www.it-ebooks.info
Bubbles 423
Laser Shield
424
Laser Scanner
426
Summary
430
Part VIII Putting It Into Practice
20 Creating a 3D Game 433
Creating the Tunnel Vision Game
433
Creating the Game States

433
Adding a Skybox to Our Game
434
Compiling the Game
435
Creating the Game Logic
435
Creating the Crosshair
456
Creating the Game-Specific Camera
457
Summary
461
21 Improving the Game 463
Creating the Radar
463
Creating the Tunnel
465
Creating the Level Timer
469
Creating the HUD
471
Adding Scoring
472
Keeping Track of High Scores
474
Summary
478
22 Finishing Touches 479
Updating the Title Screen

479
Updating the Start Menu
483
Creating the High Score Screen
487
Updating the Options Menu
492
Updating the Remaining States
495
Using the Particle System
495
Adding Sound
497
Suggested Improvements
499
Summary
500
Index 501
Microsoft XNA Unleashed
x
www.it-ebooks.info
Foreword
It’s hard to believe that it’s been so long since the first version of Managed DirectX was
released in 2002. I sit in wonderment at how far we’ve come in such a short period of
time. It wasn’t all that long ago when I was just some guy with a crazy idea that games
could (and should!) be written in managed code. We released a preview of what would
become known as “Managed DirectX” at the Game Developers Conference, and from that
point on it’s been a non-stop thrill ride. People were excited, and everyone wanted to
know if you could get the same kinds of benefits you get from managed code writing
games as you do in Windows programming. People were worried about the performance

aspects, many people simply didn’t believe. As time went on, though, more and more
people started to realize the truth. There were a great number of benefits from using
managed code, and the performance concerns were overblown.
Everyone began to notice, and soon I was leaving the DirectX team I had been with for so
long and moving to a new team that was developing something vaguely called “XNA.”
Since you have this book, I assume you know what that turned out to be (and if not, keep
reading, you will soon enough)! The team had a vision of game development that could
change the world. Everything I had hoped to achieve when I started out on this journey
so many years ago was achieved and then some. We worked long, hard hours, but we got
a release out for people to play with and we did it in record time. Now not only could
you develop games that you played on your computer, you could also develop games you
could play on your Xbox 360. Nothing like this had ever been done before and I felt
honored to be a part of it.
Now, as then, I’m excited for the future of game development. When I see an author
write a book like this, I get even more excited, and I hope you do as well. Whether you’ve
never tried to write a game before, or you are simply looking for the “XNA way” of doing
things, you’ll be pleased with what you find.
For me, I’m anxiously awaiting what the community can develop. I look forward to
playing the next generation of amazing games. I get excited as I think of games that break
the mold from all the same genres we see today, and do something completely original. I
hope you will be the person writing them!
—Tom Miller, Developer
XNA Game Studio Express, Microsoft Corporation
www.it-ebooks.info
About the Author
Chad Carter is the CTO at Robertson Marketing Group (RMG). RMG services many
Fortune 500 companies that utilize the e-commerce system he architected and developed
from the ground up for the promotional business sector. He has been creating DirectX
applications since 1996 and has developed games using Managed DirectX. Chad created a
3D locomotive simulator for Norfolk Southern that is used to teach children to obey rail-

road crossing signals. Chad’s Web site devoted to the XNA Framework can be found
online at www.xnaessentials.com.
www.it-ebooks.info
Dedication
To the most beautiful woman in the world, my wife Christy,
and my precious daughter, Caleigh.
www.it-ebooks.info
Acknowledgments
There are a host of people responsible for making this book a reality. For starters, my wife
was extremely supportive of me writing this book. There were many long hours, late
nights, and missing weekends involved in this project and she handled all of the normal
duties I typically attend to. There is absolutely no way this book could have been
completed if it were not for her support! Christy, I love you. Thank you! I’d also like to
thank Caleigh for being patient with her daddy when he had to stop playing and “work
on the book.”
Next, I want to give praise to my Lord, God Almighty, who sustained me during these
past few months to actually complete this book. I also need to thank the prayer partners
and the Joshua’s Men group for their prayers for me as I took on this task.
Brian Wilson, a coworker and a friend, deserves a big thank you for helping me keep to
the goals I set. Those Thursday meetings really motivated and inspired me! I look forward
to reading your book, Brian!
Next, I’d like to thank Neil Rowe, the acquisitions editor at Sams Publishing. He agreed to
work with me on this project and was my main point of contact at Sams. Although the
original deadline was not met (partially due to the refresh version of the XNA Framework
being released), there was never any major pressure from Neil. I’d like to also thank the
rest of the Sams team that I had direct contact with on this project including Mark
Renfrow, Cindy Teeters, Teresa Horton, Andrew Beaster, and Mary Sudul. I’d also like to
thank the rest of the Sams team that I did not have any communication with but were
behind the scenes making this book a reality. I’m looking forward to seeing those names
on the first page of this book.

A big thank you goes out to Shawn Hargreaves, an XNA Framework developer at
Microsoft, who was the technical editor of this book. The book is definitely better because
of his expertise! His blog can be found at Even before
he was the technical editor of this book, his blog and his forum answers helped me
tremendously in learning this technology. I’m very thankful that Shawn was the technical
editor of this book.
I’d like to thank all of the XNA Framework developers and Microsoft in general for
making this great technology!
I’d like to thank the XNA community in general for all of the excellent tutorials and
sample code that were produced in such a short amount of time. With a community like
this, we really could be on the verge of YouTube for games!
I’d also like to thank my parents, John and Sandra Carter, for providing me with a good
education and instilling a good work ethic in me. Their support means the world to me.
I’d also like to thank my wife’s mom and dad, Wilson and Vicki Newsome, for helping our
family with many of the duties that I normally handle, but abandoned to write this book.
www.it-ebooks.info
My brother, Joshua Carter, recently joined the Army and is in boot camp as I write this.
Having a brother serve our country brings me great joy and a tremendous amount of
pride. Thank you and all of our troops for helping keep this country free.
Finally, I’d like to thank you for picking up this book. I hope that it serves it purpose and
brings insight into some of the mysteries of writing games. This book does no good if it is
not read, so thank you and happy programming!
www.it-ebooks.info
We Want to Hear From You!
As the reader of this book, you are our most important critic and commentator. We value
your opinion and want to know what we’re doing right, what we could do better, what
areas you’d like to see us publish in, and any other words of wisdom you’re willing to
pass our way.
As a senior acquisitions editor for Sams, I welcome your comments. You can fax, email, or
write me directly to let me know what you did or didn’t like about this book[md]as well

as what we can do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this book, and
that due to the high volume of mail I receive, I might not be able to reply to every message.
When you write, please be sure to include this book’s title and author as well as your
name and phone or fax number. I will carefully review your comments and share them
with the author and editors who worked on the book.
Email:
Fax: 317-428-3310
Mail: Neil Rowe, Senior Acquisitions Editor
Sams Publishing
800 East 96th Street
Indianapolis, IN 46240 USA
www.it-ebooks.info
Introduction
Many developers became interested in programming because they saw a video game and
thought, “How did they do that?” This book helps demystify what is required to make
video games. Being able to write games on a next-generation console like the Xbox 360
has never been an option for the masses before. Now with the XNA Framework, games
can be written for the console.
By the end of the book, readers will have created two complete games and many demos
along the way. This book takes a serious look at performance-related issues when writing
games using XNA for Windows and the Xbox 360. It devotes two chapters to the High
Level Shader Language (HLSL), which is a necessity for writing great games. It covers
physics and artificial intelligence (AI). It also covers special effects, including explosions,
transitions, and how to create a 3D particle system. It also demonstrates how to create a
sound project using the Microsoft Cross-Platform Audio Tool (XACT) and how to inte-
grate the sound into the game. Saving and loading a high score list and creating full
menu system are also taught in this book. In general, this book contains a great founda-
tion for many topics that need to be learned to create a full game.
Who Should Read This Book?

This book was written for developers. The reader should have a good understanding of
programming in general. The book uses C#, but if the reader knows any modern language
like C++, Java, or VB.NET he or she will have no problem understanding the code in this
book. The book assumes some understanding of the Microsoft .NET Framework, as that is
what the XNA Framework runs on. Without prior experience writing code using the .NET
Framework, the reader might have to do a little research now and then, but should not
have trouble reading this book.
This book was written with a few different audiences in mind. Business application devel-
opers who want to use their programming skill set to write computer games are one audi-
ence. Graphics and game developers who have been around the OpenGL and DirectX
block should also find useful information in this book—especially in seeing how things
are done “the XNA way.” The book also targets readers who have some programming
experience but have not done anything formal. The book teaches by example. It is
written in such a way that if readers are not in front of their computers, they can still get
valuable information from the book because the code is listed in the book as it is being
discussed.
www.it-ebooks.info
2
Microsoft XNA Unleashed
Hardware and Software Requirements
The code in this book is compiled against the XNA Framework 1.0 Refresh. In order to
complete the games and demos in this book the requirements that follow must be met.
Supported Operating Systems
The following operating systems are supported:
• Windows XP Home Edition
• Windows XP Professional Edition
• Windows XP Media Center Edition
• Windows XP Tablet Edition
• Windows Vista Home Basic Edition
• Windows Vista Home Premium Edition

• Windows Vista Business Edition
• Windows Vista Enterprise Edition
• Windows Vista Ultimate Edition
Windows XP requires Service Pack 2 or later.
Hardware Requirements
When running XNA Framework games on Windows, a graphics card that supports Shader
Model 1.1 is required. This book has samples that use Shader Model 2.0 and a couple that
use Shader Model 3.0. To get the most from this book, a graphics card that supports
Shader Model 3.0 is required. The graphics card should have the most up-to-date drivers.
Updated drivers can be found on the graphics card’s hardware vendor Web sites.
When running XNA Framework games on the Xbox 360 console, a hard drive must be
connected to the console.
Software Requirements
All of the software required to utilize the XNA Framework on Windows is free:
Microsoft Visual C# 2005 Express Edition
Microsoft XNA Game Studio Express
DirectX 9.0c
Instructions on installing the software can be found in Chapter 1, “Introducing the XNA
Framework and XNA Game Studio Express.”
www.it-ebooks.info
Introduction
3
Code Examples
The source code for examples in this book can be found on the accompanying CD.
Any updates to the code can be downloaded via www.samspublishing.com or
www.xnaessentials.com/unleashed.
www.it-ebooks.info
This page intentionally left blank
www.it-ebooks.info
PART I

Get Up and Running
with XNA on Your PC
and Xbox 360
IN THIS PART
CHAPTER 1 Introducing XNA and XNA
Game Studio Express 7
CHAPTER 2
XNA and the Xbox 360 19
CHAPTER 3
Performance Considerations 35
www.it-ebooks.info
This page intentionally left blank
www.it-ebooks.info
IN THIS CHAPTER
. What Is the XNA Framework?
. Installing Visual C# Express
. Installing the DirectX Runtime
. Installing XNA Game Studio
Express
. Creating Spacewar Windows
Project
. Compiling and Running
Spacewar
CHAPTER 1
Introducing the XNA
Framework and XNA
Game Studio Express
Most developers I know decided to enter the computer
field and specifically programming because of computer
games. Game development can be one of the most chal-

lenging disciplines of software engineering—it can also be
the most rewarding!
Never before has it been possible for the masses to create
games for a game console, much less a next generation
game console. We are coming in on the ground floor of a
technology that is going to experience tremendous growth.
Microsoft is leading the way into how content will be
created for game consoles. Soon other game console manu-
facturers will be jumping at a way to allow the public to
create content for their machines. The great news for the
Xbox 360 is that Microsoft has spent so much time over
the years creating productive and stable development envi-
ronments for programmers. We will be installing one of
Microsoft’s latest integrated development environments
(IDEs) in this chapter. Before we get to that, let’s take a look
at the technology we discuss in this book—XNA.
What Is the XNA Framework?
You have probably heard the statement, “To know where
you are going, you need to know where you have been.”
I am uncertain if that is entirely true, but I do believe it
applies here. Before we dig into exactly what XNA is and
what it can do for us, let’s take a moment to look at
DirectX because that is what the XNA Framework is
built on.
www.it-ebooks.info
8
CHAPTER 1 Introducing the XNA Framework and XNA Game Studio Express
The Foundation of the XNA Framework
Let’s take a journey back to the days of DOS on the PC. When programming games,
graphic demos, and the like in DOS, programmers typically had to write low-level code to

talk directly to the sound card, graphics cards, and input devices. This was tedious and
the resulting code was error prone because different manufacturers would handle different
BIOS interrupts, IO ports, and memory banks—well, differently, so the code would work
on one system and not another.
Later, Microsoft released the Windows 95 operating system. Many game programmers
were skeptical at writing games for Windows—and rightly so—because there was no way
to get down to hardware level to do things that required a lot of speed. Windows 95 had
a protected memory model that kept developers from directly accessing the low-level
interrupts of the hardware.
To solve this problem, Microsoft created a technology called DirectX. It was actually
called Windows Game SDK to begin with, but quickly switched names after a reporter
poked fun at the API names DirectDraw, DirectSound, and DirectPlay, calling the SDK
Direct “X.” Microsoft ran with the name and DirectX 1.0 was born a few months after
Windows 95 was released. I remember working with DirectDraw for a couple of demos
back when this technology first came out.
Because of DirectX, developers had a way to write games with one source that would work
on all PCs regardless of their hardware. Hardware vendors were eager to work with
Microsoft on standardizing an interface to access their hardware. They created device
drivers to which DirectX would map its API, so all of the work that previously had to be
done by game programmers was taken care of, and programmers could then spend their
time doing what they wanted to—write games! Vendors called this a Hardware
Abstraction Layer (HAL). They also developed a Hardware Emulation Layer (HEL), which
emulates hardware through software in case hardware isn’t present. Of course, this is
slower but it allowed certain games to be run on machines with no special hardware.
After a couple of years Microsoft released DirectX 3.0, which ran on Windows NT 4 as
well as Windows 95. As part of those upgrades, they introduced Direct3D. This allowed
developers to create 3D objects inside of 3D worlds. DirectX 4 was never released, but
DirectX 5 was released in 1997 and later had some upgrades to work under Windows 98.
When DirectX 8 came on the scene in 2000, some of the newly available graphics hard-
ware had vertex and pixel shaders. As a result, Microsoft added in a way to pass custom

program code to the hardware. Through assembly code, the game developer could manip-
ulate the data the main game passed to the graphics card. This assembly code was
consumed directly by the graphics hardware.
When there was no graphics hardware, games were slow, but they were very flexible.
Later, as hardware rendering became prominent, the games were faster, but they were not
very flexible in that all of the games really started to look the same. Now with shaders,
the speed of the hardware is combined with the flexibility for each game to render and
light its 3D content differently.
www.it-ebooks.info

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×