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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction<br />

Nicolas Thibieroz shows how to implement deferred shading in “Deferred<br />

Shading with Multiple Render Targets.” Contrary to traditional rendering algorithms,<br />

deferred shading submits the scene geometry only once and stores perpixel<br />

attributes into local video memory to be used in the subsequent rendering<br />

passes. Carsten Wenzel explains how he created the effects in his Meshuggah<br />

demo in “Meshuggah’s Effects Explained.” It is impressive what he has done on<br />

<strong>DirectX</strong> 8.1-capable hardware and on the Xbox. John Isidoro, Chris Oat, and<br />

Natalya Tatarchuk explain how they created a two-tone, suspended microflake car<br />

paint shader in “Layered Car Paint <strong>Shader</strong>.” Motion blur effects as shown in the<br />

Animusic demo Pipe Dream are described in “Motion Blur Using Geometry and<br />

Shading Distortion” by Natalya Tatarchuk, Chris Brennan, Alex Vlachos, and John<br />

Isidoro. “Simulation of Iridescence and Translucency on Thin Surfaces” by<br />

Natalya Tatarchuk and Chris Brennan focuses on simulating the visual effect of<br />

translucency and iridescence of thin surfaces such as butterfly wings.<br />

Arkadiusz Waliszewski describes in “Floating-point Cube Maps” how to use<br />

floating-point cube maps to get a much more visually pleasing cube mapping<br />

effect. Thomas Rued compares three different kinds of stereoscopic rendering and<br />

provides shader implementations for each of them in his article “Stereoscopic<br />

Rendering in Hardware Using <strong>Shader</strong>s.” The article “Hatching, Stroke Styles, and<br />

Pointillism” by Kevin Buchin and Maike Walther shows how to implement hatching<br />

by combining strokes into a texture. These compositions of strokes can convey<br />

the surface form through stroke orientation, the surface material through<br />

stroke arrangement and style, and the effect of light on the surface through stroke<br />

density. Guillaume Werle explains a technique that achieves a realistic-looking<br />

layered fog in “Layered Fog.” It computes the height on a per-vertex basis and<br />

uses the texture coordinate interpolator to get per-pixel precision. Ádám<br />

Moravánszky’s article, “Dense Matrix Algebra on the GPU,” shows how to use<br />

shaders to solve two common problems in scientific computing: solving systems<br />

of linear equations and linear complementarity problems. Both of these problems<br />

come up in dynamics simulation, which is a field drawing increasing interest from<br />

the game developer community.<br />

Section III — Software <strong>Shader</strong>s and <strong>Shader</strong> <strong>Programming</strong> <strong>Tips</strong><br />

Dean Macri’s article, “Software Vertex <strong>Shader</strong> Processing,” explores optimization<br />

guidelines for writing shaders that will use the software vertex processing pipeline.<br />

Additionally, the techniques described in this article should also apply to vertex<br />

shaders written for graphics hardware. Emulating pixel shaders efficiently on<br />

the CPU might be the first step in writing a software 3D engine with shader support<br />

that runs only on the CPU. In “x86 <strong>Shader</strong>s-ps_2_0 <strong>Shader</strong>s in Software,”<br />

Nicolas Capens shows how to create a fast-performing software emulation of<br />

ps_2_0 shaders by using a run-time assembler. Oliver Weichhold has created a<br />

software implementation of the Direct3D pipeline. His article, “SoftD3D: A Software-only<br />

Implementation of Microsoft’s Direct3D API,” describes how he did it.<br />

Jeffrey Kiel shows a very handy trick for using named constants in shader development<br />

in “Named Constants in <strong>Shader</strong> Development.”<br />

xxi

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

Saved successfully!

Ooh no, something went wrong!