Sunday, January 3, 2010

IEEE float special values (infinity, NaN)

I couldn't find anything in the Cg documentation on how to specify infinity or NaN, but these seem to work:

Infinity: 0x7f800000
-Infinity: 0xff800000
NaN: 0x7fc00000

No comments: