[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17721] branches/soc-2008-mxcurioni/source /blender/render/intern/source/rendercore.c: corrected problems using different filters: Freestyle pixels were being fetched outside of the render result rect.

Maxime Curioni maxime.curioni at gmail.com
Fri Dec 5 12:03:17 CET 2008


Revision: 17721
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17721
Author:   mxcurioni
Date:     2008-12-05 12:03:16 +0100 (Fri, 05 Dec 2008)

Log Message:
-----------
corrected problems using different filters: Freestyle pixels were being fetched outside of the render result rect. Corrected with a test to make sure that the used pixels are valid.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/render/intern/source/rendercore.c

Modified: branches/soc-2008-mxcurioni/source/blender/render/intern/source/rendercore.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/render/intern/source/rendercore.c	2008-12-05 04:06:41 UTC (rev 17720)
+++ branches/soc-2008-mxcurioni/source/blender/render/intern/source/rendercore.c	2008-12-05 11:03:16 UTC (rev 17721)
@@ -919,7 +919,10 @@
     for( y = pa->disprect.ymin; y < pa->disprect.ymax; y++) {
         for( x = pa->disprect.xmin; x < pa->disprect.xmax; x++, od++) {
             int sample;
-           
+           	
+			if( x < 0 || y < 0 || x > R.rectx - 1 || y > R.recty - 1 )
+				continue;
+				
             freestyle = freestyle_rl->rectf + 4 * (R.rectx * y + x);
             if( freestyle[3] > 0.0) {
                 for( sample = 0; sample < totsample; sample++) {





More information about the Bf-blender-cvs mailing list