Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2019-02-21 15:31:52 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-02-21 18:33:29 +0300
commit6e53fdc18fa0a2003bd8c39d968fe379b5d1d082 (patch)
tree40b41d40e5cc797b07ada6c30705d7c94b953046 /intern
parent1d38a83139582ff37adc0757bd39d87d5932ddf5 (diff)
Cycles OpenCL: Motion Blur Compile Directives
When using preview rendering through a camera or final rendering the `scene.render.use_motion_blur` was not respected when building the compile directives. This patch will when building the compile directives check if motion blur is enabled at all. This should lead to more efficient kernels when no motion blur is needed. Tags: #cycles Differential Revision: https://developer.blender.org/D4387
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/blender_object.cpp2
-rw-r--r--intern/cycles/render/session.cpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index a05c982b367..62db5d705e0 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -419,7 +419,7 @@ Object *BlenderSync::sync_object(BL::Object& b_parent,
uint motion_steps;
- if(scene->need_motion() == Scene::MOTION_BLUR) {
+ if(need_motion == Scene::MOTION_BLUR) {
motion_steps = object_motion_steps(b_parent, b_ob);
mesh->motion_steps = motion_steps;
if(motion_steps && object_use_deform_motion(b_parent, b_ob)) {
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index ac69251c908..69969987352 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -666,16 +666,19 @@ DeviceRequestedFeatures Session::get_requested_device_features()
/* This features are not being tweaked as often as shaders,
* so could be done selective magic for the viewport as well.
*/
+ bool use_motion = scene->need_motion() == Scene::MotionType::MOTION_BLUR;
requested_features.use_hair = false;
requested_features.use_object_motion = false;
- requested_features.use_camera_motion = scene->camera->use_motion();
+ requested_features.use_camera_motion = use_motion && scene->camera->use_motion();
foreach(Object *object, scene->objects) {
Mesh *mesh = object->mesh;
if(mesh->num_curves()) {
requested_features.use_hair = true;
}
- requested_features.use_object_motion |= object->use_motion() | mesh->use_motion_blur;
- requested_features.use_camera_motion |= mesh->use_motion_blur;
+ if (use_motion) {
+ requested_features.use_object_motion |= object->use_motion() | mesh->use_motion_blur;
+ requested_features.use_camera_motion |= mesh->use_motion_blur;
+ }
#ifdef WITH_OPENSUBDIV
if(mesh->subdivision_type != Mesh::SUBDIVISION_NONE) {
requested_features.use_patch_evaluation = true;