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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-09-05 13:39:38 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-09-05 13:39:38 +0400
commitc84b18790d220d9468aa817e78c16088bb0de57d (patch)
treeec24c92d00553bdc8dcb08295cfe30f8b9b3966e /source/blender/compositor
parent890cafface050f9fbd954495a5768700df4cf21a (diff)
Merge some operations into a single file
This merges all mix operations into a COM_MixBaseOperation (naming could be better, but this way it corresponds to what's going on with math operations. Same was done with RenderLayers operations. Overall this gives 20% of bf_compositor library compilation time decrease. And it was rather annoying to have tens of files with just a single-line constructors anyway. TODO: - All Convert operations could also be merged into a single file, but that would require adding some ConvertBaseOperation to reduce code duplication (ideally). Leaving it unchanged for now. - Some operations' headers seems to be wrongly including MixOperation header, they need to include NodeOperation instead it seems. This is rather harmless, but would be nice to doublecheck on this eventually.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/CMakeLists.txt87
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ColorBalanceNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_FilterNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MixNode.cpp19
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.cpp21
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.cpp2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.cpp51
-rw-r--r--source/blender/compositor/operations/COM_MixAddOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.cpp95
-rw-r--r--source/blender/compositor/operations/COM_MixBaseOperation.h81
-rw-r--r--source/blender/compositor/operations/COM_MixBlendOperation.cpp52
-rw-r--r--source/blender/compositor/operations/COM_MixBlendOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixBurnOperation.cpp90
-rw-r--r--source/blender/compositor/operations/COM_MixBurnOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.cpp68
-rw-r--r--source/blender/compositor/operations/COM_MixColorOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDarkenOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_MixDarkenOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDifferenceOperation.cpp53
-rw-r--r--source/blender/compositor/operations/COM_MixDifferenceOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDivideOperation.cpp63
-rw-r--r--source/blender/compositor/operations/COM_MixDivideOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixDodgeOperation.cpp95
-rw-r--r--source/blender/compositor/operations/COM_MixDodgeOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixGlareOperation.cpp53
-rw-r--r--source/blender/compositor/operations/COM_MixGlareOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixHueOperation.cpp67
-rw-r--r--source/blender/compositor/operations/COM_MixHueOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixLightenOperation.cpp58
-rw-r--r--source/blender/compositor/operations/COM_MixLightenOperation.h44
-rw-r--r--source/blender/compositor/operations/COM_MixLinearLightOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_MixLinearLightOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixMultiplyOperation.cpp52
-rw-r--r--source/blender/compositor/operations/COM_MixMultiplyOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.cpp848
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.h197
-rw-r--r--source/blender/compositor/operations/COM_MixOverlayOperation.cpp69
-rw-r--r--source/blender/compositor/operations/COM_MixOverlayOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixSaturationOperation.cpp64
-rw-r--r--source/blender/compositor/operations/COM_MixSaturationOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixScreenOperation.cpp53
-rw-r--r--source/blender/compositor/operations/COM_MixScreenOperation.h44
-rw-r--r--source/blender/compositor/operations/COM_MixSoftLightOperation.cpp59
-rw-r--r--source/blender/compositor/operations/COM_MixSoftLightOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixSubtractOperation.cpp51
-rw-r--r--source/blender/compositor/operations/COM_MixSubtractOperation.h45
-rw-r--r--source/blender/compositor/operations/COM_MixValueOperation.cpp58
-rw-r--r--source/blender/compositor/operations/COM_MixValueOperation.h44
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp29
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAOOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp49
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersAlphaProg.h35
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp178
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersColorOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp29
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDepthProg.h34
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEmitOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersImageProg.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersImageProg.h34
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersMistOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersNormalOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp340
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.h (renamed from source/blender/compositor/operations/COM_RenderLayersBaseProg.h)103
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersShadowOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersUVOperation.h33
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.h2
108 files changed, 1514 insertions, 3770 deletions
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index a119a89c842..e14950869e0 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -368,48 +368,8 @@ set(SRC
operations/COM_ColorSpillOperation.cpp
operations/COM_ColorSpillOperation.h
- operations/COM_RenderLayersBaseProg.cpp
- operations/COM_RenderLayersBaseProg.h
- operations/COM_RenderLayersImageProg.cpp
- operations/COM_RenderLayersImageProg.h
- operations/COM_RenderLayersAlphaProg.cpp
- operations/COM_RenderLayersAlphaProg.h
- operations/COM_RenderLayersDepthProg.cpp
- operations/COM_RenderLayersDepthProg.h
- operations/COM_RenderLayersNormalOperation.cpp
- operations/COM_RenderLayersNormalOperation.h
- operations/COM_RenderLayersSpeedOperation.cpp
- operations/COM_RenderLayersSpeedOperation.h
- operations/COM_RenderLayersColorOperation.cpp
- operations/COM_RenderLayersColorOperation.h
- operations/COM_RenderLayersUVOperation.cpp
- operations/COM_RenderLayersUVOperation.h
- operations/COM_RenderLayersMistOperation.cpp
- operations/COM_RenderLayersMistOperation.h
- operations/COM_RenderLayersObjectIndexOperation.cpp
- operations/COM_RenderLayersObjectIndexOperation.h
- operations/COM_RenderLayersMaterialIndexOperation.cpp
- operations/COM_RenderLayersMaterialIndexOperation.h
- operations/COM_RenderLayersDiffuseOperation.cpp
- operations/COM_RenderLayersDiffuseOperation.h
- operations/COM_RenderLayersSpecularOperation.cpp
- operations/COM_RenderLayersSpecularOperation.h
- operations/COM_RenderLayersShadowOperation.cpp
- operations/COM_RenderLayersShadowOperation.h
- operations/COM_RenderLayersAOOperation.cpp
- operations/COM_RenderLayersAOOperation.h
- operations/COM_RenderLayersEmitOperation.cpp
- operations/COM_RenderLayersEmitOperation.h
- operations/COM_RenderLayersReflectionOperation.cpp
- operations/COM_RenderLayersReflectionOperation.h
- operations/COM_RenderLayersRefractionOperation.cpp
- operations/COM_RenderLayersRefractionOperation.h
- operations/COM_RenderLayersEnvironmentOperation.cpp
- operations/COM_RenderLayersEnvironmentOperation.h
- operations/COM_RenderLayersIndirectOperation.cpp
- operations/COM_RenderLayersIndirectOperation.h
- operations/COM_RenderLayersCyclesOperation.cpp
- operations/COM_RenderLayersCyclesOperation.h
+ operations/COM_RenderLayersProg.cpp
+ operations/COM_RenderLayersProg.h
operations/COM_ImageOperation.cpp
operations/COM_ImageOperation.h
@@ -500,16 +460,8 @@ set(SRC
operations/COM_ReadBufferOperation.h
operations/COM_WriteBufferOperation.cpp
operations/COM_WriteBufferOperation.h
- operations/COM_MixBaseOperation.h
- operations/COM_MixBaseOperation.cpp
- operations/COM_MixBlendOperation.cpp
- operations/COM_MixBlendOperation.h
- operations/COM_MixGlareOperation.cpp
- operations/COM_MixGlareOperation.h
- operations/COM_MixAddOperation.h
- operations/COM_MixAddOperation.cpp
- operations/COM_MixMultiplyOperation.h
- operations/COM_MixMultiplyOperation.cpp
+ operations/COM_MixOperation.h
+ operations/COM_MixOperation.cpp
operations/COM_BrightnessOperation.cpp
operations/COM_BrightnessOperation.h
operations/COM_GammaOperation.cpp
@@ -523,37 +475,6 @@ set(SRC
operations/COM_SetVectorOperation.h
operations/COM_SetVectorOperation.cpp
- operations/COM_MixBurnOperation.h
- operations/COM_MixBurnOperation.cpp
- operations/COM_MixColorOperation.h
- operations/COM_MixColorOperation.cpp
- operations/COM_MixDarkenOperation.h
- operations/COM_MixDarkenOperation.cpp
- operations/COM_MixDodgeOperation.h
- operations/COM_MixDodgeOperation.cpp
- operations/COM_MixDifferenceOperation.h
- operations/COM_MixDifferenceOperation.cpp
- operations/COM_MixDivideOperation.h
- operations/COM_MixDivideOperation.cpp
- operations/COM_MixHueOperation.h
- operations/COM_MixHueOperation.cpp
- operations/COM_MixLightenOperation.h
- operations/COM_MixLightenOperation.cpp
- operations/COM_MixLinearLightOperation.h
- operations/COM_MixLinearLightOperation.cpp
- operations/COM_MixOverlayOperation.h
- operations/COM_MixOverlayOperation.cpp
- operations/COM_MixSaturationOperation.h
- operations/COM_MixSaturationOperation.cpp
- operations/COM_MixScreenOperation.h
- operations/COM_MixScreenOperation.cpp
- operations/COM_MixSoftLightOperation.h
- operations/COM_MixSoftLightOperation.cpp
- operations/COM_MixValueOperation.h
- operations/COM_MixValueOperation.cpp
- operations/COM_MixSubtractOperation.h
- operations/COM_MixSubtractOperation.cpp
-
operations/COM_MathBaseOperation.h
operations/COM_MathBaseOperation.cpp
diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
index 4f3ed36aadb..bf081cae097 100644
--- a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
+++ b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
@@ -22,7 +22,7 @@
#include "COM_AlphaOverNode.h"
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
#include "COM_AlphaOverKeyOperation.h"
#include "COM_AlphaOverMixedOperation.h"
#include "COM_AlphaOverPremultiplyOperation.h"
diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
index aeed859b350..5578fdae54e 100644
--- a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
@@ -25,7 +25,7 @@
#include "COM_ColorBalanceASCCDLOperation.h"
#include "COM_ExecutionSystem.h"
#include "BKE_node.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
ColorBalanceNode::ColorBalanceNode(bNode *editorNode) : Node(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_FilterNode.cpp b/source/blender/compositor/nodes/COM_FilterNode.cpp
index 990cdb480ca..3b75e3e0a1a 100644
--- a/source/blender/compositor/nodes/COM_FilterNode.cpp
+++ b/source/blender/compositor/nodes/COM_FilterNode.cpp
@@ -25,7 +25,7 @@
#include "COM_ConvolutionEdgeFilterOperation.h"
#include "COM_ExecutionSystem.h"
#include "BKE_node.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
FilterNode::FilterNode(bNode *editorNode) : Node(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp
index 8782e6bb6d9..a6a83846623 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.cpp
+++ b/source/blender/compositor/nodes/COM_GlareNode.cpp
@@ -26,7 +26,7 @@
#include "COM_GlareSimpleStarOperation.h"
#include "COM_GlareStreaksOperation.h"
#include "COM_SetValueOperation.h"
-#include "COM_MixGlareOperation.h"
+#include "COM_MixOperation.h"
#include "COM_FastGaussianBlurOperation.h"
#include "COM_GlareGhostOperation.h"
#include "COM_GlareFogGlowOperation.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
index fd961030ebf..f9ca76d745f 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
@@ -26,7 +26,7 @@
#include "COM_ExecutionSystem.h"
#include "COM_ConvertRGBToHSVOperation.h"
#include "COM_ConvertHSVToRGBOperation.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
#include "COM_SetColorOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_ChangeHSVOperation.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
index 29e10db0758..4ae2e3d6b9d 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
@@ -26,7 +26,7 @@
#include "COM_ExecutionSystem.h"
#include "COM_ConvertRGBToHSVOperation.h"
#include "COM_ConvertHSVToRGBOperation.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
#include "COM_SetColorOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_ChangeHSVOperation.h"
diff --git a/source/blender/compositor/nodes/COM_MixNode.cpp b/source/blender/compositor/nodes/COM_MixNode.cpp
index ab4e464327d..42217243fdf 100644
--- a/source/blender/compositor/nodes/COM_MixNode.cpp
+++ b/source/blender/compositor/nodes/COM_MixNode.cpp
@@ -22,24 +22,7 @@
#include "COM_MixNode.h"
-#include "COM_MixBlendOperation.h"
-#include "COM_MixAddOperation.h"
-#include "COM_MixMultiplyOperation.h"
-#include "COM_MixBurnOperation.h"
-#include "COM_MixColorOperation.h"
-#include "COM_MixDarkenOperation.h"
-#include "COM_MixDifferenceOperation.h"
-#include "COM_MixDivideOperation.h"
-#include "COM_MixHueOperation.h"
-#include "COM_MixLightenOperation.h"
-#include "COM_MixLinearLightOperation.h"
-#include "COM_MixOverlayOperation.h"
-#include "COM_MixSaturationOperation.h"
-#include "COM_MixScreenOperation.h"
-#include "COM_MixSoftLightOperation.h"
-#include "COM_MixSubtractOperation.h"
-#include "COM_MixValueOperation.h"
-#include "COM_MixDodgeOperation.h"
+#include "COM_MixOperation.h"
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
index 74e557c77ce..512f8eec90f 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
@@ -22,26 +22,7 @@
#include "COM_RenderLayersNode.h"
#include "COM_ExecutionSystem.h"
-#include "COM_RenderLayersImageProg.h"
-#include "COM_RenderLayersAlphaProg.h"
-#include "COM_RenderLayersDepthProg.h"
-#include "COM_RenderLayersNormalOperation.h"
-#include "COM_RenderLayersSpeedOperation.h"
-#include "COM_RenderLayersColorOperation.h"
-#include "COM_RenderLayersUVOperation.h"
-#include "COM_RenderLayersMistOperation.h"
-#include "COM_RenderLayersObjectIndexOperation.h"
-#include "COM_RenderLayersDiffuseOperation.h"
-#include "COM_RenderLayersSpecularOperation.h"
-#include "COM_RenderLayersShadowOperation.h"
-#include "COM_RenderLayersAOOperation.h"
-#include "COM_RenderLayersEmitOperation.h"
-#include "COM_RenderLayersReflectionOperation.h"
-#include "COM_RenderLayersRefractionOperation.h"
-#include "COM_RenderLayersEnvironmentOperation.h"
-#include "COM_RenderLayersIndirectOperation.h"
-#include "COM_RenderLayersMaterialIndexOperation.h"
-#include "COM_RenderLayersCyclesOperation.h"
+#include "COM_RenderLayersProg.h"
#include "COM_TranslateOperation.h"
#include "COM_RotateOperation.h"
#include "COM_ScaleOperation.h"
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.h b/source/blender/compositor/nodes/COM_RenderLayersNode.h
index 9bd74624b0c..0c769d32aea 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.h
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.h
@@ -22,7 +22,7 @@
#include "COM_Node.h"
#include "DNA_node_types.h"
-#include "COM_RenderLayersBaseProg.h"
+#include "COM_RenderLayersProg.h"
/**
* @brief RenderLayersNode
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index b48d974e893..b5fe4882f57 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -28,7 +28,7 @@
#include "COM_SetValueOperation.h"
#include "COM_MathBaseOperation.h"
#include "COM_AntiAliasOperation.h"
-#include "COM_MixBlendOperation.h"
+#include "COM_MixOperation.h"
#include "DNA_material_types.h" // the ramp types
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
index fa884bacf49..31b0422918a 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_AlphaOverKeyOperation_h
#define _COM_AlphaOverKeyOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
index 91128454783..14e7325ec1d 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_AlphaOverMixedOperation_h_
#define _COM_AlphaOverMixedOperation_h_
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
index d6e9e31c35f..16bd2aeaeed 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_AlphaOverPremultiplyOperation_h
#define _COM_AlphaOverPremultiplyOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.h b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
index 57e5dc991e9..01852084e41 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.h
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_ChangeHSVOperation_h
#define _COM_ChangeHSVOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.h b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
index 17f84965f63..efb4f7427ca 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_ChannelMatteOperation_h
#define _COM_ChannelMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.h b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
index adebb7a30c2..9557faec855 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_ChromaMatteOperation_h
#define _COM_ChromaMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.h b/source/blender/compositor/operations/COM_ColorMatteOperation.h
index 582a94e1873..f065a5f7e89 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_ColorMatteOperation_h
#define _COM_ColorMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
index e7d881cbbd5..e0a38f703ed 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_DifferenceMatteOperation_h
#define _COM_DifferenceMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
index 5a34135b1a4..43299486f60 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_DistanceRGBMatteOperation_h
#define _COM_DistanceRGBMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
index f4866a327f1..27025188d49 100644
--- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
+++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_DistanceYCCMatteOperation_h
#define _COM_DistanceYCCMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
#include "COM_DistanceRGBMatteOperation.h"
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
index 009a1e8825e..cb8cc01efea 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.h
@@ -21,7 +21,7 @@
#ifndef _COM_LuminanceMatteOperation_h
#define _COM_LuminanceMatteOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**
diff --git a/source/blender/compositor/operations/COM_MixAddOperation.cpp b/source/blender/compositor/operations/COM_MixAddOperation.cpp
deleted file mode 100644
index 4e0876439c0..00000000000
--- a/source/blender/compositor/operations/COM_MixAddOperation.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixAddOperation.h"
-
-MixAddOperation::MixAddOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- output[0] = inputColor1[0] + value * inputColor2[0];
- output[1] = inputColor1[1] + value * inputColor2[1];
- output[2] = inputColor1[2] + value * inputColor2[2];
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixAddOperation.h b/source/blender/compositor/operations/COM_MixAddOperation.h
deleted file mode 100644
index 5a52846e847..00000000000
--- a/source/blender/compositor/operations/COM_MixAddOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixAddOperation_h
-#define _COM_MixAddOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixAddOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixAddOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.cpp b/source/blender/compositor/operations/COM_MixBaseOperation.cpp
deleted file mode 100644
index 5b455338bb0..00000000000
--- a/source/blender/compositor/operations/COM_MixBaseOperation.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixBaseOperation.h"
-
-MixBaseOperation::MixBaseOperation() : NodeOperation()
-{
- this->addInputSocket(COM_DT_VALUE);
- this->addInputSocket(COM_DT_COLOR);
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
- this->setUseValueAlphaMultiply(false);
- this->setUseClamp(false);
-}
-
-void MixBaseOperation::initExecution()
-{
- this->m_inputValueOperation = this->getInputSocketReader(0);
- this->m_inputColor1Operation = this->getInputSocketReader(1);
- this->m_inputColor2Operation = this->getInputSocketReader(2);
-}
-
-void MixBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
- output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
- output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
- output[3] = inputColor1[3];
-}
-
-void MixBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
-{
- InputSocket *socket;
- unsigned int tempPreferredResolution[2] = {0, 0};
- unsigned int tempResolution[2];
-
- socket = this->getInputSocket(1);
- socket->determineResolution(tempResolution, tempPreferredResolution);
- if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
- this->setResolutionInputSocketIndex(1);
- }
- else {
- socket = this->getInputSocket(2);
- socket->determineResolution(tempResolution, tempPreferredResolution);
- if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
- this->setResolutionInputSocketIndex(2);
- }
- else {
- this->setResolutionInputSocketIndex(0);
- }
- }
- NodeOperation::determineResolution(resolution, preferredResolution);
-}
-
-void MixBaseOperation::deinitExecution()
-{
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
-}
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.h b/source/blender/compositor/operations/COM_MixBaseOperation.h
deleted file mode 100644
index 3c0c0778190..00000000000
--- a/source/blender/compositor/operations/COM_MixBaseOperation.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixBaseOperation_h
-#define _COM_MixBaseOperation_h
-#include "COM_NodeOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixBaseOperation : public NodeOperation {
-protected:
- /**
- * Prefetched reference to the inputProgram
- */
- SocketReader *m_inputValueOperation;
- SocketReader *m_inputColor1Operation;
- SocketReader *m_inputColor2Operation;
- bool m_valueAlphaMultiply;
- bool m_useClamp;
-
- inline void clampIfNeeded(float color[4])
- {
- if (m_useClamp) {
- CLAMP(color[0], 0.0f, 1.0f);
- CLAMP(color[1], 0.0f, 1.0f);
- CLAMP(color[2], 0.0f, 1.0f);
- CLAMP(color[3], 0.0f, 1.0f);
- }
- }
-
-public:
- /**
- * Default constructor
- */
- MixBaseOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * Initialize the execution
- */
- void initExecution();
-
- /**
- * Deinitialize the execution
- */
- void deinitExecution();
-
- void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
-
-
- void setUseValueAlphaMultiply(const bool value) { this->m_valueAlphaMultiply = value; }
- bool useValueAlphaMultiply() { return this->m_valueAlphaMultiply; }
- void setUseClamp(bool value) { this->m_useClamp = value; }
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixBlendOperation.cpp b/source/blender/compositor/operations/COM_MixBlendOperation.cpp
deleted file mode 100644
index 0ca7d460064..00000000000
--- a/source/blender/compositor/operations/COM_MixBlendOperation.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixBlendOperation.h"
-
-MixBlendOperation::MixBlendOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixBlendOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float value;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
- value = inputValue[0];
-
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
- output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
- output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixBlendOperation.h b/source/blender/compositor/operations/COM_MixBlendOperation.h
deleted file mode 100644
index ce3f187a5e2..00000000000
--- a/source/blender/compositor/operations/COM_MixBlendOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixBlendOperation_h
-#define _COM_MixBlendOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixBlendOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixBlendOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixBurnOperation.cpp b/source/blender/compositor/operations/COM_MixBurnOperation.cpp
deleted file mode 100644
index d4422c6cc6a..00000000000
--- a/source/blender/compositor/operations/COM_MixBurnOperation.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixBurnOperation.h"
-
-MixBurnOperation::MixBurnOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixBurnOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float tmp;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- tmp = valuem + value * inputColor2[0];
- if (tmp <= 0.0f)
- output[0] = 0.0f;
- else {
- tmp = 1.0f - (1.0f - inputColor1[0]) / tmp;
- if (tmp < 0.0f)
- output[0] = 0.0f;
- else if (tmp > 1.0f)
- output[0] = 1.0f;
- else
- output[0] = tmp;
- }
-
- tmp = valuem + value * inputColor2[1];
- if (tmp <= 0.0f)
- output[1] = 0.0f;
- else {
- tmp = 1.0f - (1.0f - inputColor1[1]) / tmp;
- if (tmp < 0.0f)
- output[1] = 0.0f;
- else if (tmp > 1.0f)
- output[1] = 1.0f;
- else
- output[1] = tmp;
- }
-
- tmp = valuem + value * inputColor2[2];
- if (tmp <= 0.0f)
- output[2] = 0.0f;
- else {
- tmp = 1.0f - (1.0f - inputColor1[2]) / tmp;
- if (tmp < 0.0f)
- output[2] = 0.0f;
- else if (tmp > 1.0f)
- output[2] = 1.0f;
- else
- output[2] = tmp;
- }
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixBurnOperation.h b/source/blender/compositor/operations/COM_MixBurnOperation.h
deleted file mode 100644
index 131ccfa2130..00000000000
--- a/source/blender/compositor/operations/COM_MixBurnOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixBurnOperation_h
-#define _COM_MixBurnOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixBurnOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixBurnOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.cpp b/source/blender/compositor/operations/COM_MixColorOperation.cpp
deleted file mode 100644
index 6919a636aeb..00000000000
--- a/source/blender/compositor/operations/COM_MixColorOperation.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixColorOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixColorOperation::MixColorOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float colH, colS, colV;
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- if (colS != 0.0f) {
- float rH, rS, rV;
- float tmpr, tmpg, tmpb;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
- output[0] = (valuem * inputColor1[0]) + (value * tmpr);
- output[1] = (valuem * inputColor1[1]) + (value * tmpg);
- output[2] = (valuem * inputColor1[2]) + (value * tmpb);
- }
- else {
- copy_v3_v3(output, inputColor1);
- }
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixColorOperation.h b/source/blender/compositor/operations/COM_MixColorOperation.h
deleted file mode 100644
index 1409d726f03..00000000000
--- a/source/blender/compositor/operations/COM_MixColorOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixColorOperation_h
-#define _COM_MixColorOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixColorOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixColorOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp b/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
deleted file mode 100644
index d56d9fdf122..00000000000
--- a/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDarkenOperation.h"
-
-MixDarkenOperation::MixDarkenOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDarkenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- float tmp;
- tmp = inputColor2[0] + ((1.0f - inputColor2[0]) * valuem);
- if (tmp < inputColor1[0]) output[0] = tmp;
- else output[0] = inputColor1[0];
- tmp = inputColor2[1] + ((1.0f - inputColor2[1]) * valuem);
- if (tmp < inputColor1[1]) output[1] = tmp;
- else output[1] = inputColor1[1];
- tmp = inputColor2[2] + ((1.0f - inputColor2[2]) * valuem);
- if (tmp < inputColor1[2]) output[2] = tmp;
- else output[2] = inputColor1[2];
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDarkenOperation.h b/source/blender/compositor/operations/COM_MixDarkenOperation.h
deleted file mode 100644
index f9c35fa364b..00000000000
--- a/source/blender/compositor/operations/COM_MixDarkenOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDarkenOperation_h
-#define _COM_MixDarkenOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDarkenOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDarkenOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp b/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
deleted file mode 100644
index 13494401c60..00000000000
--- a/source/blender/compositor/operations/COM_MixDifferenceOperation.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDifferenceOperation.h"
-#include "BLI_math.h"
-
-MixDifferenceOperation::MixDifferenceOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDifferenceOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = valuem * inputColor1[0] + value *fabsf(inputColor1[0] - inputColor2[0]);
- output[1] = valuem * inputColor1[1] + value *fabsf(inputColor1[1] - inputColor2[1]);
- output[2] = valuem * inputColor1[2] + value *fabsf(inputColor1[2] - inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDifferenceOperation.h b/source/blender/compositor/operations/COM_MixDifferenceOperation.h
deleted file mode 100644
index 7e4bf3c675c..00000000000
--- a/source/blender/compositor/operations/COM_MixDifferenceOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDifferenceOperation_h
-#define _COM_MixDifferenceOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDifferenceOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDifferenceOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDivideOperation.cpp b/source/blender/compositor/operations/COM_MixDivideOperation.cpp
deleted file mode 100644
index 3e0eb66565c..00000000000
--- a/source/blender/compositor/operations/COM_MixDivideOperation.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDivideOperation.h"
-
-MixDivideOperation::MixDivideOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- if (inputColor2[0] != 0.0f)
- output[0] = valuem * (inputColor1[0]) + value * (inputColor1[0]) / inputColor2[0];
- else
- output[0] = 0.0f;
- if (inputColor2[1] != 0.0f)
- output[1] = valuem * (inputColor1[1]) + value * (inputColor1[1]) / inputColor2[1];
- else
- output[1] = 0.0f;
- if (inputColor2[2] != 0.0f)
- output[2] = valuem * (inputColor1[2]) + value * (inputColor1[2]) / inputColor2[2];
- else
- output[2] = 0.0f;
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDivideOperation.h b/source/blender/compositor/operations/COM_MixDivideOperation.h
deleted file mode 100644
index f543265075b..00000000000
--- a/source/blender/compositor/operations/COM_MixDivideOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDivideOperation_h
-#define _COM_MixDivideOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDivideOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDivideOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp b/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
deleted file mode 100644
index acb39f665ff..00000000000
--- a/source/blender/compositor/operations/COM_MixDodgeOperation.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixDodgeOperation.h"
-
-MixDodgeOperation::MixDodgeOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixDodgeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float tmp;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
-
- if (inputColor1[0] != 0.0f) {
- tmp = 1.0f - value * inputColor2[0];
- if (tmp <= 0.0f)
- output[0] = 1.0f;
- else {
- tmp = inputColor1[0] / tmp;
- if (tmp > 1.0f)
- output[0] = 1.0f;
- else
- output[0] = tmp;
- }
- }
- else
- output[0] = 0.0f;
-
- if (inputColor1[1] != 0.0f) {
- tmp = 1.0f - value * inputColor2[1];
- if (tmp <= 0.0f)
- output[1] = 1.0f;
- else {
- tmp = inputColor1[1] / tmp;
- if (tmp > 1.0f)
- output[1] = 1.0f;
- else
- output[1] = tmp;
- }
- }
- else
- output[1] = 0.0f;
-
- if (inputColor1[2] != 0.0f) {
- tmp = 1.0f - value * inputColor2[2];
- if (tmp <= 0.0f)
- output[2] = 1.0f;
- else {
- tmp = inputColor1[2] / tmp;
- if (tmp > 1.0f)
- output[2] = 1.0f;
- else
- output[2] = tmp;
- }
- }
- else
- output[2] = 0.0f;
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixDodgeOperation.h b/source/blender/compositor/operations/COM_MixDodgeOperation.h
deleted file mode 100644
index 9a285c675c5..00000000000
--- a/source/blender/compositor/operations/COM_MixDodgeOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixDodgeOperation_h
-#define _COM_MixDodgeOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixDodgeOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixDodgeOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixGlareOperation.cpp b/source/blender/compositor/operations/COM_MixGlareOperation.cpp
deleted file mode 100644
index 1c6555206da..00000000000
--- a/source/blender/compositor/operations/COM_MixGlareOperation.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2011, Glareer Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixGlareOperation.h"
-
-MixGlareOperation::MixGlareOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixGlareOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
- float value;
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
- value = inputValue[0];
- float mf = 2.f - 2.f * fabsf(value - 0.5f);
-
- if (inputColor1[0] < 0.0f) inputColor1[0] = 0.0f;
- if (inputColor1[1] < 0.0f) inputColor1[1] = 0.0f;
- if (inputColor1[2] < 0.0f) inputColor1[2] = 0.0f;
-
- output[0] = mf * max(inputColor1[0] + value * (inputColor2[0] - inputColor1[0]), 0.0f);
- output[1] = mf * max(inputColor1[1] + value * (inputColor2[1] - inputColor1[1]), 0.0f);
- output[2] = mf * max(inputColor1[2] + value * (inputColor2[2] - inputColor1[2]), 0.0f);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixGlareOperation.h b/source/blender/compositor/operations/COM_MixGlareOperation.h
deleted file mode 100644
index 99d478e347d..00000000000
--- a/source/blender/compositor/operations/COM_MixGlareOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Glareer Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixGlareOperation_h
-#define _COM_MixGlareOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixGlareOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixGlareOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixHueOperation.cpp b/source/blender/compositor/operations/COM_MixHueOperation.cpp
deleted file mode 100644
index 64c88592b93..00000000000
--- a/source/blender/compositor/operations/COM_MixHueOperation.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixHueOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixHueOperation::MixHueOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixHueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float colH, colS, colV;
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- if (colS != 0.0f) {
- float rH, rS, rV;
- float tmpr, tmpg, tmpb;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- hsv_to_rgb(colH, rS, rV, &tmpr, &tmpg, &tmpb);
- output[0] = valuem * (inputColor1[0]) + value * tmpr;
- output[1] = valuem * (inputColor1[1]) + value * tmpg;
- output[2] = valuem * (inputColor1[2]) + value * tmpb;
- }
- else {
- copy_v3_v3(output, inputColor1);
- }
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixHueOperation.h b/source/blender/compositor/operations/COM_MixHueOperation.h
deleted file mode 100644
index d9864bbe3dc..00000000000
--- a/source/blender/compositor/operations/COM_MixHueOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixHueOperation_h
-#define _COM_MixHueOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixHueOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixHueOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixLightenOperation.cpp b/source/blender/compositor/operations/COM_MixLightenOperation.cpp
deleted file mode 100644
index a468fb39442..00000000000
--- a/source/blender/compositor/operations/COM_MixLightenOperation.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixLightenOperation.h"
-
-MixLightenOperation::MixLightenOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixLightenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float tmp;
- tmp = value * inputColor2[0];
- if (tmp > inputColor1[0]) output[0] = tmp;
- else output[0] = inputColor1[0];
- tmp = value * inputColor2[1];
- if (tmp > inputColor1[1]) output[1] = tmp;
- else output[1] = inputColor1[1];
- tmp = value * inputColor2[2];
- if (tmp > inputColor1[2]) output[2] = tmp;
- else output[2] = inputColor1[2];
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixLightenOperation.h b/source/blender/compositor/operations/COM_MixLightenOperation.h
deleted file mode 100644
index 5f08a067e11..00000000000
--- a/source/blender/compositor/operations/COM_MixLightenOperation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixLightenOperation_h
-#define _COM_MixLightenOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixLightenOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixLightenOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp b/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
deleted file mode 100644
index e1b5e040f0f..00000000000
--- a/source/blender/compositor/operations/COM_MixLinearLightOperation.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixLinearLightOperation.h"
-
-MixLinearLightOperation::MixLinearLightOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixLinearLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- if (inputColor2[0] > 0.5f)
- output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0] - 0.5f));
- else
- output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0]) - 1.0f);
- if (inputColor2[1] > 0.5f)
- output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1] - 0.5f));
- else
- output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1]) - 1.0f);
- if (inputColor2[2] > 0.5f)
- output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2] - 0.5f));
- else
- output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2]) - 1.0f);
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixLinearLightOperation.h b/source/blender/compositor/operations/COM_MixLinearLightOperation.h
deleted file mode 100644
index 35451a9f3db..00000000000
--- a/source/blender/compositor/operations/COM_MixLinearLightOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixLinearLightOperation_h
-#define _COM_MixLinearLightOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixLinearLightOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixLinearLightOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp b/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
deleted file mode 100644
index e53addb7041..00000000000
--- a/source/blender/compositor/operations/COM_MixMultiplyOperation.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixMultiplyOperation.h"
-
-MixMultiplyOperation::MixMultiplyOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- output[0] = inputColor1[0] * (valuem + value * inputColor2[0]);
- output[1] = inputColor1[1] * (valuem + value * inputColor2[1]);
- output[2] = inputColor1[2] * (valuem + value * inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixMultiplyOperation.h b/source/blender/compositor/operations/COM_MixMultiplyOperation.h
deleted file mode 100644
index cdd56bd2f39..00000000000
--- a/source/blender/compositor/operations/COM_MixMultiplyOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixMultiplyOperation_h
-#define _COM_MixMultiplyOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixMultiplyOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixMultiplyOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp
new file mode 100644
index 00000000000..f094e93f147
--- /dev/null
+++ b/source/blender/compositor/operations/COM_MixOperation.cpp
@@ -0,0 +1,848 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#include "COM_MixOperation.h"
+
+extern "C" {
+ #include "BLI_math.h"
+}
+
+/* ******** Mix Base Operation ******** */
+
+MixBaseOperation::MixBaseOperation() : NodeOperation()
+{
+ this->addInputSocket(COM_DT_VALUE);
+ this->addInputSocket(COM_DT_COLOR);
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+ this->m_inputValueOperation = NULL;
+ this->m_inputColor1Operation = NULL;
+ this->m_inputColor2Operation = NULL;
+ this->setUseValueAlphaMultiply(false);
+ this->setUseClamp(false);
+}
+
+void MixBaseOperation::initExecution()
+{
+ this->m_inputValueOperation = this->getInputSocketReader(0);
+ this->m_inputColor1Operation = this->getInputSocketReader(1);
+ this->m_inputColor2Operation = this->getInputSocketReader(2);
+}
+
+void MixBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
+ output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
+ output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
+ output[3] = inputColor1[3];
+}
+
+void MixBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
+{
+ InputSocket *socket;
+ unsigned int tempPreferredResolution[2] = {0, 0};
+ unsigned int tempResolution[2];
+
+ socket = this->getInputSocket(1);
+ socket->determineResolution(tempResolution, tempPreferredResolution);
+ if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
+ this->setResolutionInputSocketIndex(1);
+ }
+ else {
+ socket = this->getInputSocket(2);
+ socket->determineResolution(tempResolution, tempPreferredResolution);
+ if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
+ this->setResolutionInputSocketIndex(2);
+ }
+ else {
+ this->setResolutionInputSocketIndex(0);
+ }
+ }
+ NodeOperation::determineResolution(resolution, preferredResolution);
+}
+
+void MixBaseOperation::deinitExecution()
+{
+ this->m_inputValueOperation = NULL;
+ this->m_inputColor1Operation = NULL;
+ this->m_inputColor2Operation = NULL;
+}
+
+/* ******** Mix Add Operation ******** */
+
+MixAddOperation::MixAddOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixAddOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ output[0] = inputColor1[0] + value * inputColor2[0];
+ output[1] = inputColor1[1] + value * inputColor2[1];
+ output[2] = inputColor1[2] + value * inputColor2[2];
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Blend Operation ******** */
+
+MixBlendOperation::MixBlendOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixBlendOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float value;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+ value = inputValue[0];
+
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = valuem * (inputColor1[0]) + value * (inputColor2[0]);
+ output[1] = valuem * (inputColor1[1]) + value * (inputColor2[1]);
+ output[2] = valuem * (inputColor1[2]) + value * (inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Burn Operation ******** */
+
+MixBurnOperation::MixBurnOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixBurnOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float tmp;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ tmp = valuem + value * inputColor2[0];
+ if (tmp <= 0.0f)
+ output[0] = 0.0f;
+ else {
+ tmp = 1.0f - (1.0f - inputColor1[0]) / tmp;
+ if (tmp < 0.0f)
+ output[0] = 0.0f;
+ else if (tmp > 1.0f)
+ output[0] = 1.0f;
+ else
+ output[0] = tmp;
+ }
+
+ tmp = valuem + value * inputColor2[1];
+ if (tmp <= 0.0f)
+ output[1] = 0.0f;
+ else {
+ tmp = 1.0f - (1.0f - inputColor1[1]) / tmp;
+ if (tmp < 0.0f)
+ output[1] = 0.0f;
+ else if (tmp > 1.0f)
+ output[1] = 1.0f;
+ else
+ output[1] = tmp;
+ }
+
+ tmp = valuem + value * inputColor2[2];
+ if (tmp <= 0.0f)
+ output[2] = 0.0f;
+ else {
+ tmp = 1.0f - (1.0f - inputColor1[2]) / tmp;
+ if (tmp < 0.0f)
+ output[2] = 0.0f;
+ else if (tmp > 1.0f)
+ output[2] = 1.0f;
+ else
+ output[2] = tmp;
+ }
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Color Operation ******** */
+
+MixColorOperation::MixColorOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixColorOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ if (colS != 0.0f) {
+ float rH, rS, rV;
+ float tmpr, tmpg, tmpb;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ hsv_to_rgb(colH, colS, rV, &tmpr, &tmpg, &tmpb);
+ output[0] = (valuem * inputColor1[0]) + (value * tmpr);
+ output[1] = (valuem * inputColor1[1]) + (value * tmpg);
+ output[2] = (valuem * inputColor1[2]) + (value * tmpb);
+ }
+ else {
+ copy_v3_v3(output, inputColor1);
+ }
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Darken Operation ******** */
+
+MixDarkenOperation::MixDarkenOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDarkenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ float tmp;
+ tmp = inputColor2[0] + ((1.0f - inputColor2[0]) * valuem);
+ if (tmp < inputColor1[0]) output[0] = tmp;
+ else output[0] = inputColor1[0];
+ tmp = inputColor2[1] + ((1.0f - inputColor2[1]) * valuem);
+ if (tmp < inputColor1[1]) output[1] = tmp;
+ else output[1] = inputColor1[1];
+ tmp = inputColor2[2] + ((1.0f - inputColor2[2]) * valuem);
+ if (tmp < inputColor1[2]) output[2] = tmp;
+ else output[2] = inputColor1[2];
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Difference Operation ******** */
+
+MixDifferenceOperation::MixDifferenceOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDifferenceOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = valuem * inputColor1[0] + value *fabsf(inputColor1[0] - inputColor2[0]);
+ output[1] = valuem * inputColor1[1] + value *fabsf(inputColor1[1] - inputColor2[1]);
+ output[2] = valuem * inputColor1[2] + value *fabsf(inputColor1[2] - inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Difference Operation ******** */
+
+MixDivideOperation::MixDivideOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDivideOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ if (inputColor2[0] != 0.0f)
+ output[0] = valuem * (inputColor1[0]) + value * (inputColor1[0]) / inputColor2[0];
+ else
+ output[0] = 0.0f;
+ if (inputColor2[1] != 0.0f)
+ output[1] = valuem * (inputColor1[1]) + value * (inputColor1[1]) / inputColor2[1];
+ else
+ output[1] = 0.0f;
+ if (inputColor2[2] != 0.0f)
+ output[2] = valuem * (inputColor1[2]) + value * (inputColor1[2]) / inputColor2[2];
+ else
+ output[2] = 0.0f;
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Dodge Operation ******** */
+
+MixDodgeOperation::MixDodgeOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixDodgeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float tmp;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+
+ if (inputColor1[0] != 0.0f) {
+ tmp = 1.0f - value * inputColor2[0];
+ if (tmp <= 0.0f)
+ output[0] = 1.0f;
+ else {
+ tmp = inputColor1[0] / tmp;
+ if (tmp > 1.0f)
+ output[0] = 1.0f;
+ else
+ output[0] = tmp;
+ }
+ }
+ else
+ output[0] = 0.0f;
+
+ if (inputColor1[1] != 0.0f) {
+ tmp = 1.0f - value * inputColor2[1];
+ if (tmp <= 0.0f)
+ output[1] = 1.0f;
+ else {
+ tmp = inputColor1[1] / tmp;
+ if (tmp > 1.0f)
+ output[1] = 1.0f;
+ else
+ output[1] = tmp;
+ }
+ }
+ else
+ output[1] = 0.0f;
+
+ if (inputColor1[2] != 0.0f) {
+ tmp = 1.0f - value * inputColor2[2];
+ if (tmp <= 0.0f)
+ output[2] = 1.0f;
+ else {
+ tmp = inputColor1[2] / tmp;
+ if (tmp > 1.0f)
+ output[2] = 1.0f;
+ else
+ output[2] = tmp;
+ }
+ }
+ else
+ output[2] = 0.0f;
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Glare Operation ******** */
+
+MixGlareOperation::MixGlareOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixGlareOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+ float value;
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+ value = inputValue[0];
+ float mf = 2.f - 2.f * fabsf(value - 0.5f);
+
+ if (inputColor1[0] < 0.0f) inputColor1[0] = 0.0f;
+ if (inputColor1[1] < 0.0f) inputColor1[1] = 0.0f;
+ if (inputColor1[2] < 0.0f) inputColor1[2] = 0.0f;
+
+ output[0] = mf * max(inputColor1[0] + value * (inputColor2[0] - inputColor1[0]), 0.0f);
+ output[1] = mf * max(inputColor1[1] + value * (inputColor2[1] - inputColor1[1]), 0.0f);
+ output[2] = mf * max(inputColor1[2] + value * (inputColor2[2] - inputColor1[2]), 0.0f);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Hue Operation ******** */
+
+MixHueOperation::MixHueOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixHueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ if (colS != 0.0f) {
+ float rH, rS, rV;
+ float tmpr, tmpg, tmpb;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ hsv_to_rgb(colH, rS, rV, &tmpr, &tmpg, &tmpb);
+ output[0] = valuem * (inputColor1[0]) + value * tmpr;
+ output[1] = valuem * (inputColor1[1]) + value * tmpg;
+ output[2] = valuem * (inputColor1[2]) + value * tmpb;
+ }
+ else {
+ copy_v3_v3(output, inputColor1);
+ }
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Lighten Operation ******** */
+
+MixLightenOperation::MixLightenOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixLightenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float tmp;
+ tmp = value * inputColor2[0];
+ if (tmp > inputColor1[0]) output[0] = tmp;
+ else output[0] = inputColor1[0];
+ tmp = value * inputColor2[1];
+ if (tmp > inputColor1[1]) output[1] = tmp;
+ else output[1] = inputColor1[1];
+ tmp = value * inputColor2[2];
+ if (tmp > inputColor1[2]) output[2] = tmp;
+ else output[2] = inputColor1[2];
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Linear Light Operation ******** */
+
+MixLinearLightOperation::MixLinearLightOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixLinearLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ if (inputColor2[0] > 0.5f)
+ output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0] - 0.5f));
+ else
+ output[0] = inputColor1[0] + value * (2.0f * (inputColor2[0]) - 1.0f);
+ if (inputColor2[1] > 0.5f)
+ output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1] - 0.5f));
+ else
+ output[1] = inputColor1[1] + value * (2.0f * (inputColor2[1]) - 1.0f);
+ if (inputColor2[2] > 0.5f)
+ output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2] - 0.5f));
+ else
+ output[2] = inputColor1[2] + value * (2.0f * (inputColor2[2]) - 1.0f);
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Multiply Operation ******** */
+
+MixMultiplyOperation::MixMultiplyOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixMultiplyOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ output[0] = inputColor1[0] * (valuem + value * inputColor2[0]);
+ output[1] = inputColor1[1] * (valuem + value * inputColor2[1]);
+ output[2] = inputColor1[2] * (valuem + value * inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Ovelray Operation ******** */
+
+MixOverlayOperation::MixOverlayOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixOverlayOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+
+ float valuem = 1.0f - value;
+
+ if (inputColor1[0] < 0.5f) {
+ output[0] = inputColor1[0] * (valuem + 2.0f * value * inputColor2[0]);
+ }
+ else {
+ output[0] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
+ }
+ if (inputColor1[1] < 0.5f) {
+ output[1] = inputColor1[1] * (valuem + 2.0f * value * inputColor2[1]);
+ }
+ else {
+ output[1] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
+ }
+ if (inputColor1[2] < 0.5f) {
+ output[2] = inputColor1[2] * (valuem + 2.0f * value * inputColor2[2]);
+ }
+ else {
+ output[2] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
+ }
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Saturation Operation ******** */
+
+MixSaturationOperation::MixSaturationOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixSaturationOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float rH, rS, rV;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ if (rS != 0.0f) {
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &output[0], &output[1], &output[2]);
+ }
+ else {
+ copy_v3_v3(output, inputColor1);
+ }
+
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Screen Operation ******** */
+
+MixScreenOperation::MixScreenOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixScreenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ output[0] = 1.0f - (valuem + value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
+ output[1] = 1.0f - (valuem + value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
+ output[2] = 1.0f - (valuem + value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Soft Light Operation ******** */
+
+MixSoftLightOperation::MixSoftLightOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixSoftLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) \
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+ float scr, scg, scb;
+
+ /* first calculate non-fac based Screen mix */
+ scr = 1.0f - (1.0f - inputColor2[0]) * (1.0f - inputColor1[0]);
+ scg = 1.0f - (1.0f - inputColor2[1]) * (1.0f - inputColor1[1]);
+ scb = 1.0f - (1.0f - inputColor2[2]) * (1.0f - inputColor1[2]);
+
+ output[0] = valuem * (inputColor1[0]) + value * (((1.0f - inputColor1[0]) * inputColor2[0] * (inputColor1[0])) + (inputColor1[0] * scr));
+ output[1] = valuem * (inputColor1[1]) + value * (((1.0f - inputColor1[1]) * inputColor2[1] * (inputColor1[1])) + (inputColor1[1] * scg));
+ output[2] = valuem * (inputColor1[2]) + value * (((1.0f - inputColor1[2]) * inputColor2[2] * (inputColor1[2])) + (inputColor1[2] * scb));
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Subtract Operation ******** */
+
+MixSubtractOperation::MixSubtractOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ output[0] = inputColor1[0] - value * (inputColor2[0]);
+ output[1] = inputColor1[1] - value * (inputColor2[1]);
+ output[2] = inputColor1[2] - value * (inputColor2[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
+
+/* ******** Mix Value Operation ******** */
+
+MixValueOperation::MixValueOperation() : MixBaseOperation()
+{
+ /* pass */
+}
+
+void MixValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ float inputColor1[4];
+ float inputColor2[4];
+ float inputValue[4];
+
+ this->m_inputValueOperation->read(inputValue, x, y, sampler);
+ this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
+ this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
+
+ float value = inputValue[0];
+ if (this->useValueAlphaMultiply()) {
+ value *= inputColor2[3];
+ }
+ float valuem = 1.0f - value;
+
+ float rH, rS, rV;
+ float colH, colS, colV;
+ rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
+ rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
+ hsv_to_rgb(rH, rS, (valuem * rV + value * colV), &output[0], &output[1], &output[2]);
+ output[3] = inputColor1[3];
+
+ clampIfNeeded(output);
+}
diff --git a/source/blender/compositor/operations/COM_MixOperation.h b/source/blender/compositor/operations/COM_MixOperation.h
new file mode 100644
index 00000000000..93dbe6f36a6
--- /dev/null
+++ b/source/blender/compositor/operations/COM_MixOperation.h
@@ -0,0 +1,197 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#ifndef _COM_MixBaseOperation_h
+#define _COM_MixBaseOperation_h
+#include "COM_NodeOperation.h"
+
+
+/**
+ * All this programs converts an input color to an output value.
+ * it assumes we are in sRGB color space.
+ */
+
+class MixBaseOperation : public NodeOperation {
+protected:
+ /**
+ * Prefetched reference to the inputProgram
+ */
+ SocketReader *m_inputValueOperation;
+ SocketReader *m_inputColor1Operation;
+ SocketReader *m_inputColor2Operation;
+ bool m_valueAlphaMultiply;
+ bool m_useClamp;
+
+ inline void clampIfNeeded(float color[4])
+ {
+ if (m_useClamp) {
+ CLAMP(color[0], 0.0f, 1.0f);
+ CLAMP(color[1], 0.0f, 1.0f);
+ CLAMP(color[2], 0.0f, 1.0f);
+ CLAMP(color[3], 0.0f, 1.0f);
+ }
+ }
+
+public:
+ /**
+ * Default constructor
+ */
+ MixBaseOperation();
+
+ /**
+ * the inner loop of this program
+ */
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+ /**
+ * Initialize the execution
+ */
+ void initExecution();
+
+ /**
+ * Deinitialize the execution
+ */
+ void deinitExecution();
+
+ void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
+
+
+ void setUseValueAlphaMultiply(const bool value) { this->m_valueAlphaMultiply = value; }
+ bool useValueAlphaMultiply() { return this->m_valueAlphaMultiply; }
+ void setUseClamp(bool value) { this->m_useClamp = value; }
+};
+
+class MixAddOperation : public MixBaseOperation {
+public:
+ MixAddOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixBlendOperation : public MixBaseOperation {
+public:
+ MixBlendOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixBurnOperation : public MixBaseOperation {
+public:
+ MixBurnOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixColorOperation : public MixBaseOperation {
+public:
+ MixColorOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDarkenOperation : public MixBaseOperation {
+public:
+ MixDarkenOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDifferenceOperation : public MixBaseOperation {
+public:
+ MixDifferenceOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDivideOperation : public MixBaseOperation {
+public:
+ MixDivideOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixDodgeOperation : public MixBaseOperation {
+public:
+ MixDodgeOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixGlareOperation : public MixBaseOperation {
+public:
+ MixGlareOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixHueOperation : public MixBaseOperation {
+public:
+ MixHueOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixLightenOperation : public MixBaseOperation {
+public:
+ MixLightenOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixLinearLightOperation : public MixBaseOperation {
+public:
+ MixLinearLightOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixMultiplyOperation : public MixBaseOperation {
+public:
+ MixMultiplyOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixOverlayOperation : public MixBaseOperation {
+public:
+ MixOverlayOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixSaturationOperation : public MixBaseOperation {
+public:
+ MixSaturationOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixScreenOperation : public MixBaseOperation {
+public:
+ MixScreenOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixSoftLightOperation : public MixBaseOperation {
+public:
+ MixSoftLightOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixSubtractOperation : public MixBaseOperation {
+public:
+ MixSubtractOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+class MixValueOperation : public MixBaseOperation {
+public:
+ MixValueOperation();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+};
+
+#endif
diff --git a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp b/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
deleted file mode 100644
index d5e1c6d1167..00000000000
--- a/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixOverlayOperation.h"
-
-MixOverlayOperation::MixOverlayOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixOverlayOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
-
- float valuem = 1.0f - value;
-
- if (inputColor1[0] < 0.5f) {
- output[0] = inputColor1[0] * (valuem + 2.0f * value * inputColor2[0]);
- }
- else {
- output[0] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
- }
- if (inputColor1[1] < 0.5f) {
- output[1] = inputColor1[1] * (valuem + 2.0f * value * inputColor2[1]);
- }
- else {
- output[1] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
- }
- if (inputColor1[2] < 0.5f) {
- output[2] = inputColor1[2] * (valuem + 2.0f * value * inputColor2[2]);
- }
- else {
- output[2] = 1.0f - (valuem + 2.0f * value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
- }
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixOverlayOperation.h b/source/blender/compositor/operations/COM_MixOverlayOperation.h
deleted file mode 100644
index 4f2c08ce95f..00000000000
--- a/source/blender/compositor/operations/COM_MixOverlayOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixOverlayOperation_h
-#define _COM_MixOverlayOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixOverlayOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixOverlayOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp b/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
deleted file mode 100644
index ca45a1c703a..00000000000
--- a/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixSaturationOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixSaturationOperation::MixSaturationOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixSaturationOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float rH, rS, rV;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- if (rS != 0.0f) {
- float colH, colS, colV;
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &output[0], &output[1], &output[2]);
- }
- else {
- copy_v3_v3(output, inputColor1);
- }
-
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixSaturationOperation.h b/source/blender/compositor/operations/COM_MixSaturationOperation.h
deleted file mode 100644
index c690db38daf..00000000000
--- a/source/blender/compositor/operations/COM_MixSaturationOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixSaturationOperation_h
-#define _COM_MixSaturationOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixSaturationOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixSaturationOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixScreenOperation.cpp b/source/blender/compositor/operations/COM_MixScreenOperation.cpp
deleted file mode 100644
index 511768a49ad..00000000000
--- a/source/blender/compositor/operations/COM_MixScreenOperation.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixScreenOperation.h"
-
-MixScreenOperation::MixScreenOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixScreenOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- output[0] = 1.0f - (valuem + value * (1.0f - inputColor2[0])) * (1.0f - inputColor1[0]);
- output[1] = 1.0f - (valuem + value * (1.0f - inputColor2[1])) * (1.0f - inputColor1[1]);
- output[2] = 1.0f - (valuem + value * (1.0f - inputColor2[2])) * (1.0f - inputColor1[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixScreenOperation.h b/source/blender/compositor/operations/COM_MixScreenOperation.h
deleted file mode 100644
index 5ba3cf769bb..00000000000
--- a/source/blender/compositor/operations/COM_MixScreenOperation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixScreenOperation_h
-#define _COM_MixScreenOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixScreenOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixScreenOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp b/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
deleted file mode 100644
index 71d83ce54ea..00000000000
--- a/source/blender/compositor/operations/COM_MixSoftLightOperation.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixSoftLightOperation.h"
-
-MixSoftLightOperation::MixSoftLightOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixSoftLightOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) \
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
- float scr, scg, scb;
-
- /* first calculate non-fac based Screen mix */
- scr = 1.0f - (1.0f - inputColor2[0]) * (1.0f - inputColor1[0]);
- scg = 1.0f - (1.0f - inputColor2[1]) * (1.0f - inputColor1[1]);
- scb = 1.0f - (1.0f - inputColor2[2]) * (1.0f - inputColor1[2]);
-
- output[0] = valuem * (inputColor1[0]) + value * (((1.0f - inputColor1[0]) * inputColor2[0] * (inputColor1[0])) + (inputColor1[0] * scr));
- output[1] = valuem * (inputColor1[1]) + value * (((1.0f - inputColor1[1]) * inputColor2[1] * (inputColor1[1])) + (inputColor1[1] * scg));
- output[2] = valuem * (inputColor1[2]) + value * (((1.0f - inputColor1[2]) * inputColor2[2] * (inputColor1[2])) + (inputColor1[2] * scb));
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixSoftLightOperation.h b/source/blender/compositor/operations/COM_MixSoftLightOperation.h
deleted file mode 100644
index 55f6a70791a..00000000000
--- a/source/blender/compositor/operations/COM_MixSoftLightOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixSoftLightOperation_h
-#define _COM_MixSoftLightOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixSoftLightOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixSoftLightOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp b/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
deleted file mode 100644
index e6efe0f62f3..00000000000
--- a/source/blender/compositor/operations/COM_MixSubtractOperation.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixSubtractOperation.h"
-
-MixSubtractOperation::MixSubtractOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixSubtractOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- output[0] = inputColor1[0] - value * (inputColor2[0]);
- output[1] = inputColor1[1] - value * (inputColor2[1]);
- output[2] = inputColor1[2] - value * (inputColor2[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
-
diff --git a/source/blender/compositor/operations/COM_MixSubtractOperation.h b/source/blender/compositor/operations/COM_MixSubtractOperation.h
deleted file mode 100644
index 046d8d4949b..00000000000
--- a/source/blender/compositor/operations/COM_MixSubtractOperation.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixSubtractOperation_h
-#define _COM_MixSubtractOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixSubtractOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixSubtractOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_MixValueOperation.cpp b/source/blender/compositor/operations/COM_MixValueOperation.cpp
deleted file mode 100644
index 553041e39bf..00000000000
--- a/source/blender/compositor/operations/COM_MixValueOperation.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_MixValueOperation.h"
-
-extern "C" {
- #include "BLI_math.h"
-}
-
-MixValueOperation::MixValueOperation() : MixBaseOperation()
-{
- /* pass */
-}
-
-void MixValueOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- float inputColor1[4];
- float inputColor2[4];
- float inputValue[4];
-
- this->m_inputValueOperation->read(inputValue, x, y, sampler);
- this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
- this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
-
- float value = inputValue[0];
- if (this->useValueAlphaMultiply()) {
- value *= inputColor2[3];
- }
- float valuem = 1.0f - value;
-
- float rH, rS, rV;
- float colH, colS, colV;
- rgb_to_hsv(inputColor1[0], inputColor1[1], inputColor1[2], &rH, &rS, &rV);
- rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
- hsv_to_rgb(rH, rS, (valuem * rV + value * colV), &output[0], &output[1], &output[2]);
- output[3] = inputColor1[3];
-
- clampIfNeeded(output);
-}
diff --git a/source/blender/compositor/operations/COM_MixValueOperation.h b/source/blender/compositor/operations/COM_MixValueOperation.h
deleted file mode 100644
index 6c3f3ce8072..00000000000
--- a/source/blender/compositor/operations/COM_MixValueOperation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_MixValueOperation_h
-#define _COM_MixValueOperation_h
-#include "COM_MixBaseOperation.h"
-
-
-/**
- * this program converts an input color to an output value.
- * it assumes we are in sRGB color space.
- */
-class MixValueOperation : public MixBaseOperation {
-public:
- /**
- * Default constructor
- */
- MixValueOperation();
-
- /**
- * the inner loop of this program
- */
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-};
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp
deleted file mode 100644
index bb165c2fe1c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersAOOperation.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersAOOperation.h"
-
-RenderLayersAOOperation::RenderLayersAOOperation() : RenderLayersBaseProg(SCE_PASS_AO, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
-
diff --git a/source/blender/compositor/operations/COM_RenderLayersAOOperation.h b/source/blender/compositor/operations/COM_RenderLayersAOOperation.h
deleted file mode 100644
index 71b0b885e81..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersAOOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersAOOperation_h
-#define _COM_RenderLayersAOOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersAOOperation : public RenderLayersBaseProg {
-public:
- RenderLayersAOOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
deleted file mode 100644
index 74cb506d264..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersAlphaProg.h"
-
-RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
-
-void RenderLayersAlphaProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
- int ix = x;
- int iy = y;
- float *inputBuffer = this->getInputBuffer();
-
- if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
- output[0] = 0.0f;
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
- }
- else {
- unsigned int offset = (iy * this->getWidth() + ix) * 4;
- output[0] = inputBuffer[offset + 3];
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
- }
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h b/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
deleted file mode 100644
index 36668bc9338..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersAlphaProg.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersAlphaProg_h
-#define _COM_RenderLayersAlphaProg_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersAlphaProg : public RenderLayersBaseProg {
-public:
- RenderLayersAlphaProg();
- void executePixel(float output[4], float x, float y, PixelSampler sampler);
-
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp b/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
deleted file mode 100644
index b50dca33f3b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersBaseProg.h"
-
-#include "BLI_listbase.h"
-#include "DNA_scene_types.h"
-
-extern "C" {
- #include "RE_pipeline.h"
- #include "RE_shader_ext.h"
- #include "RE_render_ext.h"
-}
-
-RenderLayersBaseProg::RenderLayersBaseProg(int renderpass, int elementsize) : NodeOperation()
-{
- this->m_renderpass = renderpass;
- this->setScene(NULL);
- this->m_inputBuffer = NULL;
- this->m_elementsize = elementsize;
- this->m_rd = NULL;
-}
-
-
-void RenderLayersBaseProg::initExecution()
-{
- Scene *scene = this->getScene();
- Render *re = (scene) ? RE_GetRender(scene->id.name) : NULL;
- RenderResult *rr = NULL;
-
- if (re)
- rr = RE_AcquireResultRead(re);
-
- if (rr) {
- SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&scene->r.layers, getLayerId());
- if (srl) {
-
- RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
- if (rl && rl->rectf) {
- this->m_inputBuffer = RE_RenderLayerGetPass(rl, this->m_renderpass);
-
- if (this->m_inputBuffer == NULL || this->m_renderpass == SCE_PASS_COMBINED) {
- this->m_inputBuffer = rl->rectf;
- }
- }
- }
- }
- if (re) {
- RE_ReleaseResult(re);
- re = NULL;
- }
-}
-
-void RenderLayersBaseProg::doInterpolation(float output[4], float x, float y, PixelSampler sampler)
-{
- unsigned int offset;
- int ix, iy;
- int width = this->getWidth(), height = this->getHeight();
-
- switch (sampler) {
- case COM_PS_NEAREST:
- ix = x;
- iy = y;
- offset = (iy * width + ix) * this->m_elementsize;
-
- if (this->m_elementsize == 1)
- output[0] = this->m_inputBuffer[offset];
- else if (this->m_elementsize == 3)
- copy_v3_v3(output, &this->m_inputBuffer[offset]);
- else
- copy_v4_v4(output, &this->m_inputBuffer[offset]);
-
- break;
-
- case COM_PS_BILINEAR:
- BLI_bilinear_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
- break;
-
- case COM_PS_BICUBIC:
- BLI_bicubic_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
- break;
- }
-
- if (this->m_elementsize == 1) {
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
- }
- else if (this->m_elementsize == 3) {
- output[3] = 1.0f;
- }
-}
-
-void RenderLayersBaseProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
-{
-#if 0
- const RenderData *rd = this->m_rd;
-
- int dx = 0, dy = 0;
-
- if (rd->mode & R_BORDER && rd->mode & R_CROP) {
- /* see comment in executeRegion describing coordinate mapping,
- * here it simply goes other way around
- */
- int full_width = rd->xsch * rd->size / 100;
- int full_height = rd->ysch * rd->size / 100;
-
- dx = rd->border.xmin * full_width - (full_width - this->getWidth()) / 2.0f;
- dy = rd->border.ymin * full_height - (full_height - this->getHeight()) / 2.0f;
- }
-
- int ix = x - dx;
- int iy = y - dy;
-#else
- int ix = x;
- int iy = y;
-#endif
-
- if (this->m_inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
- zero_v4(output);
- }
- else {
- doInterpolation(output, ix, iy, sampler);
- }
-}
-
-void RenderLayersBaseProg::deinitExecution()
-{
- this->m_inputBuffer = NULL;
-}
-
-void RenderLayersBaseProg::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
-{
- Scene *sce = this->getScene();
- Render *re = (sce) ? RE_GetRender(sce->id.name) : NULL;
- RenderResult *rr = NULL;
-
- resolution[0] = 0;
- resolution[1] = 0;
-
- if (re)
- rr = RE_AcquireResultRead(re);
-
- if (rr) {
- SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&sce->r.layers, getLayerId());
- if (srl) {
- RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
- if (rl && rl->rectf) {
- resolution[0] = rl->rectx;
- resolution[1] = rl->recty;
- }
- }
- }
-
- if (re)
- RE_ReleaseResult(re);
-
-}
-
diff --git a/source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp
deleted file mode 100644
index 3083c37c2bb..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersColorOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersColorOperation.h"
-
-RenderLayersColorOperation::RenderLayersColorOperation() : RenderLayersBaseProg(SCE_PASS_RGBA, 4)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersColorOperation.h b/source/blender/compositor/operations/COM_RenderLayersColorOperation.h
deleted file mode 100644
index 4f4dfbfb6f3..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersColorOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersColorOperation_h
-#define _COM_RenderLayersColorOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersColorOperation : public RenderLayersBaseProg {
-public:
- RenderLayersColorOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp
deleted file mode 100644
index b056896994e..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersCyclesOperation.h"
-
-RenderLayersCyclesOperation::RenderLayersCyclesOperation(int pass) : RenderLayersBaseProg(pass, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h b/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h
deleted file mode 100644
index baa53c7388b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersCyclesOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersCyclesOperation_h
-#define _COM_RenderLayersCyclesOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersCyclesOperation : public RenderLayersBaseProg {
-public:
- RenderLayersCyclesOperation(int pass);
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp b/source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp
deleted file mode 100644
index ae5fc3b2254..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDepthProg.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersDepthProg.h"
-
-RenderLayersDepthProg::RenderLayersDepthProg() : RenderLayersBaseProg(SCE_PASS_Z, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
-
diff --git a/source/blender/compositor/operations/COM_RenderLayersDepthProg.h b/source/blender/compositor/operations/COM_RenderLayersDepthProg.h
deleted file mode 100644
index fdbe25c818e..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDepthProg.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersDepthProg_h
-#define _COM_RenderLayersDepthProg_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersDepthProg : public RenderLayersBaseProg {
-public:
- RenderLayersDepthProg();
-
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp
deleted file mode 100644
index 6baa25e5600..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersDiffuseOperation.h"
-
-RenderLayersDiffuseOperation::RenderLayersDiffuseOperation() : RenderLayersBaseProg(SCE_PASS_DIFFUSE, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h b/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h
deleted file mode 100644
index 8c20d6f497d..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersDiffuseOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersDiffuseOperation_h
-#define _COM_RenderLayersDiffuseOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersDiffuseOperation : public RenderLayersBaseProg {
-public:
- RenderLayersDiffuseOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp
deleted file mode 100644
index 1b03a4e169f..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersEmitOperation.h"
-
-RenderLayersEmitOperation::RenderLayersEmitOperation() : RenderLayersBaseProg(SCE_PASS_EMIT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.h b/source/blender/compositor/operations/COM_RenderLayersEmitOperation.h
deleted file mode 100644
index c003cb2f87b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEmitOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersEmitOperation_h
-#define _COM_RenderLayersEmitOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersEmitOperation : public RenderLayersBaseProg {
-public:
- RenderLayersEmitOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp
deleted file mode 100644
index f4d6dc7353b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersEnvironmentOperation.h"
-
-RenderLayersEnvironmentOperation::RenderLayersEnvironmentOperation() : RenderLayersBaseProg(SCE_PASS_ENVIRONMENT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h b/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h
deleted file mode 100644
index b9310a1778b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersEnvironmentOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersEnvironmentOperation_h
-#define _COM_RenderLayersEnvironmentOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersEnvironmentOperation : public RenderLayersBaseProg {
-public:
- RenderLayersEnvironmentOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersImageProg.cpp b/source/blender/compositor/operations/COM_RenderLayersImageProg.cpp
deleted file mode 100644
index f21585844ff..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersImageProg.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersImageProg.h"
-
-RenderLayersColorProg::RenderLayersColorProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersImageProg.h b/source/blender/compositor/operations/COM_RenderLayersImageProg.h
deleted file mode 100644
index 5fa74c8b21f..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersImageProg.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersColorProg_h
-#define _COM_RenderLayersColorProg_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-/// @todo rename to image operation
-class RenderLayersColorProg : public RenderLayersBaseProg {
-public:
- RenderLayersColorProg();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp
deleted file mode 100644
index 4258cb94a26..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersIndirectOperation.h"
-
-RenderLayersIndirectOperation::RenderLayersIndirectOperation() : RenderLayersBaseProg(SCE_PASS_INDIRECT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h b/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h
deleted file mode 100644
index d64207a4355..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersIndirectOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersIndirectOperation_h
-#define _COM_RenderLayersIndirectOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersIndirectOperation : public RenderLayersBaseProg {
-public:
- RenderLayersIndirectOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp
deleted file mode 100644
index aab7e0089e4..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersMaterialIndexOperation.h"
-
-RenderLayersMaterialIndexOperation::RenderLayersMaterialIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXMA, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h b/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h
deleted file mode 100644
index d06568f5a10..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMaterialIndexOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersMaterialIndexOperation_h
-#define _COM_RenderLayersMaterialIndexOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersMaterialIndexOperation : public RenderLayersBaseProg {
-public:
- RenderLayersMaterialIndexOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp
deleted file mode 100644
index c64ddc6e9d8..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMistOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersMistOperation.h"
-
-RenderLayersMistOperation::RenderLayersMistOperation() : RenderLayersBaseProg(SCE_PASS_MIST, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersMistOperation.h b/source/blender/compositor/operations/COM_RenderLayersMistOperation.h
deleted file mode 100644
index ad838c9e340..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersMistOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersMistOperation_h
-#define _COM_RenderLayersMistOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersMistOperation : public RenderLayersBaseProg {
-public:
- RenderLayersMistOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp
deleted file mode 100644
index 9d8e7d6272c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersNormalOperation.h"
-
-RenderLayersNormalOperation::RenderLayersNormalOperation() : RenderLayersBaseProg(SCE_PASS_NORMAL, 3)
-{
- this->addOutputSocket(COM_DT_VECTOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.h b/source/blender/compositor/operations/COM_RenderLayersNormalOperation.h
deleted file mode 100644
index 39b2040863a..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersNormalOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersNormalOperation_h
-#define _COM_RenderLayersNormalOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersNormalOperation : public RenderLayersBaseProg {
-public:
- RenderLayersNormalOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp
deleted file mode 100644
index 430ea698263..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersObjectIndexOperation.h"
-
-RenderLayersObjectIndexOperation::RenderLayersObjectIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXOB, 1)
-{
- this->addOutputSocket(COM_DT_VALUE);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h b/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h
deleted file mode 100644
index e8a1602cbfc..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersObjectIndexOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersObjectIndexOperation_h
-#define _COM_RenderLayersObjectIndexOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersObjectIndexOperation : public RenderLayersBaseProg {
-public:
- RenderLayersObjectIndexOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
new file mode 100644
index 00000000000..8a32502982c
--- /dev/null
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -0,0 +1,340 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#include "COM_RenderLayersProg.h"
+
+#include "BLI_listbase.h"
+#include "DNA_scene_types.h"
+
+extern "C" {
+ #include "RE_pipeline.h"
+ #include "RE_shader_ext.h"
+ #include "RE_render_ext.h"
+}
+
+/* ******** Render Layers Base Prog ******** */
+
+RenderLayersBaseProg::RenderLayersBaseProg(int renderpass, int elementsize) : NodeOperation()
+{
+ this->m_renderpass = renderpass;
+ this->setScene(NULL);
+ this->m_inputBuffer = NULL;
+ this->m_elementsize = elementsize;
+ this->m_rd = NULL;
+}
+
+
+void RenderLayersBaseProg::initExecution()
+{
+ Scene *scene = this->getScene();
+ Render *re = (scene) ? RE_GetRender(scene->id.name) : NULL;
+ RenderResult *rr = NULL;
+
+ if (re)
+ rr = RE_AcquireResultRead(re);
+
+ if (rr) {
+ SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&scene->r.layers, getLayerId());
+ if (srl) {
+
+ RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
+ if (rl && rl->rectf) {
+ this->m_inputBuffer = RE_RenderLayerGetPass(rl, this->m_renderpass);
+
+ if (this->m_inputBuffer == NULL || this->m_renderpass == SCE_PASS_COMBINED) {
+ this->m_inputBuffer = rl->rectf;
+ }
+ }
+ }
+ }
+ if (re) {
+ RE_ReleaseResult(re);
+ re = NULL;
+ }
+}
+
+void RenderLayersBaseProg::doInterpolation(float output[4], float x, float y, PixelSampler sampler)
+{
+ unsigned int offset;
+ int ix, iy;
+ int width = this->getWidth(), height = this->getHeight();
+
+ switch (sampler) {
+ case COM_PS_NEAREST:
+ ix = x;
+ iy = y;
+ offset = (iy * width + ix) * this->m_elementsize;
+
+ if (this->m_elementsize == 1)
+ output[0] = this->m_inputBuffer[offset];
+ else if (this->m_elementsize == 3)
+ copy_v3_v3(output, &this->m_inputBuffer[offset]);
+ else
+ copy_v4_v4(output, &this->m_inputBuffer[offset]);
+
+ break;
+
+ case COM_PS_BILINEAR:
+ BLI_bilinear_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
+ break;
+
+ case COM_PS_BICUBIC:
+ BLI_bicubic_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y);
+ break;
+ }
+
+ if (this->m_elementsize == 1) {
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+ else if (this->m_elementsize == 3) {
+ output[3] = 1.0f;
+ }
+}
+
+void RenderLayersBaseProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+#if 0
+ const RenderData *rd = this->m_rd;
+
+ int dx = 0, dy = 0;
+
+ if (rd->mode & R_BORDER && rd->mode & R_CROP) {
+ /* see comment in executeRegion describing coordinate mapping,
+ * here it simply goes other way around
+ */
+ int full_width = rd->xsch * rd->size / 100;
+ int full_height = rd->ysch * rd->size / 100;
+
+ dx = rd->border.xmin * full_width - (full_width - this->getWidth()) / 2.0f;
+ dy = rd->border.ymin * full_height - (full_height - this->getHeight()) / 2.0f;
+ }
+
+ int ix = x - dx;
+ int iy = y - dy;
+#else
+ int ix = x;
+ int iy = y;
+#endif
+
+ if (this->m_inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
+ zero_v4(output);
+ }
+ else {
+ doInterpolation(output, ix, iy, sampler);
+ }
+}
+
+void RenderLayersBaseProg::deinitExecution()
+{
+ this->m_inputBuffer = NULL;
+}
+
+void RenderLayersBaseProg::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
+{
+ Scene *sce = this->getScene();
+ Render *re = (sce) ? RE_GetRender(sce->id.name) : NULL;
+ RenderResult *rr = NULL;
+
+ resolution[0] = 0;
+ resolution[1] = 0;
+
+ if (re)
+ rr = RE_AcquireResultRead(re);
+
+ if (rr) {
+ SceneRenderLayer *srl = (SceneRenderLayer *)BLI_findlink(&sce->r.layers, getLayerId());
+ if (srl) {
+ RenderLayer *rl = RE_GetRenderLayer(rr, srl->name);
+ if (rl && rl->rectf) {
+ resolution[0] = rl->rectx;
+ resolution[1] = rl->recty;
+ }
+ }
+ }
+
+ if (re)
+ RE_ReleaseResult(re);
+
+}
+
+/* ******** Render Layers AO Operation ******** */
+
+RenderLayersAOOperation::RenderLayersAOOperation() : RenderLayersBaseProg(SCE_PASS_AO, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Alpha Operation ******** */
+
+RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+void RenderLayersAlphaProg::executePixel(float output[4], float x, float y, PixelSampler sampler)
+{
+ int ix = x;
+ int iy = y;
+ float *inputBuffer = this->getInputBuffer();
+
+ if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
+ output[0] = 0.0f;
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+ else {
+ unsigned int offset = (iy * this->getWidth() + ix) * 4;
+ output[0] = inputBuffer[offset + 3];
+ output[1] = 0.0f;
+ output[2] = 0.0f;
+ output[3] = 0.0f;
+ }
+}
+
+/* ******** Render Layers Color Operation ******** */
+
+RenderLayersColorOperation::RenderLayersColorOperation() : RenderLayersBaseProg(SCE_PASS_RGBA, 4)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Cycles Operation ******** */
+
+RenderLayersCyclesOperation::RenderLayersCyclesOperation(int pass) : RenderLayersBaseProg(pass, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Depth Operation ******** */
+
+RenderLayersDepthProg::RenderLayersDepthProg() : RenderLayersBaseProg(SCE_PASS_Z, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+/* ******** Render Layers Diffuse Operation ******** */
+
+RenderLayersDiffuseOperation::RenderLayersDiffuseOperation() : RenderLayersBaseProg(SCE_PASS_DIFFUSE, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Emit Operation ******** */
+
+RenderLayersEmitOperation::RenderLayersEmitOperation() : RenderLayersBaseProg(SCE_PASS_EMIT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Environment Operation ******** */
+
+RenderLayersEnvironmentOperation::RenderLayersEnvironmentOperation() : RenderLayersBaseProg(SCE_PASS_ENVIRONMENT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Image Operation ******** */
+
+RenderLayersColorProg::RenderLayersColorProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Indirect Operation ******** */
+
+RenderLayersIndirectOperation::RenderLayersIndirectOperation() : RenderLayersBaseProg(SCE_PASS_INDIRECT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Material Index Operation ******** */
+
+RenderLayersMaterialIndexOperation::RenderLayersMaterialIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXMA, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+/* ******** Render Layers Mist Operation ******** */
+
+RenderLayersMistOperation::RenderLayersMistOperation() : RenderLayersBaseProg(SCE_PASS_MIST, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+/* ******** Render Layers Normal Operation ******** */
+
+RenderLayersNormalOperation::RenderLayersNormalOperation() : RenderLayersBaseProg(SCE_PASS_NORMAL, 3)
+{
+ this->addOutputSocket(COM_DT_VECTOR);
+}
+
+/* ******** Render Layers Object Index Operation ******** */
+
+RenderLayersObjectIndexOperation::RenderLayersObjectIndexOperation() : RenderLayersBaseProg(SCE_PASS_INDEXOB, 1)
+{
+ this->addOutputSocket(COM_DT_VALUE);
+}
+
+/* ******** Render Layers Reflection Operation ******** */
+
+RenderLayersReflectionOperation::RenderLayersReflectionOperation() : RenderLayersBaseProg(SCE_PASS_REFLECT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Refraction Operation ******** */
+
+RenderLayersRefractionOperation::RenderLayersRefractionOperation() : RenderLayersBaseProg(SCE_PASS_REFRACT, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Shadow Operation ******** */
+
+RenderLayersShadowOperation::RenderLayersShadowOperation() : RenderLayersBaseProg(SCE_PASS_SHADOW, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Specular Operation ******** */
+
+RenderLayersSpecularOperation::RenderLayersSpecularOperation() : RenderLayersBaseProg(SCE_PASS_SPEC, 3)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers Speed Operation ******** */
+
+RenderLayersSpeedOperation::RenderLayersSpeedOperation() : RenderLayersBaseProg(SCE_PASS_VECTOR, 4)
+{
+ this->addOutputSocket(COM_DT_COLOR);
+}
+
+/* ******** Render Layers UV Operation ******** */
+
+RenderLayersUVOperation::RenderLayersUVOperation() : RenderLayersBaseProg(SCE_PASS_UV, 3)
+{
+ this->addOutputSocket(COM_DT_VECTOR);
+}
diff --git a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h b/source/blender/compositor/operations/COM_RenderLayersProg.h
index 84d6c1ee188..48aaa47cc50 100644
--- a/source/blender/compositor/operations/COM_RenderLayersBaseProg.h
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.h
@@ -102,4 +102,107 @@ public:
void executePixel(float output[4], float x, float y, PixelSampler sampler);
};
+class RenderLayersAOOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersAOOperation();
+};
+
+class RenderLayersAlphaProg : public RenderLayersBaseProg {
+public:
+ RenderLayersAlphaProg();
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+};
+
+class RenderLayersColorOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersColorOperation();
+};
+
+class RenderLayersCyclesOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersCyclesOperation(int pass);
+};
+
+class RenderLayersDepthProg : public RenderLayersBaseProg {
+public:
+ RenderLayersDepthProg();
+};
+
+class RenderLayersDiffuseOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersDiffuseOperation();
+};
+
+class RenderLayersEmitOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersEmitOperation();
+};
+
+class RenderLayersEnvironmentOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersEnvironmentOperation();
+};
+
+/// @todo rename to image operation
+class RenderLayersColorProg : public RenderLayersBaseProg {
+public:
+ RenderLayersColorProg();
+};
+
+class RenderLayersIndirectOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersIndirectOperation();
+};
+
+class RenderLayersMaterialIndexOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersMaterialIndexOperation();
+};
+
+class RenderLayersMistOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersMistOperation();
+};
+
+class RenderLayersNormalOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersNormalOperation();
+};
+
+class RenderLayersObjectIndexOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersObjectIndexOperation();
+};
+
+class RenderLayersReflectionOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersReflectionOperation();
+};
+
+class RenderLayersRefractionOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersRefractionOperation();
+};
+
+class RenderLayersShadowOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersShadowOperation();
+};
+
+class RenderLayersSpecularOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersSpecularOperation();
+};
+
+class RenderLayersSpeedOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersSpeedOperation();
+};
+
+class RenderLayersUVOperation : public RenderLayersBaseProg {
+public:
+ RenderLayersUVOperation();
+};
+
#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp
deleted file mode 100644
index 1fbd599235b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersReflectionOperation.h"
-
-RenderLayersReflectionOperation::RenderLayersReflectionOperation() : RenderLayersBaseProg(SCE_PASS_REFLECT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h b/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h
deleted file mode 100644
index 3dc7148930b..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersReflectionOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersReflectionOperation_h
-#define _COM_RenderLayersReflectionOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersReflectionOperation : public RenderLayersBaseProg {
-public:
- RenderLayersReflectionOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp
deleted file mode 100644
index 2ec9be46059..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersRefractionOperation.h"
-
-RenderLayersRefractionOperation::RenderLayersRefractionOperation() : RenderLayersBaseProg(SCE_PASS_REFRACT, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h b/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h
deleted file mode 100644
index 02ac7aa14f4..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersRefractionOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersRefractionOperation_h
-#define _COM_RenderLayersRefractionOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersRefractionOperation : public RenderLayersBaseProg {
-public:
- RenderLayersRefractionOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp
deleted file mode 100644
index 7582e010e2c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersShadowOperation.h"
-
-RenderLayersShadowOperation::RenderLayersShadowOperation() : RenderLayersBaseProg(SCE_PASS_SHADOW, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.h b/source/blender/compositor/operations/COM_RenderLayersShadowOperation.h
deleted file mode 100644
index af35915c2ee..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersShadowOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersShadowOperation_h
-#define _COM_RenderLayersShadowOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersShadowOperation : public RenderLayersBaseProg {
-public:
- RenderLayersShadowOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp
deleted file mode 100644
index 60c1636dcda..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersSpecularOperation.h"
-
-RenderLayersSpecularOperation::RenderLayersSpecularOperation() : RenderLayersBaseProg(SCE_PASS_SPEC, 3)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h b/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h
deleted file mode 100644
index fc7d77976a3..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpecularOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersSpecularOperation_h
-#define _COM_RenderLayersSpecularOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersSpecularOperation : public RenderLayersBaseProg {
-public:
- RenderLayersSpecularOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp
deleted file mode 100644
index 5a0662d13eb..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersSpeedOperation.h"
-
-RenderLayersSpeedOperation::RenderLayersSpeedOperation() : RenderLayersBaseProg(SCE_PASS_VECTOR, 4)
-{
- this->addOutputSocket(COM_DT_COLOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h b/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h
deleted file mode 100644
index d341aa43950..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersSpeedOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersSpeedOperation_h
-#define _COM_RenderLayersSpeedOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersSpeedOperation : public RenderLayersBaseProg {
-public:
- RenderLayersSpeedOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp b/source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp
deleted file mode 100644
index b966f98632c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersUVOperation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#include "COM_RenderLayersUVOperation.h"
-
-RenderLayersUVOperation::RenderLayersUVOperation() : RenderLayersBaseProg(SCE_PASS_UV, 3)
-{
- this->addOutputSocket(COM_DT_VECTOR);
-}
diff --git a/source/blender/compositor/operations/COM_RenderLayersUVOperation.h b/source/blender/compositor/operations/COM_RenderLayersUVOperation.h
deleted file mode 100644
index 3068372a66c..00000000000
--- a/source/blender/compositor/operations/COM_RenderLayersUVOperation.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011, Blender Foundation.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor:
- * Jeroen Bakker
- * Monique Dewanchand
- */
-
-#ifndef _COM_RenderLayersUVOperation_h
-#define _COM_RenderLayersUVOperation_h
-
-#include "COM_RenderLayersBaseProg.h"
-
-class RenderLayersUVOperation : public RenderLayersBaseProg {
-public:
- RenderLayersUVOperation();
-};
-
-#endif
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.h b/source/blender/compositor/operations/COM_ZCombineOperation.h
index 4545775f26f..eeeb29d330f 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.h
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.h
@@ -22,7 +22,7 @@
#ifndef _COM_ZCombineOperation_h
#define _COM_ZCombineOperation_h
-#include "COM_MixBaseOperation.h"
+#include "COM_MixOperation.h"
/**