Ashikhmin-Shirley lightning model,
Members - Reputation: 100
Posted 02 April 2012 - 08:42 AM
Crossbones+ - Reputation: 13030
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?
“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”
Members - Reputation: 253
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 >