diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-30 11:27:17 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-30 11:27:17 +0400 |
commit | ceedd5bd35273c27225f84cde2948e5b774e92fe (patch) | |
tree | dc379b6280c39aa81b1c9dd9f1c163570902c1cc /intern/cycles/kernel/svm/svm_voronoi.h | |
parent | ad2b41bc4bae3b0406ce6fcee69be581b0e96105 (diff) |
Fix cycles CUDA sm 1.3 build with 32 bit compiler, tweaked voronoi
and brick code so that it can be uninlined.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_voronoi.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_voronoi.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h index 7e7bd970320..55110d06f22 100644 --- a/intern/cycles/kernel/svm/svm_voronoi.h +++ b/intern/cycles/kernel/svm/svm_voronoi.h @@ -23,21 +23,18 @@ CCL_NAMESPACE_BEGIN __device_noinline float4 svm_voronoi(NodeVoronoiColoring coloring, float scale, float3 p) { /* compute distance and point coordinate of 4 nearest neighbours */ - float da[4]; - float3 pa[4]; - - voronoi(p*scale, NODE_VORONOI_DISTANCE_SQUARED, 1.0f, da, pa); + float4 dpa0 = voronoi_Fn(p*scale, 1.0f, 0, -1); /* output */ float fac; float3 color; if(coloring == NODE_VORONOI_INTENSITY) { - fac = fabsf(da[0]); + fac = fabsf(dpa0.w); color = make_float3(fac, fac, fac); } else { - color = cellnoise_color(pa[0]); + color = cellnoise_color(float4_to_float3(dpa0)); fac = average(color); } |