Commit: a802c5370f6ebf237bd8909c08aae0052dc75246
Author: Jeroen Bakker
Date:   Fri Aug 1 21:46:34 2014 +0200
Branches: blender-tiles
https://developer.blender.org/rBa802c5370f6ebf237bd8909c08aae0052dc75246

Fix cycles render layers.

Cycles supports 3 channels and 4 channels colors, compositor only 4 channel.
compositor will use vector to store the 3 channel colors.

===================================================================

M       source/blender/compositor/operations/COM_CompositorOperation.cpp
M       source/blender/compositor/operations/COM_RenderLayersProg.cpp

===================================================================

diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp 
b/source/blender/compositor/operations/COM_CompositorOperation.cpp
index 96da5d5..afc36c8 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cpp
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp
@@ -190,7 +190,7 @@ void CompositorOperation::executeRegion(Tile* tile)
                for (x = x1; x < x2 && (!breaked); x++) {
                        int input_x = x + dx, input_y = y + dy;
 
-                       this->m_imageInput->readSampled(color, input_x, 
input_y, COM_PS_NEAREST);
+                this->m_imageInput->readSampled(color, input_x, input_y, 
COM_PS_NEAREST);
                        if (this->m_useAlphaInput) {
                                this->m_alphaInput->readSampled(&(color[3]), 
input_x, input_y, COM_PS_NEAREST);
                        }
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp 
b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index 2d6a505..a65d9c5 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -208,9 +208,6 @@ void RenderLayersAlphaProg::executePixelSampled(float 
output[4], float x, float
                float temp[4];
                doInterpolation(temp, x, y, sampler);
                output[0] = temp[3];
-               output[1] = 0.0f;
-               output[2] = 0.0f;
-               output[3] = 0.0f;
        }
 }
 
@@ -225,7 +222,7 @@ RenderLayersColorOperation::RenderLayersColorOperation() : 
RenderLayersBaseProg(
 
 RenderLayersCyclesOperation::RenderLayersCyclesOperation(int pass) : 
RenderLayersBaseProg(pass, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Depth Operation ******** */
@@ -254,21 +251,21 @@ void RenderLayersDepthProg::executePixelSampled(float 
output[4], float x, float
 
 RenderLayersDiffuseOperation::RenderLayersDiffuseOperation() : 
RenderLayersBaseProg(SCE_PASS_DIFFUSE, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Emit Operation ******** */
 
 RenderLayersEmitOperation::RenderLayersEmitOperation() : 
RenderLayersBaseProg(SCE_PASS_EMIT, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Environment Operation ******** */
 
 RenderLayersEnvironmentOperation::RenderLayersEnvironmentOperation() : 
RenderLayersBaseProg(SCE_PASS_ENVIRONMENT, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Image Operation ******** */
@@ -282,7 +279,7 @@ RenderLayersColorProg::RenderLayersColorProg() : 
RenderLayersBaseProg(SCE_PASS_C
 
 RenderLayersIndirectOperation::RenderLayersIndirectOperation() : 
RenderLayersBaseProg(SCE_PASS_INDIRECT, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Material Index Operation ******** */
@@ -317,28 +314,28 @@ 
RenderLayersObjectIndexOperation::RenderLayersObjectIndexOperation() : RenderLay
 
 RenderLayersReflectionOperation::RenderLayersReflectionOperation() : 
RenderLayersBaseProg(SCE_PASS_REFLECT, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Refraction Operation ******** */
 
 RenderLayersRefractionOperation::RenderLayersRefractionOperation() : 
RenderLayersBaseProg(SCE_PASS_REFRACT, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Shadow Operation ******** */
 
 RenderLayersShadowOperation::RenderLayersShadowOperation() : 
RenderLayersBaseProg(SCE_PASS_SHADOW, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Specular Operation ******** */
 
 RenderLayersSpecularOperation::RenderLayersSpecularOperation() : 
RenderLayersBaseProg(SCE_PASS_SPEC, 3)
 {
-       this->addOutputSocket(COM_DT_COLOR);
+    this->addOutputSocket(COM_DT_VECTOR);
 }
 
 /* ******** Render Layers Speed Operation ******** */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to