Introduction to the DirectX 9 Shader Models - Nvidia

Introduction to the DirectX 9 Shader Models - Nvidia Introduction to the DirectX 9 Shader Models - Nvidia

30.04.2014 Views

Gradient Instructions • Useful for shader anti-aliasing • DSX, DSY compute derivative of a vector wrt screen space position ds dx dt dx dr dx ds dy dt dy dr dy • • • • Use derivatives with TEXLDD...

Texture fetch with gradients • Gradients used to calculate texture LOD – Custom Mipmapping – Anisotropic filtering • LOD clamping and constant biasing still apply • Example – Calculate per-pixel vector for environment map – Find derivative of vector wrt X,Y – Fetch envmap using TEXLDD to bias mip level

Texture fetch with gradients<br />

• Gradients used <strong>to</strong> calculate texture LOD<br />

– Cus<strong>to</strong>m Mipmapping<br />

– Anisotropic filtering<br />

• LOD clamping and constant biasing still apply<br />

• Example<br />

– Calculate per-pixel vec<strong>to</strong>r for environment map<br />

– Find derivative of vec<strong>to</strong>r wrt X,Y<br />

– Fetch envmap using TEXLDD <strong>to</strong> bias mip level

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

Saved successfully!

Ooh no, something went wrong!