{
  "Name": "BrokenTV",
  "_id": "da47276f-afb2-4128-9942-614cdfeafbf3",
  "Namespace": "lib.image",
  "Description": "Advanced 2d-displacement effect.\r\n\r\n\r\nAll Channels of the displace-map have a different function:\r\n\r\nR-Displaces\r\nG-Saturation\r\nB-Brightness\r\nA-Amount of RGB-Split\r\n\r\n\r\nwhere as..\r\n0 - max negetiv\r\n0,5 is neutral \r\n1 - max possitve",
  "Inputs": [
    {
      "Name": "Code",
      "MetaInstanceID": "f689c14c-1ea1-4b0f-bf31-0ea6a035c7c5",
      "DefaultValue": {
        "Type": "Text",
        "Value": [
          "//>>> _common parameters\r",
          "float4x4 objectToWorldMatrix;",
          "float4x4 worldToCameraMatrix;",
          "float4x4 projMatrix;",
          "Texture2D txDiffuse;",
          "float2 RenderTargetSize;",
          "//<<< _common parameters\r",
          "\r",
          "//>>> _parameters\r",
          "Texture2D Image;",
          "Texture2D DisplaceMap;",
          "float2 Displace;",
          "float2 Offset;",
          "float Desaturation;",
          "float RGBSplitAmount;",
          "float Brightness;",
          "float Contrast;",
          "float Noise;",
          "float Time;",
          "float2 NoiseScale;",
          "float2 RollDisplacement;",
          "float2 HorizontalSlice;",
          "float2 VerticalSlice;",
          "Texture2D NoiseTexture;",
          "float OverallAmount;",
          "//<<< _parameters\r",
          " \r",
          "//>>> __setup\r",
          "SamplerState samLinear",
          "{",
          "    Filter = MIN_MAG_MIP_LINEAR;",
          "    AddressU = Wrap;",
          "    AddressV = Wrap;",
          "};",
          "\r",
          "SamplerState samLinearClamped\r",
          "{\r",
          "    Filter = MIN_MAG_MIP_LINEAR;\r",
          "    AddressU = Clamp;\r",
          "    AddressV = Clamp;\r",
          "};\r",
          "\r",
          "//<<< __setup\r",
          "\r",
          "//>>> declarations\r",
          "struct VS_IN\r",
          "{\r",
          "    float4 pos : POSITION;\r",
          "    float2 texCoord : TEXCOORD;\r",
          "};\r",
          "\r",
          "struct PS_IN\r",
          "{\r",
          "    float4 pos : SV_POSITION;\r",
          "    float2 texCoord: TEXCOORD0;\t    \r",
          "    float3 worldTViewPos: TEXCOORD1;\r",
          "    float3 worldTViewDir: TEXCOORD2;\r",
          "};\r",
          "//<<< 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",
          "float random( float2 p )\r",
          "{\r",
          "  // We need irrationals for pseudo randomness.\r",
          "  // Most (all?) known transcendental numbers will (generally) work.\r",
          "  const float2 r = float2(\r",
          "    23.1406926327792690,  // e^pi (Gelfond's constant)\r",
          "     2.6651441426902251); // 2^sqrt(2) (Gelfond–Schneider constant)\r",
          "  return frac( cos( fmod( 123456789., 1e-7 + 256. * dot(p,r) ) ) );  \r",
          "}\r",
          "\r",
          "\r",
          "float4 PS( PS_IN input ) : SV_Target\r",
          "{\r",
          "    float2 p=input.texCoord + RollDisplacement;\r",
          "    \r",
          "    float4 displace = DisplaceMap.Sample(samLinear, p * float2(HorizontalSlice.x, VerticalSlice.x) + float2 (HorizontalSlice.y, VerticalSlice.y) ); \r",
          "    float2 pDisplaced= (displace.r- 0.5) * Displace + Offset;\r",
          "    \r",
          "    float2 pSample = input.texCoord + pDisplaced;\r",
          "    \r",
          "    \r",
          "    float2 noisePoint = (p +pDisplaced)/NoiseScale;\r",
          "    float noiseValue= random( float2( noisePoint.x * 0.012 *( fmod(Time,263)+101), \r",
          "                noisePoint.y +  (Time+101) * 0.013));\r",
          "        \r",
          "    float2 rgbSplitOffset = float2(displace.r * RGBSplitAmount / 100,0);\r",
          "    float4 c1 = Image.Sample(samLinearClamped, pSample - rgbSplitOffset);\r",
          "    float4 c2 = Image.Sample(samLinearClamped, pSample );\r",
          "    float4 c3 = Image.Sample(samLinearClamped, pSample + rgbSplitOffset);\r",
          "    \r",
          "    float4 c = float4(c1.r, c2.g, c3.b, c2.a);\r",
          "    c+= (noiseValue * Noise * (displace.b-0.5)) * NoiseTexture.Sample(samLinear, p);;\r",
          "    c.rgb = clamp(c.rgb, 0, 100);\r",
          "    c.a = clamp(c.a, 0.01, 1);\r",
          "    \r",
          "    \r",
          "    c+= Contrast * (displace.b) + (Brightness );\r",
          "    \r",
          "    float3 desaturated = dot( float3(0.22, 0.707, 0.071), c.rgb );\r",
          "    c.rgb = lerp( c.rgb, desaturated, Desaturation * (displace.g -0.5)* 2);\r",
          "    return c;    \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": "Image",
      "MetaInstanceID": "2cdaa4fd-1a2c-4b79-af94-da9f45d240af",
      "DefaultValue": {
        "Type": "Image",
        "Value": "Framefield.Core.Image"
      },
      "MetaID": "9848060d-fd84-45b0-b658-d0d531c61dab",
      "IsMultiInput": "False",
      "Relevance": "Required",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "DisplaceMap",
      "MetaInstanceID": "d8a96f8e-b95e-49f0-9645-315c01ac294d",
      "DefaultValue": {
        "Type": "Image",
        "Value": "Framefield.Core.Image"
      },
      "MetaID": "9848060d-fd84-45b0-b658-d0d531c61dab",
      "IsMultiInput": "False",
      "Relevance": "Required",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Displace.X",
      "MetaInstanceID": "1118d750-92c7-49a8-bb14-1014601d55c7",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Displace.Y",
      "MetaInstanceID": "95e65ae8-c49c-48f2-b9d4-dc84ea68902c",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Offset.X",
      "MetaInstanceID": "f12e46ca-41f9-4a7a-9331-37c5e70a5c32",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Offset.Y",
      "MetaInstanceID": "a1431995-3d3c-41e9-8db3-05b7e2e4ebfa",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Desaturation",
      "MetaInstanceID": "185d9025-454f-48f6-8745-debb70ef27bc",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "RGBSplitAmount",
      "MetaInstanceID": "2dec321f-fe2a-4993-9489-621759ad4fee",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Brightness",
      "MetaInstanceID": "c18a9d73-92aa-48cd-8adc-80f1c6a4a43a",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Contrast",
      "MetaInstanceID": "0ff2d40a-d782-4ad4-b608-938e81a363e0",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Noise",
      "MetaInstanceID": "8d295c54-8392-48e0-aaf1-2ca6435267b7",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "Time",
      "MetaInstanceID": "b3e26575-a961-4cba-9409-0c7bd09d1c93",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "NoiseScale.X",
      "MetaInstanceID": "69447dd7-1e33-4817-bc37-9e4532461945",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-1000000",
      "Max": "1000000",
      "Scale": "10",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "NoiseScale.Y",
      "MetaInstanceID": "5bcf2262-1f01-473c-b218-cdf778535282",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-1000000",
      "Max": "1000000",
      "Scale": "10",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "RollDisplacement.X",
      "MetaInstanceID": "dfaa9ebf-c16f-4c70-bfee-00e91c551ab5",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "RollDisplacement.Y",
      "MetaInstanceID": "00540c04-d19c-4b8d-92f8-e8a2ed552b7f",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-10000",
      "Max": "10000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "HorizontalSlice.Width",
      "MetaInstanceID": "907ac97e-d711-43be-b01e-a5826b68acb8",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0.005999984"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "HorizontalSlice.Position",
      "MetaInstanceID": "ae8b1f99-c2df-4cb3-9d93-e6112f85ac18",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "VerticalSlice.Size",
      "MetaInstanceID": "adc85595-3f02-42d8-a501-8ea22b5c0260",
      "DefaultValue": {
        "Type": "Float",
        "Value": "1"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "VerticalSlice.Position",
      "MetaInstanceID": "4f9faae1-b194-448d-bb2b-995c3d2ed1fb",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.01",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "NoiseTexture",
      "MetaInstanceID": "4765b763-3d84-49ca-b6da-a58d351e1423",
      "DefaultValue": {
        "Type": "Image",
        "Value": "Framefield.Core.Image"
      },
      "MetaID": "9848060d-fd84-45b0-b658-d0d531c61dab",
      "IsMultiInput": "False",
      "Relevance": "Required",
      "Description": "",
      "Min": "-100000",
      "Max": "100000",
      "Scale": "0.1",
      "ScaleType": "Linear",
      "EnumValues": []
    },
    {
      "Name": "OverallAmount",
      "MetaInstanceID": "b7409d81-4057-4e4c-9161-67f8c5d3989c",
      "DefaultValue": {
        "Type": "Float",
        "Value": "0"
      },
      "MetaID": "3f76dee3-3897-44ac-82d6-25ce9f53a506",
      "IsMultiInput": "False",
      "Relevance": "Optional",
      "Description": "",
      "Min": "0",
      "Max": "10000",
      "Scale": "0.001",
      "ScaleType": "Linear",
      "EnumValues": []
    }
  ],
  "Outputs": [
    {
      "Name": "Image",
      "MetaInstanceID": "2bab591e-4b0a-494a-9951-1bd6e4f6d440",
      "MetaID": "9848060d-fd84-45b0-b658-d0d531c61dab"
    }
  ],
  "OperatorParts": [
    {
      "MetaInstanceID": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a",
      "MetaID": "c3c27902-a399-4dca-a530-26b07de94a98",
      "Name": "BrokenTVFunc",
      "Version": "d8169d60-901a-4a14-a389-b8a9c4e7a1ca",
      "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.IDc3c27902_a399_4dca_a530_26b07de94a98",
        "{",
        "    public class Class_BrokenTV : FXImageFunction",
        "    {",
        "        //>>> _inputids",
        "        private enum InputId",
        "        {",
        "            Code = 0,",
        "            Image = 1,",
        "            DisplaceMap = 2,",
        "            DisplaceX = 3,",
        "            DisplaceY = 4,",
        "            OffsetX = 5,",
        "            OffsetY = 6,",
        "            Desaturation = 7,",
        "            RGBSplitAmount = 8,",
        "            Brightness = 9,",
        "            Contrast = 10,",
        "            Noise = 11,",
        "            Time = 12,",
        "            NoiseScaleX = 13,",
        "            NoiseScaleY = 14,",
        "            RollDisplacementX = 15,",
        "            RollDisplacementY = 16,",
        "            HorizontalSliceWidth = 17,",
        "            HorizontalSlicePosition = 18,",
        "            VerticalSliceSize = 19,",
        "            VerticalSlicePosition = 20,",
        "            NoiseTexture = 21,",
        "            OverallAmount = 22",
        "        }",
        "        //<<< _inputids",
        "        public override OperatorPartContext Eval(OperatorPartContext context, List<OperatorPart> inputs, int outputIdx) {",
        "",
        "            //>>> _params",
        "            var Code = inputs[(int)InputId.Code].Eval(context).Text;",
        "            var Image = inputs[(int)InputId.Image].Eval(context).Image; // Needs to be checked for null!",
        "            var DisplaceMap = inputs[(int)InputId.DisplaceMap].Eval(context).Image; // Needs to be checked for null!",
        "            var DisplaceX = inputs[(int)InputId.DisplaceX].Eval(context).Value;",
        "            var DisplaceY = inputs[(int)InputId.DisplaceY].Eval(context).Value;",
        "            var Displace = new Vector2(DisplaceX, DisplaceY);",
        "            var OffsetX = inputs[(int)InputId.OffsetX].Eval(context).Value;",
        "            var OffsetY = inputs[(int)InputId.OffsetY].Eval(context).Value;",
        "            var Offset = new Vector2(OffsetX, OffsetY);",
        "            var Desaturation = inputs[(int)InputId.Desaturation].Eval(context).Value;",
        "            var RGBSplitAmount = inputs[(int)InputId.RGBSplitAmount].Eval(context).Value;",
        "            var Brightness = inputs[(int)InputId.Brightness].Eval(context).Value;",
        "            var Contrast = inputs[(int)InputId.Contrast].Eval(context).Value;",
        "            var Noise = inputs[(int)InputId.Noise].Eval(context).Value;",
        "            var Time = inputs[(int)InputId.Time].Eval(context).Value;",
        "            var NoiseScaleX = inputs[(int)InputId.NoiseScaleX].Eval(context).Value;",
        "            var NoiseScaleY = inputs[(int)InputId.NoiseScaleY].Eval(context).Value;",
        "            var NoiseScale = new Vector2(NoiseScaleX, NoiseScaleY);",
        "            var RollDisplacementX = inputs[(int)InputId.RollDisplacementX].Eval(context).Value;",
        "            var RollDisplacementY = inputs[(int)InputId.RollDisplacementY].Eval(context).Value;",
        "            var RollDisplacement = new Vector2(RollDisplacementX, RollDisplacementY);",
        "            var HorizontalSliceWidth = inputs[(int)InputId.HorizontalSliceWidth].Eval(context).Value;",
        "            var HorizontalSlicePosition = inputs[(int)InputId.HorizontalSlicePosition].Eval(context).Value;",
        "            var HorizontalSlice = new Vector2(HorizontalSliceWidth, HorizontalSlicePosition);",
        "            var VerticalSliceSize = inputs[(int)InputId.VerticalSliceSize].Eval(context).Value;",
        "            var VerticalSlicePosition = inputs[(int)InputId.VerticalSlicePosition].Eval(context).Value;",
        "            var VerticalSlice = new Vector2(VerticalSliceSize, VerticalSlicePosition);",
        "            var NoiseTexture = inputs[(int)InputId.NoiseTexture].Eval(context).Image; // Needs to be checked for null!",
        "            var OverallAmount = inputs[(int)InputId.OverallAmount].Eval(context).Value;",
        "            //<<< _params",
        "",
        "            return PrepareAndEvalOnChange(context, () => {",
        "                ClearRenderTarget(context, new SharpDX.Color4(0, 0, 0, 0));",
        "                ",
        "                DisplaceX = Utilities.Lerp(0, DisplaceX, OverallAmount);",
        "                DisplaceY = Utilities.Lerp(0, DisplaceY, OverallAmount);",
        "                ",
        "                Noise = Utilities.Lerp(0, Noise, OverallAmount);",
        "                Desaturation = Utilities.Lerp(0, Desaturation, OverallAmount);",
        "                Brightness = Utilities.Lerp(0, Brightness, OverallAmount);",
        "                Contrast = Utilities.Lerp(0, Contrast, OverallAmount);",
        "                RGBSplitAmount  = Utilities.Lerp(0, RGBSplitAmount, OverallAmount);",
        "",
        "                //>>> _setup",
        "                using (var ImageView = new ShaderResourceView(context.D3DDevice, Image))",
        "                using (var DisplaceMapView = new ShaderResourceView(context.D3DDevice, DisplaceMap))",
        "                using (var NoiseTextureView = new ShaderResourceView(context.D3DDevice, NoiseTexture))",
        "                {",
        "                    _effect.GetVariableByName(\"RenderTargetSize\").AsVector().Set(new Vector2(_usedViewport.Width, _usedViewport.Height));",
        "                    _effect.GetVariableByName(\"Image\").AsShaderResource().SetResource(ImageView);",
        "                    _effect.GetVariableByName(\"DisplaceMap\").AsShaderResource().SetResource(DisplaceMapView);",
        "                    _effect.GetVariableByName(\"Displace\").AsVector().Set(new Vector2(DisplaceX, DisplaceY));",
        "                    _effect.GetVariableByName(\"Offset\").AsVector().Set(new Vector2(OffsetX, OffsetY));",
        "                    _effect.GetVariableByName(\"Desaturation\").AsScalar().Set(Desaturation);",
        "                    _effect.GetVariableByName(\"RGBSplitAmount\").AsScalar().Set(RGBSplitAmount);",
        "                    _effect.GetVariableByName(\"Brightness\").AsScalar().Set(Brightness);",
        "                    _effect.GetVariableByName(\"Contrast\").AsScalar().Set(Contrast);",
        "                    _effect.GetVariableByName(\"Noise\").AsScalar().Set(Noise);",
        "                    _effect.GetVariableByName(\"Time\").AsScalar().Set(Time);",
        "                    _effect.GetVariableByName(\"NoiseScale\").AsVector().Set(new Vector2(NoiseScaleX, NoiseScaleY));",
        "                    _effect.GetVariableByName(\"RollDisplacement\").AsVector().Set(new Vector2(RollDisplacementX, RollDisplacementY));",
        "                    _effect.GetVariableByName(\"HorizontalSlice\").AsVector().Set(new Vector2(HorizontalSliceWidth, HorizontalSlicePosition));",
        "                    _effect.GetVariableByName(\"VerticalSlice\").AsVector().Set(new Vector2(VerticalSliceSize, VerticalSlicePosition));",
        "                    _effect.GetVariableByName(\"NoiseTexture\").AsShaderResource().SetResource(NoiseTextureView);",
        "                    _effect.GetVariableByName(\"OverallAmount\").AsScalar().Set(OverallAmount);",
        "                //<<< _setup",
        "",
        "                Render(context);",
        "",
        "                //>>> _cleanup",
        "                }",
        "                //<<< _cleanup",
        "            });",
        "        }",
        "",
        "    }",
        "}",
        "",
        ""
      ],
      "AdditionalAssemblies": []
    }
  ],
  "Operators": [],
  "Connections": [
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "2bab591e-4b0a-494a-9951-1bd6e4f6d440"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "f689c14c-1ea1-4b0f-bf31-0ea6a035c7c5",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "2cdaa4fd-1a2c-4b79-af94-da9f45d240af",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "d8a96f8e-b95e-49f0-9645-315c01ac294d",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "1118d750-92c7-49a8-bb14-1014601d55c7",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "95e65ae8-c49c-48f2-b9d4-dc84ea68902c",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "f12e46ca-41f9-4a7a-9331-37c5e70a5c32",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "a1431995-3d3c-41e9-8db3-05b7e2e4ebfa",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "185d9025-454f-48f6-8745-debb70ef27bc",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "2dec321f-fe2a-4993-9489-621759ad4fee",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "c18a9d73-92aa-48cd-8adc-80f1c6a4a43a",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "0ff2d40a-d782-4ad4-b608-938e81a363e0",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "8d295c54-8392-48e0-aaf1-2ca6435267b7",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "b3e26575-a961-4cba-9409-0c7bd09d1c93",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "69447dd7-1e33-4817-bc37-9e4532461945",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "5bcf2262-1f01-473c-b218-cdf778535282",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "dfaa9ebf-c16f-4c70-bfee-00e91c551ab5",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "00540c04-d19c-4b8d-92f8-e8a2ed552b7f",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "907ac97e-d711-43be-b01e-a5826b68acb8",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "ae8b1f99-c2df-4cb3-9d93-e6112f85ac18",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "adc85595-3f02-42d8-a501-8ea22b5c0260",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "4f9faae1-b194-448d-bb2b-995c3d2ed1fb",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "4765b763-3d84-49ca-b6da-a58d351e1423",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    },
    {
      "SourceOp": "00000000-0000-0000-0000-000000000000",
      "SourceOpPart": "b7409d81-4057-4e4c-9161-67f8c5d3989c",
      "TargetOp": "00000000-0000-0000-0000-000000000000",
      "TargetOpPart": "12d99f0c-025b-4ad3-b1f5-5023d2113e8a"
    }
  ]
}