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:
authorThomas Dinges <blender@dingto.org>2013-06-03 00:39:32 +0400
committerThomas Dinges <blender@dingto.org>2013-06-03 00:39:32 +0400
commitc5ed6765b9c46630579be5e43cab74965f0be9da (patch)
tree0ca3bee53bec86f5bb63a005aa4cbfb04e6735a6 /intern/cycles/render/light.cpp
parent834492489ab9cea37ff32166895b6a298d7225e9 (diff)
Cycles / Math functions:
* Rename some math functions: len -> length len_squared -> length_squared normalize_len -> normalize_length * This way OpenCL uses its inbuilt length() function, rather than our own. The other two functions have been renamed for consistency. * Tested CPU, CUDA and OpenCL compile, should be no functional changes.
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r--intern/cycles/render/light.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 1d2acf79b6c..f29061299b5 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -276,7 +276,7 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
p2 = transform_point(&tfm, p2);
}
- totarea += M_PI_F * (r1 + r2) * len(p1 - p2);
+ totarea += M_PI_F * (r1 + r2) * length(p1 - p2);
}
}
@@ -547,7 +547,7 @@ void LightManager::device_update_points(Device *device, DeviceScene *dscene, Sce
else if(light->type == LIGHT_AREA) {
float3 axisu = light->axisu*(light->sizeu*light->size);
float3 axisv = light->axisv*(light->sizev*light->size);
- float area = len(axisu)*len(axisv);
+ float area = length(axisu)*length(axisv);
float invarea = (area > 0.0f)? 1.0f/area: 1.0f;
if(light->use_mis && area > 0.0f)