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:
authorDalai Felinto <dfelinto@gmail.com>2012-05-07 21:22:13 +0400
committerDalai Felinto <dfelinto@gmail.com>2012-05-07 21:22:13 +0400
commite11b9df3f1b78c1afdfb977b764813b4f61de1a4 (patch)
tree35850b3a373b9ff7939d08562fd0d0ba020e8b2c /intern
parent9a731205e942da12c622dac9804ff308a6f1c4c6 (diff)
cycles-fisheye: fixed formula for dir to equisolid
second time I need a scond commit to get the equisolid formula right, shame on me ;) the formula is: r = 2 x focallength x sin (theta / 2)
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_projection.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_projection.h b/intern/cycles/kernel/kernel_projection.h
index 0ff905b7db8..a5735920cd9 100644
--- a/intern/cycles/kernel/kernel_projection.h
+++ b/intern/cycles/kernel/kernel_projection.h
@@ -112,7 +112,7 @@ __device float3 fisheye_to_direction(float u, float v, float fov)
__device float2 direction_to_fisheye_equisolid(float3 dir, float lens, float width, float height)
{
float theta = acosf(dir.x);
- float r = 2.0f * lens * sinf(theta * 0.25f);
+ float r = 2.0f * lens * sinf(theta * 0.5f);
float phi = atan2f(dir.z, dir.y);
float u = r * cosf(phi) / width + 0.5f;