diff options
author | Thomas Dinges <blender@dingto.org> | 2013-06-04 21:20:00 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-06-04 21:20:00 +0400 |
commit | 9e4914e0553d0b7f57a3db86741307a17d79c21c (patch) | |
tree | ac5c2500d9f171deba253bd99c090726f3208576 /intern/cycles/kernel/kernel_light.h | |
parent | 4a7f37f6ed3569b12ff195081cca3f31430bef67 (diff) |
Cycles:
* Revert r57203 (len() renaming)
There seems to be a problem with nVidia OpenCL after this and I haven't figured out the real cause yet.
Better to selectively enable native length() later, after figuring out what's wrong.
This fixes [#35612].
Diffstat (limited to 'intern/cycles/kernel/kernel_light.h')
-rw-r--r-- | intern/cycles/kernel/kernel_light.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h index f5899b90b26..d4d78e413d2 100644 --- a/intern/cycles/kernel/kernel_light.h +++ b/intern/cycles/kernel/kernel_light.h @@ -263,7 +263,7 @@ __device void lamp_light_sample(KernelGlobals *kg, int lamp, /* sphere light */ ls->P += sphere_light_sample(P, ls->P, radius, randu, randv); - ls->D = normalize_length(ls->P - P, &ls->t); + ls->D = normalize_len(ls->P - P, &ls->t); ls->Ng = -ls->D; float invarea = data1.z; @@ -287,7 +287,7 @@ __device void lamp_light_sample(KernelGlobals *kg, int lamp, ls->P += area_light_sample(axisu, axisv, randu, randv); ls->Ng = D; - ls->D = normalize_length(ls->P - P, &ls->t); + ls->D = normalize_len(ls->P - P, &ls->t); float invarea = data2.x; @@ -487,7 +487,7 @@ __device void curve_segment_light_sample(KernelGlobals *kg, int prim, int object float4 P1 = kernel_tex_fetch(__curve_keys, k0); float4 P2 = kernel_tex_fetch(__curve_keys, k1); - float l = length(float4_to_float3(P2) - float4_to_float3(P1)); + float l = len(float4_to_float3(P2) - float4_to_float3(P1)); float r1 = P1.w; float r2 = P2.w; @@ -569,7 +569,7 @@ __device void light_sample(KernelGlobals *kg, float randt, float randu, float ra triangle_light_sample(kg, prim, object, randu, randv, time, ls); /* compute incoming direction, distance and pdf */ - ls->D = normalize_length(ls->P - P, &ls->t); + ls->D = normalize_len(ls->P - P, &ls->t); ls->pdf = triangle_light_pdf(kg, ls->Ng, -ls->D, ls->t); } else { |