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

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

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

Precision Pitfalls<br />

If you are lighting in world space,<br />

your distances are typically far away<br />

from <strong>the</strong> origin, and most of <strong>the</strong> 16<br />

bits are allocated <strong>to</strong> <strong>the</strong> left of <strong>the</strong><br />

decimal point <strong>to</strong> maximize range, at<br />

<strong>the</strong> expense of precision.<br />

World<br />

Space<br />

Vec<strong>to</strong>rs<br />

ps.2.0<br />

sub r0, t0, t1 //

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

Saved successfully!

Ooh no, something went wrong!