Ashikhmin-Shirley lightning model
Members - Reputation: 100
Posted 02 April 2012 - 08:42 AM
Crossbones+ - Reputation: 9267
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 slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.
- Pessimal Algorithms and Simplexity Analysis
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 >