30.04.2014 Views

Introduction to the DirectX 9 Shader Models - Nvidia

Introduction to the DirectX 9 Shader Models - Nvidia

Introduction to the DirectX 9 Shader Models - Nvidia

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Precision Pitfalls<br />

• Viewspace positions<br />

– Subtract from <strong>the</strong> view point in <strong>the</strong> vertex shader – <strong>the</strong><br />

vertex shader has 32-bit precision<br />

• Tangent Space positions<br />

– For bump maps<br />

– Translate & Rotate in <strong>the</strong> vertex shader<br />

• Light Space positions<br />

– Ffor attenuation<br />

– Translate & Rotate in <strong>the</strong> vertex shader<br />

– Then scale by 1 / light range

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

Saved successfully!

Ooh no, something went wrong!