[Bf-blender-cvs] [12ab77f859d] cycles_embree: Revert "Cycles: Removed scaling from Embree's object motion blur."
Stefan Werner
noreply at git.blender.org
Tue Mar 20 12:33:13 CET 2018
Commit: 12ab77f859d0952a295c1a44ec6929efea812831
Author: Stefan Werner
Date: Mon Mar 19 10:17:49 2018 +0100
Branches: cycles_embree
https://developer.blender.org/rB12ab77f859d0952a295c1a44ec6929efea812831
Revert "Cycles: Removed scaling from Embree's object motion blur."
This reverts commit 3194e05d3f27124924f81b70400fb45fe022d9e4.
===================================================================
M intern/cycles/bvh/bvh_embree.cpp
===================================================================
diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp
index 0b671e535f1..f0d2fc162e2 100644
--- a/intern/cycles/bvh/bvh_embree.cpp
+++ b/intern/cycles/bvh/bvh_embree.cpp
@@ -404,26 +404,9 @@ unsigned BVHEmbree::add_instance(Object *ob, int i)
unsigned geom_id = rtcNewInstance3(scene, instance_bvh->scene, num_motion_steps, i*2);
if(ob->use_motion) {
- /* Drop animated scales. Embree knows how to apply motion blur to those, but Cycles doesn't.
- * This is necessary to keep it consistent with Cycles' intersection refinement.
- * Eventually, Cycles should either also know how to to scaling or rely on Embree to get
- * transformation matrices for time steps. */
- DecompMotionTransform decom;
- Transform decom_single, comp;
- transform_motion_decompose(&decom, &ob->motion, &ob->tfm);
- decom_single.x = decom.pre_x;
- decom_single.y = decom.pre_y;
- decom_single.z = decom.mid.z;
- decom_single.w = decom.mid.w;
- transform_compose(&comp, &decom_single);
-
- rtcSetTransform2(scene, geom_id, RTC_MATRIX_ROW_MAJOR, (const float*)&comp, 0);
+ rtcSetTransform2(scene, geom_id, RTC_MATRIX_ROW_MAJOR, (const float*)&ob->motion.pre, 0);
rtcSetTransform2(scene, geom_id, RTC_MATRIX_ROW_MAJOR, (const float*)&ob->tfm, 1);
-
- decom_single.x = decom.post_x;
- decom_single.y = decom.post_y;
- transform_compose(&comp, &decom_single);
- rtcSetTransform2(scene, geom_id, RTC_MATRIX_ROW_MAJOR, (const float*)&comp, 2);
+ rtcSetTransform2(scene, geom_id, RTC_MATRIX_ROW_MAJOR, (const float*)&ob->motion.post, 2);
} else {
rtcSetTransform2(scene, geom_id, RTC_MATRIX_ROW_MAJOR, (const float*)&ob->tfm);
}
More information about the Bf-blender-cvs
mailing list