diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-28 21:42:03 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-28 21:42:03 +0400 |
commit | d49d0e174eaa5391b058f500e8aaa286fd30969d (patch) | |
tree | d725e37eb98e41f4134534e95355f66c553b706d /source/blender/render | |
parent | 9a3b25d8a098577a1889900353af536151683f91 (diff) |
Small fix for last AO sphere sampling bugfix, didn't update
random sampling code as well.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/rayshade.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index cbba5d2bb2c..1155d2ea817 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -1476,9 +1476,12 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys) tot= 2*resol*resol; if (type & WO_AORNDSMP) { - static float sphere[2*3*256]; + float *sphere; int a; + // always returns table + sphere= threadsafe_table_sphere(0, thread, xs, ys, tot); + /* total random sampling. NOT THREADSAFE! (should be removed, is not useful) */ vec= sphere; for (a=0; a<tot; a++, vec+=3) { @@ -1493,7 +1496,8 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys) float ang, *vec1; int a; - sphere= threadsafe_table_sphere(1, thread, xs, ys, tot); // returns table if xs and ys were equal to last call + // returns table if xs and ys were equal to last call + sphere= threadsafe_table_sphere(1, thread, xs, ys, tot); if(sphere==NULL) { sphere= threadsafe_table_sphere(0, thread, xs, ys, tot); |