If you assume that the normal is a normalized vector, you can pack it to a 2-element vector:
nz = 1.0 - nx - ny
Did you mean nz = sqrt(1.0 - nx2 - ny2) ?
Yea, sorry for the confusion.
Posted 05 June 2012 - 05:55 AM
If you assume that the normal is a normalized vector, you can pack it to a 2-element vector:
nz = 1.0 - nx - ny
Did you mean nz = sqrt(1.0 - nx2 - ny2) ?
Posted 05 June 2012 - 05:51 AM
If you assume that the normal is a normalized vector, you can pack it to a 2-element vector:
nz = 1.0 - nx - ny
Did you mean nz = sqrt(1.0 - nx2 - ny2) ?