Commit f1171d6c authored by Lee-Ping Wang's avatar Lee-Ping Wang
Browse files

Cleanup ; removed if statements, spaces instead of tabs.

parent 070354db
......@@ -13,10 +13,7 @@
real sigma1_2 = sigmaEpsilon1.x*sigmaEpsilon1.x;
real sigma2_2 = sigmaEpsilon2.x*sigmaEpsilon2.x;
real sigmasum = sigma1_2+sigma2_2;
real sigma = 0.0f;
if (sigmasum != 0.0f) {
sigma = 2*(sigmaEpsilon1.x*sigma1_2 + sigmaEpsilon2.x*sigma2_2)/(sigma1_2+sigma2_2);
}
real sigma = (sigmasum == 0.0f ? (real) 0 : 2*(sigmaEpsilon1.x*sigma1_2 + sigmaEpsilon2.x*sigma2_2)/(sigma1_2+sigma2_2));
#endif
#if EPSILON_COMBINING_RULE == 1
real epsilon = 0.5f*(sigmaEpsilon1.y + sigmaEpsilon2.y);
......@@ -24,16 +21,10 @@
real epsilon = SQRT(sigmaEpsilon1.y*sigmaEpsilon2.y);
#elif EPSILON_COMBINING_RULE == 3
real epssum = sigmaEpsilon1.y+sigmaEpsilon2.y;
real epsilon = 0.0f;
if (epssum != 0.0f) {
epsilon = 2*(sigmaEpsilon1.y*sigmaEpsilon2.y)/(sigmaEpsilon1.y+sigmaEpsilon2.y);
}
real epsilon = (epssum == 0.0f ? (real) 0 : 2*(sigmaEpsilon1.y*sigmaEpsilon2.y)/(sigmaEpsilon1.y+sigmaEpsilon2.y));
#else
real epsilon_s = SQRT(sigmaEpsilon1.y) + SQRT(sigmaEpsilon2.y);
real epsilon = 0.0f;
if (epsilon_s != 0.0f) {
epsilon = 4*sigmaEpsilon1.y*sigmaEpsilon2.y/(epsilon_s*epsilon_s);
}
real epsilon = (epsilon_s == 0.0f ? (real) 0 : 4*sigmaEpsilon1.y*sigmaEpsilon2.y/(epsilon_s*epsilon_s));
#endif
real r6 = r2*r2*r2;
real r7 = r6*r;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment