Skip to content

Commit

Permalink
Using aspectRatio instead of fovx for the stereoFull camera (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
chevtche committed Jul 6, 2018
1 parent c6c2738 commit 4d440dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ospray_modules/stereoscopy/ispc/stereo/StereoCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void StereoCamera::commit()
Camera::commit();

const float fovy = getParamf("fovy", 60.f);
const float fovx = getParamf("fovx", 90.f);
const float aspectRatio = getParamf("aspect", 1.5f);
const StereoMode stereoMode =
(StereoMode)getParam1i("stereoMode", OSP_STEREO_NONE);
const float interpupillaryDistance =
Expand Down Expand Up @@ -72,8 +72,7 @@ void StereoCamera::commit()
const vec3f org = pos;
const float imgPlane_size_y =
2.f * zeroParallaxPlane * tanf(deg2rad(0.5f * fovy));
const float imgPlane_size_x =
2.f * zeroParallaxPlane * tanf(deg2rad(0.5f * fovx));
const float imgPlane_size_x = imgPlane_size_y * aspectRatio;

ispc::StereoCamera_set(getIE(), (const ispc::vec3f&)org,
(const ispc::vec3f&)dir, (const ispc::vec3f&)dir_du,
Expand Down

0 comments on commit 4d440dc

Please sign in to comment.