Fix Cycles unnecessary updates to camera in viewport render
Problem identified by Milan Jaros.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user