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:
authorTon Roosendaal <ton@blender.org>2004-07-17 18:18:34 +0400
committerTon Roosendaal <ton@blender.org>2004-07-17 18:18:34 +0400
commit4a244f274de32ef758c5ba660e75984358cdd9ba (patch)
treec0bcaaa3192520faaadc3097c399bc3ef2f901f3
parent15d4fb9c85d4af89c7817ee90618f824a2c815b1 (diff)
Attempt 2 :)
Found the right +0.5 todo, now based on understanding why. Checked with demo files in regression. But i bet intrr finds a new bug in an hour!
-rw-r--r--source/blender/render/intern/source/shadbuf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 6070fe602d5..2ad3d43506b 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -520,8 +520,9 @@ float testshadowbuf(struct ShadBuf *shb, float *rco, float inp) /* return 1.0:
for(a=num;a>0;a--) {
/* instead of jit i tried random: ugly! */
- xs= xs1 + xres*j[0];
- ys= ys1 + yres*j[1];
+ /* note: the plus 0.5 gives best sampling results, jit used to go from 0-1 */
+ xs= xs1 + xres*(j[0] + 0.5);
+ ys= ys1 + yres*(j[1] + 0.5);
j+=2;
aantal+= readshadowbuf(shb, xs, ys, zs);