summaryrefslogtreecommitdiff
path: root/rotord/src/nodes_channels.h
diff options
context:
space:
mode:
authorTim Redfern <tim@Adaptics.local>2013-11-05 15:05:23 +0000
committerTim Redfern <tim@Adaptics.local>2013-11-05 15:05:23 +0000
commitb60ef5570f005374e688d62c69017543befca74e (patch)
treeb1af031769b297295fa864a86df0b168a074ed6d /rotord/src/nodes_channels.h
parent8bba898010f1a8f728a0a7e91be93a0671a4efed (diff)
overlay in blend mode
Diffstat (limited to 'rotord/src/nodes_channels.h')
-rw-r--r--rotord/src/nodes_channels.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/rotord/src/nodes_channels.h b/rotord/src/nodes_channels.h
index fe129ea..e991660 100644
--- a/rotord/src/nodes_channels.h
+++ b/rotord/src/nodes_channels.h
@@ -69,13 +69,14 @@ namespace Rotor {
#define BLEND_alpha 4
#define BLEND_wrap 5
#define BLEND_xor 6
+#define BLEND_overlay 7
class Blend: public Image_node {
public:
Blend(){
create_image_input("image input 1","Image input 1");
create_image_input("image input 2","Image input 2");
create_parameter("amount","number","amount to blend input 2","Blend amount",0.5f,0.0f,1.0f);
- create_attribute("mode","Blend mode","Blend mode","blend",{"blend","screen","multiply","alpha","wrap","xor"});
+ create_attribute("mode","Blend mode","Blend mode","blend",{"blend","screen","multiply","alpha","wrap","xor","overlay"});
title ="Blend";
description="Blend images in various modes";
UID="12ed7af0-2d0a-11e3-ae32-2b44203b93c9";
@@ -107,6 +108,9 @@ namespace Rotor {
case BLEND_wrap:
image=image.add_wrap(*in2);
break;
+ case BLEND_overlay:
+ image=image.overlay(*in2);
+ break;
case BLEND_blend: //has to be last because of initialser of *in? go figure
image*=(1.0f-parameters["amount"]->value);