[Bf-blender-cvs] [db230d48330] functions: skip matrix interpolation when not necessary

Jacques Lucke noreply at git.blender.org
Wed Sep 4 19:43:03 CEST 2019


Commit: db230d483303f479150135dfd7ac61bba50307ef
Author: Jacques Lucke
Date:   Wed Sep 4 11:33:56 2019 +0200
Branches: functions
https://developer.blender.org/rBdb230d483303f479150135dfd7ac61bba50307ef

skip matrix interpolation when not necessary

===================================================================

M	source/blender/simulations/bparticles/world_state.hpp

===================================================================

diff --git a/source/blender/simulations/bparticles/world_state.hpp b/source/blender/simulations/bparticles/world_state.hpp
index d5e55f01e41..50fa8bf73e4 100644
--- a/source/blender/simulations/bparticles/world_state.hpp
+++ b/source/blender/simulations/bparticles/world_state.hpp
@@ -39,6 +39,9 @@ struct VaryingFloat4x4 {
 
   float4x4 interpolate(float t) const
   {
+    if (memcmp(&start, &end, sizeof(float4x4)) == 0) {
+      return start;
+    }
     return float4x4::interpolate(start, end, t);
   }



More information about the Bf-blender-cvs mailing list