From d49d0e174eaa5391b058f500e8aaa286fd30969d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 May 2008 17:42:03 +0000 Subject: [PATCH] Small fix for last AO sphere sampling bugfix, didn't update random sampling code as well. --- source/blender/render/intern/source/rayshade.c | 8 ++++++-- 1 file 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