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 ;)
This commit is contained in:
Dalai Felinto
2012-11-09 09:11:24 +00:00
parent ffbf0a1b12
commit 03cc3b94c9
2 changed files with 3 additions and 4 deletions

View File

@@ -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;