Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-17 16:49:57 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-18 15:51:29 +0400
commit2d7b53331c80e878d48e3c2a6bdc81fef9a1a6e0 (patch)
tree47801e697a83c3a3dcec1452c8799ab4d6878304 /intern
parentdc847607b6bd18d0811ed72f14876d9e33251196 (diff)
Fix cycles using acosf in panorama render when it should use safe_acosf.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_projection.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_projection.h b/intern/cycles/kernel/kernel_projection.h
index e2108604bc8..6744471d659 100644
--- a/intern/cycles/kernel/kernel_projection.h
+++ b/intern/cycles/kernel/kernel_projection.h
@@ -39,7 +39,7 @@ CCL_NAMESPACE_BEGIN
ccl_device float2 direction_to_spherical(float3 dir)
{
- float theta = acosf(dir.z);
+ float theta = safe_acosf(dir.z);
float phi = atan2f(dir.x, dir.y);
return make_float2(theta, phi);
@@ -97,7 +97,7 @@ ccl_device float3 fisheye_to_direction(float u, float v, float fov)
if(r > 1.0f)
return make_float3(0.0f, 0.0f, 0.0f);
- float phi = acosf((r != 0.0f)? u/r: 0.0f);
+ float phi = safe_acosf((r != 0.0f)? u/r: 0.0f);
float theta = r * fov * 0.5f;
if(v < 0.0f) phi = -phi;
@@ -111,7 +111,7 @@ ccl_device float3 fisheye_to_direction(float u, float v, float fov)
ccl_device float2 direction_to_fisheye_equisolid(float3 dir, float lens, float width, float height)
{
- float theta = acosf(dir.x);
+ float theta = safe_acosf(dir.x);
float r = 2.0f * lens * sinf(theta * 0.5f);
float phi = atan2f(dir.z, dir.y);
@@ -132,7 +132,7 @@ ccl_device float3 fisheye_equisolid_to_direction(float u, float v, float lens, f
if(r > rmax)
return make_float3(0.0f, 0.0f, 0.0f);
- float phi = acosf((r != 0.0f)? u/r: 0.0f);
+ float phi = safe_acosf((r != 0.0f)? u/r: 0.0f);
float theta = 2.0f * asinf(r/(2.0f * lens));
if(v < 0.0f) phi = -phi;