Introduction to the DirectX 9 Shader Models - Nvidia
Introduction to the DirectX 9 Shader Models - Nvidia
Introduction to the DirectX 9 Shader Models - Nvidia
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