Fix Cycles unnecessary updates to camera in viewport render

Problem identified by Milan Jaros.
This commit is contained in:
2020-07-09 16:51:48 +02:00
parent 9de09220fc
commit 2be0ae7c99
2 changed files with 5 additions and 1 deletions

View File

@@ -709,6 +709,10 @@ static void blender_camera_from_view(BlenderCamera *bcam,
/* 3d view transform */
bcam->matrix = transform_inverse(get_transform(b_rv3d.view_matrix()));
/* dimensions */
bcam->full_width = width;
bcam->full_height = height;
}
static void blender_camera_view_subset(BL::RenderEngine &b_engine,

View File

@@ -1003,7 +1003,7 @@ bool Session::update_scene()
int height = tile_manager.state.buffer.full_height;
int resolution = tile_manager.state.resolution_divider;
if (width != cam->width || height != cam->height) {
if (width != cam->width || height != cam->height || resolution != cam->resolution) {
cam->width = width;
cam->height = height;
cam->resolution = resolution;