From f12b1790a0f4bb26d99ca151f8794a179e151987 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 29 Jun 2015 10:45:27 -0300 Subject: Fix 73841 : Game Engine - Camera Lens Shift This is essential for video projection, and the alternative until now was to manually change the projection matrix via Python. ( http://www.blender.org/manual/game_engine/camera/introduction.html#camera-lens-shift - this page will be removed as soon as I commit this) Also this is working for perspective and orto cameras BUT if the sensor is not AUTO it will only look correct in blenderplayer (this is an unrelated bug, but just in case someone runs into it while testing this, now you know why you got the issue). Kudos for the BlenderVR project for supporting this feature development. Differential Revision: https://developer.blender.org/D1379 --- source/gameengine/Rasterizer/RAS_FramingManager.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/gameengine/Rasterizer/RAS_FramingManager.h') diff --git a/source/gameengine/Rasterizer/RAS_FramingManager.h b/source/gameengine/Rasterizer/RAS_FramingManager.h index 122f0ca46ec..5741a91939e 100644 --- a/source/gameengine/Rasterizer/RAS_FramingManager.h +++ b/source/gameengine/Rasterizer/RAS_FramingManager.h @@ -236,6 +236,8 @@ public : const float camnear, const float camfar, const short sensor_fit, + const float shift_x, + const float shift_y, RAS_FrameFrustum &frustum ); @@ -247,6 +249,8 @@ public : const RAS_Rect &viewport, const float lens, const float sensor_x, const float sensor_y, const short sensor_fit, + const float shift_x, + const float shift_y, const float camnear, const float camfar, RAS_FrameFrustum &frustum @@ -260,6 +264,8 @@ public : const float lens, const float sensor_x, const float sensor_y, const short sensor_fit, + const float shift_x, + const float shift_y, const float design_aspect_ratio, RAS_FrameFrustum & frustum ); @@ -272,6 +278,8 @@ public : const float scale, const float design_aspect_ratio, const short sensor_fit, + const float shift_x, + const float shift_y, RAS_FrameFrustum & frustum ); -- cgit v1.2.3