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:
Diffstat (limited to 'source/blender/render/intern/source/zbuf.c')
-rw-r--r--source/blender/render/intern/source/zbuf.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 612c5660f68..dc87170842b 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
@@ -2288,8 +2288,9 @@ void zbuffer_shadow(Render *re, float winmat[][4], LampRen *lar, int *rectz, int
zbuf_alloc_span(&zspan, size, size, 1.0f);
zspan.zmulx= ((float)size)/2.0;
zspan.zmuly= ((float)size)/2.0;
- zspan.zofsx= jitx;
- zspan.zofsy= jity;
+ /* -0.5f to center the sample position */
+ zspan.zofsx= jitx - 0.5f;
+ zspan.zofsy= jity - 0.5f;
/* the buffers */
zspan.rectz= rectz;
@@ -3280,11 +3281,9 @@ static int zbuffer_abuf(Render *re, RenderPart *pa, APixstr *APixbuf, ListBase *
zspan->zofsy= -pa->disprect.ymin;
}
- if(!shadow) {
- /* to center the sample position */
- zspan->zofsx -= 0.5f;
- zspan->zofsy -= 0.5f;
- }
+ /* to center the sample position */
+ zspan->zofsx -= 0.5f;
+ zspan->zofsy -= 0.5f;
}
/* we use this to test if nothing was filled in */