[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46499] branches/tile/source/blender/ compositor/operations: TileBranch

Jeroen Bakker j.bakker at atmind.nl
Thu May 10 15:52:36 CEST 2012


Revision: 46499
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46499
Author:   jbakker
Date:     2012-05-10 13:52:35 +0000 (Thu, 10 May 2012)
Log Message:
-----------
TileBranch
 * fix for Lens distortion (out side pixels has random colors)
 * also calculate preview/viewnode when doing render image/animation

Modified Paths:
--------------
    branches/tile/source/blender/compositor/operations/COM_PreviewOperation.h
    branches/tile/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
    branches/tile/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
    branches/tile/source/blender/compositor/operations/COM_ViewerBaseOperation.h

Modified: branches/tile/source/blender/compositor/operations/COM_PreviewOperation.h
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_PreviewOperation.h	2012-05-10 11:54:36 UTC (rev 46498)
+++ branches/tile/source/blender/compositor/operations/COM_PreviewOperation.h	2012-05-10 13:52:35 UTC (rev 46499)
@@ -41,7 +41,7 @@
 
 public:
 	PreviewOperation();
-	bool isOutputOperation(bool rendering) const {return !rendering;}
+	bool isOutputOperation(bool rendering) const {return true;}
 	void initExecution();
 	void deinitExecution();
 	const int getRenderPriority() const;

Modified: branches/tile/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp	2012-05-10 11:54:36 UTC (rev 46498)
+++ branches/tile/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp	2012-05-10 13:52:35 UTC (rev 46499)
@@ -65,7 +65,7 @@
 	rcti newInput;
 	newInput.ymax = input->ymax;
 	newInput.ymin = input->ymin;
-	newInput.xmin = input->xmin-kr2-1;
-	newInput.xmax = input->xmax+kr2+1;
+	newInput.xmin = input->xmin-kr2-2;
+	newInput.xmax = input->xmax+kr2+2;
 	return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
 }

Modified: branches/tile/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp	2012-05-10 11:54:36 UTC (rev 46498)
+++ branches/tile/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp	2012-05-10 13:52:35 UTC (rev 46499)
@@ -133,6 +133,11 @@
 
 		/* set alpha */
 		outputColor[3]= 1.0f;
+	} else {
+		outputColor[0]= 0.0f;
+		outputColor[1]= 0.0f;
+		outputColor[2]= 0.0f;
+		outputColor[3]= 0.0f;
 	}
 }
 
@@ -151,13 +156,6 @@
 
 bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) {
 	rcti newInput;
-//	float uv[2];
-	//	determineUV(uv, input->xmin, input->ymin);
-	//	newInput.xmin = uv[0]-1;
-	//	newInput.ymin = uv[1]-1;
-	//	determineUV(uv, input->xmax, input->ymax);
-	//	newInput.ymax = uv[0]+1;
-	//	newInput.xmax = uv[1]+1;
 	newInput.xmin = 0;
 	newInput.ymin = 0;
 	newInput.ymax = inputProgram->getHeight();

Modified: branches/tile/source/blender/compositor/operations/COM_ViewerBaseOperation.h
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_ViewerBaseOperation.h	2012-05-10 11:54:36 UTC (rev 46498)
+++ branches/tile/source/blender/compositor/operations/COM_ViewerBaseOperation.h	2012-05-10 13:52:35 UTC (rev 46499)
@@ -42,7 +42,7 @@
 	bool doColorPredivide;
 
 public:
-	bool isOutputOperation(bool rendering) const {return !rendering;}
+	bool isOutputOperation(bool rendering) const {return true;}
 	void initExecution();
 	void deinitExecution();
 	void setImage(Image* image) {this->image = image;}




More information about the Bf-blender-cvs mailing list