diff options
author | Thomas Dinges <blender@dingto.org> | 2013-05-12 18:13:29 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-05-12 18:13:29 +0400 |
commit | 7636aeffe1674ea2281869a0d81cbe20ee42e8b9 (patch) | |
tree | 61ab2f2c9bd74ff35d074e4f27a0885b6ac98a32 /intern/cycles/kernel/closure/bsdf_phong_ramp.h | |
parent | 469979f9cb08640fbc00a43b59eee459460e74e1 (diff) |
Cycles / Math:
* Add M_2PI_F and M_4PI_F constants and use them inside the codebase.
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_phong_ramp.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_phong_ramp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_phong_ramp.h b/intern/cycles/kernel/closure/bsdf_phong_ramp.h index ce163e933cf..e518f3675c8 100644 --- a/intern/cycles/kernel/closure/bsdf_phong_ramp.h +++ b/intern/cycles/kernel/closure/bsdf_phong_ramp.h @@ -100,7 +100,7 @@ __device int bsdf_phong_ramp_sample(const ShaderClosure *sc, const float3 colors float3 T, B; make_orthonormals (R, &T, &B); - float phi = 2 * M_PI_F * randu; + float phi = M_2PI_F * randu; float cosTheta = powf(randv, 1 / (m_exponent + 1)); float sinTheta2 = 1 - cosTheta * cosTheta; float sinTheta = sinTheta2 > 0 ? sqrtf(sinTheta2) : 0; |