{
  "Name": "AddRadialGradient",
  "_id": "cd55bb66-9392-46d2-aa7b-e6dafc687fae",
  "Namespace": "lib.image.generate",
  "Description": "Creates a radial gradient texture.",
  "Inputs": [
    {
      "Name": "Code",
      "MetaInstanceID": "f7514432-d8b1-4678-896e-596e845e1553",
      "DefaultValue": {
        "Type": "Text",
        "Value": [
          "//>>> _common parameters\r",
          "float4x4 objectToWorldMatrix;",
          "float4x4 worldToCameraMatrix;",
          "float4x4 projMatrix;",
          "Texture2D txDiffuse;",
          "float2 RenderTargetSize;",
          "//<<< _common parameters\r",
          "\r",
          "//>>> _parameters\r",
          "float3 ColorRadius;",
          "float4 ColorA;",
          "float4 ColorB;",
          "float4 ColorC;",
          "float4 ColorD;",
          "float2 Center;",
          "Texture2D Image1;",
          "float2 Stretch;",
          "//<<< _parameters\r",
          "\r",
          "//>>> _setup\r",
          "SamplerState samLinear",
          "{",
          "    Filter = MIN_MAG_MIP_LINEAR;",
          "    AddressU = Clamp;",
          "    AddressV = Clamp;",
          "};",
          "//<<< _setup\r",
          "\r",
          "//>>> _declarations\r",
          "struct VS_IN",
          "{",
          "    float4 pos : POSITION;",
          "    float2 texCoord : TEXCOORD;",
          "};",
          "",
          "struct PS_IN",
          "{",
          "    float4 pos : SV_POSITION;",
          "    float2 texCoord: TEXCOORD0;",
          "};",
          "//<<< _declarations\r",
          "\r",
          "//>>> _GS\r",
          "",
          "//<<< _GS\r",
          "\r",
          "//>>> _VS \r",
          "PS_IN VS( VS_IN input )",
          "{",
          "    PS_IN output = (PS_IN)0;",
          "",
          "    output.pos = mul(input.pos, worldToCameraMatrix);",
          "    output.pos = mul(output.pos, projMatrix);",
          "    output.texCoord = input.texCoord;",
          "",
          "    return output;",
          "}",
          "//<<< _VS\r",
          "\r",
          "//>>> PS\r",
          "float4 PS(PS_IN input) : SV_Target\r",
          "{\r",
          "\r",
          "    float aspectRatio = RenderTargetSize.x/RenderTargetSize.y;\r",
          "\r",
          "    //return float4(1,1,0,1);\r",
          "    float2 p= input.pos/RenderTargetSize - float2(0.5,0.5) + 0.5*float2(-Center.x, Center.y);\r",
          "     \r",
          "    p.x *=  aspectRatio;\r",
          "    p/=  Stretch;\r",
          "    float d = length(p) * 2;\r",
          "    \r",
          "    float4 src= Image1.Sample(samLinear, input.texCoord); \r",
          "    \r",
          "    float4 c;\r",
          "    \r",
          "    if( d < ColorRadius.x) {\r",
          "        c= lerp( ColorA, ColorB, d / ColorRadius.x);\r",
          "    }\r",
          "    else if( d < ColorRadius.y+ColorRadius.x) {\r",
          "        c= lerp( ColorB, ColorC, (d-ColorRadius.x) / (ColorRadius.y));\r",
          "    }\r",
          "    else if ( d < ColorRadius.y+ColorRadius.x+ColorRadius.z) {\r",
          "        c= lerp( ColorC, ColorD, (d-ColorRadius.x-ColorRadius.y) / (ColorRadius.z+0.0001));\r",
          "    }\r",
          "    else {\r",
          "        c= ColorD;\r",
          "    }\r",
          "    c= clamp(c, 0, 10000);\r",
          "    \r",
          "    /*\r",
          "    //float a = src.a + c.a - src.a * c.a;\r",
          "    float a=  src.a + c.a * (1 - src.a);\r",
          "    return float4(0, src.a,0,1);\r",
          "    //float3 rgb= (1.0 - c.a) * src.rgb + c.a * c.rgb;   \r",
          "    \r",
          "    float3 rgb =  (src.rgb * src.a + c.rgb * c.a * (1- src.a) ) / a;\r",
          "    */\r",
          "\r",
          "    //float a = src.a + c.a - src.a * c.a;\r",
          "    //return src;\r",
          "    float a=  src.a + c.a * (1 - src.a);\r",
          "    \r",
          "    //return float4(0, a,0,1);\r",
          "    //float3 rgb= (1.0 - c.a) * src.rgb + c.a * c.rgb;   \r",
          "    \r",
          "    float3 rgb =  (c.rgb * c.a  +  src.rgb * src.a * (1- c.a) ) / a;\r",
          "\r",
          "    \r",
          "    return clamp(float4(rgb, a), 0,1000);\r",
          "}\r",
          "//<<< PS\r",
          "\r",
          "//>>> _technique\r",
          "technique10 Render",
          "{",
          "    pass P0",
          "    {",
          "        SetGeometryShader( 0 );",
          "        SetVertexShader( CompileShader( vs_4_0, VS() ) );",
          "        SetPixelShader( CompileShader( ps_4_0, PS() ) );",
          "    }",
          "}",
          "//<<< _technique\r",
          ""
        ]
      },
      "MetaID": "c522a66e-3260-4692-b3e3-79fd0361fa3d",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorRadius.A",
      "MetaInstanceID": "13fcfbc8-ed05-4c1a-8b21-5a9b05a0715f",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0.2"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "10000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorRadius.B",
      "MetaInstanceID": "b2d1f154-e9c7-428e-a0b1-2da65ec8bdb9",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0.2"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "10000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorRadius.C",
      "MetaInstanceID": "3377a752-e3a9-46c8-a5e7-accb31d874cf",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0.2"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "10000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorA.R",
      "MetaInstanceID": "edc64db4-3032-42b9-80ed-767940b1e424",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorA.G",
      "MetaInstanceID": "b482dd3a-6c53-497c-9a56-11ff10b56ab2",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorA.B",
      "MetaInstanceID": "65d7b588-866a-4458-9dd7-e9a5f531a5b1",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorA.A",
      "MetaInstanceID": "b625e2cd-47e5-4a74-8643-4e607326812c",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorB.R",
      "MetaInstanceID": "084ab4e2-ce0d-4fb4-8341-05a86b6b27c4",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorB.G",
      "MetaInstanceID": "e8ac0209-f2d3-4dfc-af8c-bdfbc15bfba4",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorB.B",
      "MetaInstanceID": "480f80cb-b9be-400b-a36c-da72ccf9a61f",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorB.A",
      "MetaInstanceID": "867db478-93ac-47d8-9587-c2b20e8df6c8",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorC.R",
      "MetaInstanceID": "c9823bc5-de0a-4595-a10f-72f8a4787bd2",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorC.G",
      "MetaInstanceID": "f5ea0ab4-483e-4f98-b955-cfb64f4d041b",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorC.B",
      "MetaInstanceID": "953004c2-1190-4b34-9a42-6a6d8d918403",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorC.A",
      "MetaInstanceID": "763276b8-dec3-4659-b0ae-ca3ee9ae283e",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorD.R",
      "MetaInstanceID": "03985bd3-b075-40ed-a0af-c3db842f5375",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorD.G",
      "MetaInstanceID": "fdd1b12e-afb5-45e2-88aa-6369b493a3e5",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorD.B",
      "MetaInstanceID": "731cef65-ec8a-4eb0-add6-aa4d4631ff46",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "ColorD.A",
      "MetaInstanceID": "b632538d-11d0-4592-943e-3f22154ee916",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "1",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Center.X",
      "MetaInstanceID": "20d272bc-da0f-4a4d-813b-15e13a420d78",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Center.Y",
      "MetaInstanceID": "a0c62a67-7fb0-4d43-8b18-841e62887c18",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Image1",
      "MetaInstanceID": "5af0191b-9954-4123-836c-cd4edcfcf337",
      "DefaultValue": {
        "Type": "Image",
        "Value": "Framefield.Core.Image"
      },
      "MetaID": "9848060d-fd84-45b0-b658-d0d531c61dab",
      "IsMultiInput": "False",
      "Relevance": "Relevant",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Stretch.X",
      "MetaInstanceID": "f5a8e209-8d5e-47fd-9a6b-287699e5049f",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "10000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Stretch.Y",
      "MetaInstanceID": "83f7ca15-09fd-426b-9669-f3301223321c",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "10000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    }
  ],
  "Outputs": [
    {
      "Name": "Image",
      "MetaInstanceID": "5d514b3e-e746-4088-8db8-8679d181f71a",
      "MetaID": "9848060d-fd84-45b0-b658-d0d531c61dab"
    }
  ],
  "OperatorParts": [
    {
      "MetaInstanceID": "af722154-0904-4d84-a27b-8766fefdab60",
      "MetaID": "c9fccc0e-52c9-47aa-ad9d-6f6c5561a76f",
      "Name": "AddRadialGradientFunc",
      "Version": "f8e4bdf7-66b3-4622-b438-ac99f06a89ae",
      "Type": "Float",
      "IsMultiInput": "True",
      "Script": [
        "//>>> _using",
        "using System;",
        "using System.Collections.Generic;",
        "using System.Linq;",
        "using System.Text;",
        "using SharpDX;",
        "using SharpDX.Direct3D11;",
        "using SharpDX.Windows;",
        "//<<< _using",
        "",
        "namespace Framefield.Core.IDc9fccc0e_52c9_47aa_ad9d_6f6c5561a76f",
        "{",
        "    public class Class_AddRadialGradient : FXImageFunction",
        "    {",
        "        //>>> _inputids",
        "        private enum InputId",
        "        {",
        "            Code = 0,",
        "            ColorRadiusA = 1,",
        "            ColorRadiusB = 2,",
        "            ColorRadiusC = 3,",
        "            ColorAR = 4,",
        "            ColorAG = 5,",
        "            ColorAB = 6,",
        "            ColorAA = 7,",
        "            ColorBR = 8,",
        "            ColorBG = 9,",
        "            ColorBB = 10,",
        "            ColorBA = 11,",
        "            ColorCR = 12,",
        "            ColorCG = 13,",
        "            ColorCB = 14,",
        "            ColorCA = 15,",
        "            ColorDR = 16,",
        "            ColorDG = 17,",
        "            ColorDB = 18,",
        "            ColorDA = 19,",
        "            CenterX = 20,",
        "            CenterY = 21,",
        "            Image1 = 22,",
        "            StretchX = 23,",
        "            StretchY = 24",
        "        }",
        "        //<<< _inputids",
        "",
        "        public override OperatorPartContext Eval(OperatorPartContext context, List<OperatorPart> inputs, int outputIdx) {",
        "            //>>> _params",
        "            var Code = inputs[(int)InputId.Code].Eval(context).Text;",
        "            var ColorRadiusA = inputs[(int)InputId.ColorRadiusA].Eval(context).Value;",
        "            var ColorRadiusB = inputs[(int)InputId.ColorRadiusB].Eval(context).Value;",
        "            var ColorRadiusC = inputs[(int)InputId.ColorRadiusC].Eval(context).Value;",
        "            var ColorRadius = new Vector3(ColorRadiusA, ColorRadiusB, ColorRadiusC);",
        "            var ColorAR = inputs[(int)InputId.ColorAR].Eval(context).Value;",
        "            var ColorAG = inputs[(int)InputId.ColorAG].Eval(context).Value;",
        "            var ColorAB = inputs[(int)InputId.ColorAB].Eval(context).Value;",
        "            var ColorAA = inputs[(int)InputId.ColorAA].Eval(context).Value;",
        "            var ColorA = new Color4(ColorAR, ColorAG, ColorAB, ColorAA);",
        "            var ColorBR = inputs[(int)InputId.ColorBR].Eval(context).Value;",
        "            var ColorBG = inputs[(int)InputId.ColorBG].Eval(context).Value;",
        "            var ColorBB = inputs[(int)InputId.ColorBB].Eval(context).Value;",
        "            var ColorBA = inputs[(int)InputId.ColorBA].Eval(context).Value;",
        "            var ColorB = new Color4(ColorBR, ColorBG, ColorBB, ColorBA);",
        "            var ColorCR = inputs[(int)InputId.ColorCR].Eval(context).Value;",
        "            var ColorCG = inputs[(int)InputId.ColorCG].Eval(context).Value;",
        "            var ColorCB = inputs[(int)InputId.ColorCB].Eval(context).Value;",
        "            var ColorCA = inputs[(int)InputId.ColorCA].Eval(context).Value;",
        "            var ColorC = new Color4(ColorCR, ColorCG, ColorCB, ColorCA);",
        "            var ColorDR = inputs[(int)InputId.ColorDR].Eval(context).Value;",
        "            var ColorDG = inputs[(int)InputId.ColorDG].Eval(context).Value;",
        "            var ColorDB = inputs[(int)InputId.ColorDB].Eval(context).Value;",
        "            var ColorDA = inputs[(int)InputId.ColorDA].Eval(context).Value;",
        "            var ColorD = new Color4(ColorDR, ColorDG, ColorDB, ColorDA);",
        "            var CenterX = inputs[(int)InputId.CenterX].Eval(context).Value;",
        "            var CenterY = inputs[(int)InputId.CenterY].Eval(context).Value;",
        "            var Center = new Vector2(CenterX, CenterY);",
        "            var Image1 = inputs[(int)InputId.Image1].Eval(context).Image; // Needs to be checked for null!",
        "            var StretchX = inputs[(int)InputId.StretchX].Eval(context).Value;",
        "            var StretchY = inputs[(int)InputId.StretchY].Eval(context).Value;",
        "            var Stretch = new Vector2(StretchX, StretchY);",
        "            //<<< _params",
        "               ",
        "            return PrepareAndEvalOnChange(context, () => {",
        "                ClearRenderTarget(context, new SharpDX.Color4(0, 0, 0, 0f));",
        "",
        "                //>>> _setup",
        "                using (var Image1View = new ShaderResourceView(context.D3DDevice, Image1))",
        "                {",
        "                    _effect.GetVariableByName(\"RenderTargetSize\").AsVector().Set(new Vector2(_usedViewport.Width, _usedViewport.Height));",
        "                    _effect.GetVariableByName(\"ColorRadius\").AsVector().Set(new Vector3(ColorRadiusA, ColorRadiusB, ColorRadiusC));",
        "                    _effect.GetVariableByName(\"ColorA\").AsVector().Set(new Vector4(ColorAR, ColorAG, ColorAB, ColorAA));",
        "                    _effect.GetVariableByName(\"ColorB\").AsVector().Set(new Vector4(ColorBR, ColorBG, ColorBB, ColorBA));",
        "                    _effect.GetVariableByName(\"ColorC\").AsVector().Set(new Vector4(ColorCR, ColorCG, ColorCB, ColorCA));",
        "                    _effect.GetVariableByName(\"ColorD\").AsVector().Set(new Vector4(ColorDR, ColorDG, ColorDB, ColorDA));",
        "                    _effect.GetVariableByName(\"Center\").AsVector().Set(new Vector2(CenterX, CenterY));",
        "                    _effect.GetVariableByName(\"Image1\").AsShaderResource().SetResource(Image1View);",
        "                    _effect.GetVariableByName(\"Stretch\").AsVector().Set(new Vector2(StretchX, StretchY));",
        "                //<<< _setup",
        "",
        "                //var prevBlendState = context.BlendState;",
        "                //context.BlendState = OperatorPartContext.DefaultRenderer.DefaultBlendState;",
        "                //_blendState = OperatorPartContext.DefaultRenderer.DefaultBlendState;",
        "                //_blendState = OperatorPartContext.DefaultRenderer.DisabledBlendState;",
        "                var blendStateDescription = new BlendStateDescription();",
        "                blendStateDescription.RenderTarget[0].IsBlendEnabled = true;",
        "                blendStateDescription.RenderTarget[0].SourceBlend = BlendOption.One; //BlendOption.SourceAlpha;",
        "                blendStateDescription.RenderTarget[0].DestinationBlend =  BlendOption.Zero; //BlendOption.InverseSourceAlpha;",
        "                blendStateDescription.RenderTarget[0].BlendOperation = BlendOperation.Add;",
        "                blendStateDescription.RenderTarget[0].SourceAlphaBlend = BlendOption.One;// BlendOption.SourceAlpha;",
        "                blendStateDescription.RenderTarget[0].DestinationAlphaBlend = BlendOption.Zero; //BlendOption.DestinationAlpha;",
        "                blendStateDescription.RenderTarget[0].AlphaBlendOperation = BlendOperation.Add;",
        "                blendStateDescription.RenderTarget[0].RenderTargetWriteMask = ColorWriteMaskFlags.All;",
        "                //blendStateDescription.RenderTarget[0].IsBlendEnabled = false;                ",
        "                //blendStateDescription.AlphaToCoverageEnable = true;",
        "                _blendState = new BlendState(D3DDevice.Device, blendStateDescription);",
        "                ",
        "                Render(context);",
        "",
        "                //context.BlendState = prevBlendState;",
        "",
        "                //>>> _cleanup",
        "                }",
        "                //<<< _cleanup",
        "            });",
        "        }",
        "",
        "    }",
        "}",
        "",
        "",
        "",
        ""
      ],
      "AdditionalAssemblies": []
    }
  ],
  "Operators": [],
  "Connections": [
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "af722154-0904-4d84-a27b-8766fefdab60",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "5d514b3e-e746-4088-8db8-8679d181f71a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "f7514432-d8b1-4678-896e-596e845e1553",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "13fcfbc8-ed05-4c1a-8b21-5a9b05a0715f",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "b2d1f154-e9c7-428e-a0b1-2da65ec8bdb9",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "3377a752-e3a9-46c8-a5e7-accb31d874cf",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "edc64db4-3032-42b9-80ed-767940b1e424",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "b482dd3a-6c53-497c-9a56-11ff10b56ab2",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "65d7b588-866a-4458-9dd7-e9a5f531a5b1",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "b625e2cd-47e5-4a74-8643-4e607326812c",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "084ab4e2-ce0d-4fb4-8341-05a86b6b27c4",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "e8ac0209-f2d3-4dfc-af8c-bdfbc15bfba4",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "480f80cb-b9be-400b-a36c-da72ccf9a61f",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "867db478-93ac-47d8-9587-c2b20e8df6c8",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "c9823bc5-de0a-4595-a10f-72f8a4787bd2",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "f5ea0ab4-483e-4f98-b955-cfb64f4d041b",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "953004c2-1190-4b34-9a42-6a6d8d918403",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "763276b8-dec3-4659-b0ae-ca3ee9ae283e",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "03985bd3-b075-40ed-a0af-c3db842f5375",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "fdd1b12e-afb5-45e2-88aa-6369b493a3e5",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "731cef65-ec8a-4eb0-add6-aa4d4631ff46",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "b632538d-11d0-4592-943e-3f22154ee916",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "20d272bc-da0f-4a4d-813b-15e13a420d78",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "a0c62a67-7fb0-4d43-8b18-841e62887c18",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "5af0191b-9954-4123-836c-cd4edcfcf337",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "f5a8e209-8d5e-47fd-9a6b-287699e5049f",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "83f7ca15-09fd-426b-9669-f3301223321c",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "af722154-0904-4d84-a27b-8766fefdab60"
    }
  ]
}