Fix T43346: Window mapping is wrong in preview render

The issue was caused by the whole viewplane used for mapping calculation
which would for sure lead to differences between final camera render and
viewport render from the camera view.

This commit makes it so window texture mapping is the same as final render
when viewing from the camera in viewport render.

It's not totally clear what's the right thing to do when viewport is not
in the camera view mode and that part is left unchanged.
This commit is contained in:
Sergey Sharybin
2015-01-27 21:36:14 +05:00
parent 332cf291e4
commit 3b50d3a04f
3 changed files with 69 additions and 20 deletions

View File

@@ -76,6 +76,7 @@ public:
/* border */
BoundBox2D border;
BoundBox2D viewport_camera_border;
/* transformation */
Transform matrix;
@@ -123,6 +124,7 @@ public:
BoundBox viewplane_bounds_get();
float3 transform_raster_to_world(float raster_x, float raster_y);
Transform transform_from_viewplane(BoundBox2D &viewplane);
};
CCL_NAMESPACE_END