Shaderx2 - Shader Programming Tips & Tricks With Directx 9.pdf

(15314 KB) Pobierz
ShaderX Shader Programming Tips & Tricks With DirectX 9
243421755.002.png
ShaderX 2 : Shader
Programming Tips &
Tricks with DirectX 9
Edited by
Wolfgang F. Engel
Wordware Publishing, Inc.
243421755.003.png
Library of Congress Cataloging-in-Publication Data
ShaderX 2 : shader programming tips and tricks with DirectX 9 / edited by
Wolfgang F. Engel.
p. cm.
Includes bibliographical references and index.
ISBN 1-55622-988-7 (paperback, companion CD-ROM)
1. Computer games--Programming. 2. Three-dimensional display systems.
I. Title: ShaderX squared. II. Engel, Wolfgang F.
QA76.76.C672S48 2003
794.8'16693--dc22
2003018871
CIP
© 2004, 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 1-55622-988-7
10987654321
0308
Crystal Reports is a registered trademark of Crystal Decisions, Inc. in the United States and/or other countries.
Names of Crystal Decisions products referenced herein are trademarks or registered trademarks of Crystal Decisions or its
Screen shots used in this book remain the property of their respective companies.
All 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
243421755.004.png
Contents
Preface
vii
About the Authors
ix
Introduction
xix
Section I—Geometry Manipulation Tricks
1
Using Vertex Shaders for Geometry Compression
3
Dean Calver
Using Lookup Tables in Vertex Shaders
13
Carsten Wenzel
Terrain Geomorphing in the Vertex Shader
18
Daniel Wagner
3D Planets on the GPU
33
Jesse Laeuchli
Cloth Animation with Pixel and Vertex Shader 3.0
40
Kristof Beets
Collision Shaders
58
Takashi Imagire
Displacement Mapping
73
Tom Forsyth
Section II — Rendering Techniques
87
Rendering Objects as Thick Volumes
89
Greg James
Screen-aligned Particles with Minimal VertexBuffer Locking
107
O’dell Hicks
Hemisphere Lighting with Radiosity Maps
113
Shawn Hargreaves
iii
243421755.005.png
Contents
Galaxy Textures
123
Jesse Laeuchli
Turbulent Sun
127
Jesse Laeuchli
Fragment-level Phong Illumination
131
Emil Persson
Specular Bump Mapping on Pre-ps_1_4 Hardware
149
Matthew Halpin
Voxel Rendering with PS_3_0
161
Aaron Burton
Simulating Blending Operations on Floating-point Render Targets 172
Francesco Carucci
Rendering Volumes in a Vertex & Pixel Program by Ray Tracing 177
Eli Z. Gottlieb
Normal Map Compression
185
Jakub Klarowicz
Drops of Water and Texture Sprites
190
Sylvain Lefebvre
Advanced Water Effects
207
Kurt Pelzer
Efficient Evaluation of Irradiance Environment Maps
226
Peter-Pike J. Sloan
Practical Precomputed Radiance Transfer
232
Peter-Pike J. Sloan
Advanced Sky Dome Rendering
240
Marco Spoerl and Kurt Pelzer
Deferred Shading with Multiple Render Targets
251
Nicolas Thibieroz
Meshuggah’s Effects Explained
270
Carsten Wenzel
Layered Car Paint Shader
293
John Isidoro, Chris Oat, and Natalya Tatarchuk
Motion Blur Using Geometry and Shading Distortion
299
Natalya Tatarchuk, Chris Brennan, Alex Vlachos, and John Isidoro
iv
243421755.001.png
Zgłoś jeśli naruszono regulamin