diff options
author | Thomas Dinges <blender@dingto.org> | 2013-08-23 16:19:35 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-08-23 16:19:35 +0400 |
commit | f560d25666b6aa7b1451a5626525505183f8fffa (patch) | |
tree | fc5ca40a0f6ef1a31b230dde3e4b693d35e65ed5 /intern/cycles/render/curves.cpp | |
parent | c752346cfa6b3bfeb99857492dc524dcfb3366f7 (diff) |
Code cleanup / Cycles:
* Some style tweaks for hair code.
Diffstat (limited to 'intern/cycles/render/curves.cpp')
-rw-r--r-- | intern/cycles/render/curves.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/render/curves.cpp b/intern/cycles/render/curves.cpp index fd2b4b5c7e9..5730b5218ca 100644 --- a/intern/cycles/render/curves.cpp +++ b/intern/cycles/render/curves.cpp @@ -35,12 +35,14 @@ void curvebounds(float *lower, float *upper, float3 *p, int dim) float *p1 = &p[1].x; float *p2 = &p[2].x; float *p3 = &p[3].x; + float fc = 0.71f; float curve_coef[4]; curve_coef[0] = p1[dim]; curve_coef[1] = -fc*p0[dim] + fc*p2[dim]; curve_coef[2] = 2.0f * fc * p0[dim] + (fc - 3.0f) * p1[dim] + (3.0f - 2.0f * fc) * p2[dim] - fc * p3[dim]; curve_coef[3] = -fc * p0[dim] + (2.0f - fc) * p1[dim] + (fc - 2.0f) * p2[dim] + fc * p3[dim]; + float discroot = curve_coef[2] * curve_coef[2] - 3 * curve_coef[3] * curve_coef[1]; float ta = -1.0f; float tb = -1.0f; @@ -70,7 +72,6 @@ void curvebounds(float *lower, float *upper, float3 *p, int dim) } *upper = max(*upper, max(exa,exb)); *lower = min(*lower, min(exa,exb)); - } /* Hair System Manager */ |