Ashikhmin-Shirley lightning model
Members - Reputation: 100
Posted 02 April 2012 - 08:42 AM
Crossbones+ - Reputation: 5597
Posted 03 April 2012 - 03:40 AM
This worries me. If your n and h are normalized, then dot(n, h) is in the range [-1,+1] so what you describe shouldn't happen.
I.m having problems with dot(n, h) exponent, because its numeric value is to big
Are you sure your vectors are normalized?
"The best comment is a deleted comment."
Members - Reputation: 252
Posted 03 April 2012 - 08:06 AM
Also, the pow function does not work with values below or equal 0 because the implementation is done with the equation exp(log(value) * value). Try to put something like this: max(dot(…), 0.0001f);
Project page: < XNA FINAL Engine >