Cycles: Fix missing camera-in-volume update when using certain render layers configurations

This commit is contained in:
Sergey Sharybin 2015-05-14 19:08:13 +05:00
parent 3d3d805b64
commit 0a60c7d8ee
4 changed files with 8 additions and 1 deletions

@ -80,6 +80,7 @@ Camera::Camera()
need_update = true;
need_device_update = true;
need_flags_update = true;
previous_need_motion = -1;
}
@ -171,6 +172,7 @@ void Camera::update()
need_update = false;
need_device_update = true;
need_flags_update = true;
}
void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
@ -288,7 +290,7 @@ void Camera::device_update_volume(Device * /*device*/,
DeviceScene *dscene,
Scene *scene)
{
if(!need_device_update) {
if(!need_device_update && !need_flags_update) {
return;
}
KernelCamera *kcam = &dscene->data.cam;
@ -304,6 +306,7 @@ void Camera::device_update_volume(Device * /*device*/,
}
}
need_device_update = false;
need_flags_update = false;
}
void Camera::device_free(Device * /*device*/, DeviceScene * /*dscene*/)

@ -105,6 +105,7 @@ public:
/* update */
bool need_update;
bool need_device_update;
bool need_flags_update;
int previous_need_motion;
/* functions */

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "camera.h"
#include "device.h"
#include "light.h"
#include "mesh.h"
@ -192,6 +193,7 @@ void Object::tag_update(Scene *scene)
}
}
scene->camera->need_flags_update = true;
scene->curve_system_manager->need_update = true;
scene->mesh_manager->need_update = true;
scene->object_manager->need_update = true;

@ -15,6 +15,7 @@
*/
#include "background.h"
#include "camera.h"
#include "device.h"
#include "graph.h"
#include "light.h"