diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2012-11-09 13:11:24 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2012-11-09 13:11:24 +0400 |
commit | 03cc3b94c94c38767802bccac4e9384ab704065a (patch) | |
tree | 7ba06b3851597d75a77f45053b2cfd35ef0d0f42 /intern/cycles/kernel | |
parent | ffbf0a1b12ae840f5fd5a21b3663743ee9beb26c (diff) |
Fisheye Equidistant Lens algorith bugfix
r = lens * theta
Thanks for Adriano Oliveira for reporting this and chasing down the right formula.
Now fulldome works no longer need to use equisolid + a specific lens+sensor size.
And happy birthday to me. And yes, that's how I celebrate it ;)
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/kernel_projection.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_projection.h b/intern/cycles/kernel/kernel_projection.h index 64747bcb42e..6516b9e4d82 100644 --- a/intern/cycles/kernel/kernel_projection.h +++ b/intern/cycles/kernel/kernel_projection.h @@ -98,7 +98,7 @@ __device float3 fisheye_to_direction(float u, float v, float fov) return make_float3(0.0f, 0.0f, 0.0f); float phi = acosf((r != 0.0f)? u/r: 0.0f); - float theta = asinf(r) * (fov / M_PI_F); + float theta = r * fov * 0.5f; if(v < 0.0f) phi = -phi; |