From b60ef5570f005374e688d62c69017543befca74e Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 5 Nov 2013 15:05:23 +0000 Subject: overlay in blend mode --- rotord/src/nodes_channels.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rotord/src/nodes_channels.h') 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); -- cgit v1.2.3