13.12.2012 Views

ShaderX Shader Programming Tips & Tricks With DirectX 9

ShaderX Shader Programming Tips & Tricks With DirectX 9

ShaderX Shader Programming Tips & Tricks With DirectX 9

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction<br />

This book is a collection of articles that discuss ways to use vertex and pixel<br />

shaders to implement a variety of effects. The following provides a brief overview<br />

of these articles:<br />

Section I — Geometry Manipulation <strong>Tricks</strong><br />

This section starts with a <strong>DirectX</strong> 9 sequel to Dean Calver’s vertex compression<br />

article in Direct3D <strong><strong>Shader</strong>X</strong>: Pixel and Vertex <strong>Shader</strong> <strong>Tips</strong> and <strong>Tricks</strong>. Dean shows<br />

a number of ways to reduce vertex throughput by compressing vertex data.<br />

Carsten Wenzel points out how to use lookup tables in vertex shaders to reduce<br />

the workload of the vertex shader hardware. A feature-complete and very hardware-friendly<br />

terrain engine is explained in Daniel Wagner’s article, “Terrain<br />

Geomorphing in the Vertex <strong>Shader</strong>.” The speed of the example program provided<br />

with source is impressive. Creating 3D planets for a space-shooter type of game<br />

can be done entirely on the GPU, which Jesse Laeuchli shows how to do in his<br />

article “3D Planets on the GPU.”<br />

The vs_3_0 vertex shader model has a feature called vertex texturing, which<br />

Kristof Beets uses to create a very realistic-looking cloth animation in his article<br />

“Cloth Animation with Pixel and Vertex <strong>Shader</strong> 3.0.” In “Collision <strong>Shader</strong>s,”<br />

Takashi Imagire, who is known for the example programs on his web site<br />

(www.t-pot.com), uses shaders to calculate collisions, something that has never<br />

been shown before. The final article in this section covers using displacement<br />

mapping as a method of geometry compression. The main aim of Tom Forsyth’s<br />

article is to allow people to take data from the industry’s current mesh and texture<br />

authoring pipelines, and to derive displacement map data from them.<br />

Section II — Rendering Techniques<br />

The section starts with an article by Greg James that presents a convenient and<br />

flexible technique for rendering ordinary polygon objects of any shape as thick<br />

volumes of light scattering or light absorbing material with ps_1_3. O’dell Hicks<br />

shows in his article, “Screen-aligned Particles with Minimal VertexBuffer<br />

Locking,” how to create screen-aligned particles with a vertex shader, bringing us<br />

one step closer to the goal of having almost everything done by the GPU. “Hemisphere<br />

Lighting with Radiosity Maps,” written by Shawn Hargreaves, shows a<br />

lighting model that was designed for fast moving objects in outdoor environments.<br />

Its goals are to tie in the moving objects with their surroundings, to convey a sensation<br />

of speed, and to be capable of rendering large numbers of meshes at a good<br />

xix

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!