From a92468c7d7bd3171cc04dc956f559f6c8f4f338c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 20 Jun 2013 11:47:09 +0000 Subject: [PATCH] Fix #35807: blender internal motion blur render without antialiasing would give black speckles (self intersection errors) in raytraced shadows. Motion blur does some extra offsets for free antialiasing in the motion blur samples, but did not take them into account everywhere. --- source/blender/render/intern/source/shadeinput.c | 4 ++++ source/blender/render/intern/source/zbuf.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index eb9e72fedfa..2dcb55f1f5d 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -1416,6 +1416,10 @@ void shade_samples_fill_with_ps(ShadeSample *ssamp, PixStr *ps, int x, int y) xs = (float)x + R.samples->centLut[b & 15] + 0.5f; ys = (float)y + R.samples->centLut[b >> 4] + 0.5f; } + else if (R.i.curblur) { + xs= (float)x + R.mblur_jit[R.i.curblur-1][0] + 0.5f; + ys= (float)y + R.mblur_jit[R.i.curblur-1][1] + 0.5f; + } else { xs = (float)x + 0.5f; ys = (float)y + 0.5f; diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index b974022790d..2f45ad756d3 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -3824,6 +3824,10 @@ static void shade_tra_samples_fill(ShadeSample *ssamp, int x, int y, int z, int xs= (float)x + R.samples->centLut[b & 15] + 0.5f; ys= (float)y + R.samples->centLut[b>>4] + 0.5f; } + else if (R.i.curblur) { + xs= (float)x + R.mblur_jit[R.i.curblur-1][0] + 0.5f; + ys= (float)y + R.mblur_jit[R.i.curblur-1][1] + 0.5f; + } else { xs= (float)x + 0.5f; ys= (float)y + 0.5f;