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
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r--intern/cycles/render/light.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index a3f67361f6e..8dec7e4ea64 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -785,11 +785,8 @@ void LightManager::device_update_points(Device *,
klights[light_index].max_bounces = max_bounces;
klights[light_index].random = random;
-
- Transform tfm = light->tfm;
- Transform itfm = transform_inverse(tfm);
- memcpy(&klights[light_index].tfm, &tfm, sizeof(float4)*3);
- memcpy(&klights[light_index].itfm, &itfm, sizeof(float4)*3);
+ klights[light_index].tfm = light->tfm;
+ klights[light_index].itfm = transform_inverse(light->tfm);
light_index++;
}
@@ -825,10 +822,8 @@ void LightManager::device_update_points(Device *,
klights[light_index].area.dir[0] = dir.x;
klights[light_index].area.dir[1] = dir.y;
klights[light_index].area.dir[2] = dir.z;
- Transform tfm = light->tfm;
- Transform itfm = transform_inverse(tfm);
- memcpy(&klights[light_index].tfm, &tfm, sizeof(float4)*3);
- memcpy(&klights[light_index].itfm, &itfm, sizeof(float4)*3);
+ klights[light_index].tfm = light->tfm;
+ klights[light_index].itfm = transform_inverse(light->tfm);
light_index++;
}