Real-Time Shader Programming-Covering DirectX 9.0

Ron Fosner

MORGAN KAUFMANN PUBLISHERS
AN IMPRINT OF ELSEVIER SCIENCE

Publishing Director: Diane D. Cerra
Publishing Services Manager: Edward Wade
Project Managment/Proofreading: Yonie Overton
Editorial Coordinator: Mona Buehler
Cover Design: Ross Carron Design
Text Design: Frances Baca Design
Composition: Proctor-Willenbacher
Technical Illustration: Dartmouth Publishing, Inc.
Copyeditor: Robert Fiske
Indexer: Richard Shrout
Interior Printer: Quebecor World Book Services
Cover Printer: Phoenix Color Corporation

About the cover: The cover image, "Pipe Dream" Demo, is taken from a real-time DirectX 9 Radeon 9700 version of "Pipe Dream" from Animusic's DVD entitled, ANIMUSIC: A Computer Animation Video Album (http://www.animusic.com). This was shown in offline-rendered form in the Electronic Theatre at Siggraph 2001. All of the animation is data-driven from the original data from the Animusic demo. However, the motion blur is done using shaders to dynamically alter the shape and lighting of the balls (which are really a cylinder covered by two hemispheres) and the strings (which have a static string shape and a plucked vibrating shape). For example, a ball's shape was distorted in the vertex shader by stretching the length of the cylinder's axis from the ball's apparent velocity. The velocity was used to calculate a vertex blurriness factor in the vertex shader, which was then passed to the pixel shader, where the blurriness was used to spread out the specular highlights and make the highlight spread in the direction of travel. The full details can be found on ATI's website. Thanks to David Gosselin of ATI Research for being a good sport about providing me images on short notice.

Figure credits: (1) Figure 3–39 from "Digital Facial Engraving" by Victor Ostromoukhov, Proceedings of SIGGRAPH `99, page 421. © 1999 Association for Computing Machinery. Reprinted with permission. (2) Figure 3–40 from "Real-Time Hatching" by Emil Praun, Hugues Hoppe, Matthew Webb, and Adam Finkelstein, Proceedings of SIGGRAPH `01, page 583. © 2001 Association for Computing Machinery. Reprinted with permission. (3) Figure 3–42 from "A Non-Photorealistic Lighting Model for Automatic Technical Illustration" by Amy Gooch, Bruce Gooch, Peter Shirley, and Elaine Cohen, Proceedings of SIGGRAPH `98, page 452. © 1998 Association for Computing Machinery. Reprinted with permission. (4) Figure 3–43 from Jet Set Radio Future.© 2002 Sega Enterprises, Inc. All rights reserved.

Designations used by companies to distinguish their products are often claimed as trademarks or registered trademarks. In all instances in which Morgan Kaufmann Publishers is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration.

Morgan Kaufmann Publishers
An Imprint of Elsevier Science
340 Pine Street, Sixth Floor
San Francisco, CA 94104–3205
http://www.mkp.com

Copyright © 2003 Elsevier Science (USA)

All rights reserved.

07 06 05 04 03 5 4 3 2 1

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—electronic, mechanical, photocopying, or otherwise—without the prior written permission of the publisher.

Library of Congress Control Number: 2002112069

1-55860-853-2

To my three exciting women—
Sue, Rachael, and Olivia.
Thank you
.

About the Author

Ron Fosner has worked as a graphics programmer since the mid-1980s, first doing rudimentary 3D graphics in assembly language, then learning OpenGL when it became available on Windows systems. The lack of any good information on programming OpenGL on Windows led him to write the first widely successful introductory book on OpenGL programming, OpenGL Programming for Windows 95 and Windows NT. In addition to writing books, Ron has published numerous articles on 3D graphics and code optimization and is a frequent lecturer at the Windows Developer (WinDev) and Game Developers (GDC) conferences.

In the mid-1990s, the leading edge of real-time 3D graphics programming shifted from data visualization to game programming and so did Ron, forming a graphics programming company. Since that time, Ron has programmed four rendering engines, one facial animation engine, a stock market visualization tool, and a video editing tool. Recently, he has been involved in programming internet tools for performance and unit testing. In addition to programming, Ron tries to spread his knowledge on graphics and programming by writing articles for numerous magazines, including Microsoft Systems Journal, Dr. Dobb's, Game Developer Magazine, and Gamasutra, as well as articles for the Microsoft Developer Network CDs.



Real-Time Shader Programming(c) Covering Directx 9. 0
Real-Time Shader Programming (The Morgan Kaufmann Series in Computer Graphics)
ISBN: 1558608532
EAN: 2147483647
Year: 2005
Pages: 104
Authors: Ron Fosner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net