Exemplo n.º 1
0
        public override void Initialize()
        {
            base.Initialize("Comp. Mask");
            base.SearchName    = "ComponentMask";
            base.showColor     = true;
            base.shaderGenMode = ShaderGenerationMode.Modal;
            UseLowerReadonlyValues(true);
            UseLowerPropertyBox(true, true);
            SFN_ComponentMask.outputChanColors[3] = SF_NodeConnector.colorEnabledDefault;


            popupStyle           = new GUIStyle(EditorStyles.miniButton);
            popupStyle.alignment = TextAnchor.MiddleCenter;
            popupStyle.fontSize  = 12;
            popupStyle.fontStyle = FontStyle.Bold;

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "-", ConType.cOutput, ValueType.VTvPending, false).Outputting(OutChannel.All),
                SF_NodeConnector.Create(this, "IN", "In", ConType.cInput, ValueType.VTvPending, false).SetRequired(true),
                SF_NodeConnector.Create(this, "R", "R", ConType.cOutput, ValueType.VTv1).WithColor(Color.red).Outputting(OutChannel.R),
                SF_NodeConnector.Create(this, "G", "G", ConType.cOutput, ValueType.VTv1).WithColor(Color.green).Outputting(OutChannel.G),
                SF_NodeConnector.Create(this, "B", "B", ConType.cOutput, ValueType.VTv1).WithColor(Color.blue).Outputting(OutChannel.B),
                SF_NodeConnector.Create(this, "A", "A", ConType.cOutput, ValueType.VTv1).Outputting(OutChannel.A)
            };
            outCompCount = 1;
            UpdateOutput();
        }
Exemplo n.º 2
0
        public override void Initialize()
        {
            base.Initialize("Texture 2D");
            //node_height = (int)(rect.height - 6f); // Odd, but alright...
            base.UseLowerPropertyBox(true, true);


            property = ScriptableObject.CreateInstance <SFP_Tex2d>().Initialize(this);


            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "UVIN", "UV", ConType.cInput, ValueType.VTv2).SetGhostNodeLink(typeof(SFN_TexCoord), "UVOUT"),
                SF_NodeConnector.Create(this, "MIP", "MIP", ConType.cInput, ValueType.VTv1),
                SF_NodeConnector.Create(this, "TEX", "Tex", ConType.cInput, ValueType.TexAsset).WithColor(SF_Node.colorExposed),
                SF_NodeConnector.Create(this, "RGB", "RGB", ConType.cOutput, ValueType.VTv3).Outputting(OutChannel.RGB),
                SF_NodeConnector.Create(this, "R", "R", ConType.cOutput, ValueType.VTv1).WithColor(Color.red).Outputting(OutChannel.R),
                SF_NodeConnector.Create(this, "G", "G", ConType.cOutput, ValueType.VTv1).WithColor(Color.green).Outputting(OutChannel.G),
                SF_NodeConnector.Create(this, "B", "B", ConType.cOutput, ValueType.VTv1).WithColor(Color.blue).Outputting(OutChannel.B),
                SF_NodeConnector.Create(this, "A", "A", ConType.cOutput, ValueType.VTv1).Outputting(OutChannel.A)
            };
            base.alwaysDefineVariable = true;
            base.neverDefineVariable  = false;
            base.texture.CompCount    = 4;
            connectors[0].usageCount  = 2;            // To define a variable of UVs to use with TRANSFORM_TEX
        }
Exemplo n.º 3
0
        public override void Initialize()
        {
            node_height = 20;
            node_width  = 120;
            base.Initialize("Get");
            lowerRect.y       -= 8;
            lowerRect.height   = 28;
            base.showColor     = false;
            base.discreteTitle = true;
            base.UseLowerPropertyBox(true, true);
            base.shaderGenMode      = ShaderGenerationMode.CustomFunction;
            base.lockedVariableName = false;
            extraWidthInput         = -9;
            extraWidthOutput        = -9;
            //base.texture.uniform = true;
            //base.texture.CompCount = 1;

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTvPending, false),
                SF_NodeConnector.Create(this, "IN", "", ConType.cInput, ValueType.VTvPending, false).SetRequired(true),
            };

            connectors[1].enableState = EnableState.Hidden;

            base.conGroup = ScriptableObject.CreateInstance <SFNCG_Arithmetic>().Initialize(connectors[0], connectors[1]);

            editor.nodeView.RefreshRelaySources();
        }
Exemplo n.º 4
0
        public override void Initialize()
        {
            base.Initialize("virtual lights diffuse");

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv3, false),
            };
        }
Exemplo n.º 5
0
        public override void Initialize()
        {
            base.Initialize("Rich shadow");

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv4, false),
                SF_NodeConnector.Create(this, "IN", "", ConType.cInput, ValueType.VTv3, false),
            };
        }
Exemplo n.º 6
0
 public override void Initialize()
 {
     base.Initialize("Depth Blend");
     base.showColor = true;
     base.UseLowerPropertyBox(false);
     base.texture.CompCount = 1;
     connectors             = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv1),
         SF_NodeConnector.Create(this, "DIST", "Dist", ConType.cInput, ValueType.VTv1),
     };
 }
Exemplo n.º 7
0
        public override void Initialize()
        {
            base.Initialize(" LightColor0 x Intensity0 rich5");
            base.showColor     = true;
            base.shaderGenMode = ShaderGenerationMode.CustomFunction;
            UseLowerReadonlyValues(true);

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv3, false)
            };
        }
 public override void Initialize()
 {
     base.Initialize("View Refl.", InitialPreviewRenderMode.BlitSphere);
     base.showColor = true;
     base.UseLowerPropertyBox(false);
     base.texture.CompCount   = 3;
     base.neverDefineVariable = true;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv3, false)
     };
 }
Exemplo n.º 9
0
 public override void Initialize()
 {
     node_height = 58;
     base.Initialize("Transpose");
     base.showColor = false;
     base.UseLowerPropertyBox(false, true);
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTm4x4, false),
         SF_NodeConnector.Create(this, "IN", "", ConType.cInput, ValueType.VTm4x4, false).SetRequired(true)
     };
 }
Exemplo n.º 10
0
 public override void Initialize()
 {
     base.Initialize("Hue");
     base.showColor     = true;
     base.shaderGenMode = ShaderGenerationMode.CustomFunction;
     UseLowerReadonlyValues(true);
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv3, false),
         SF_NodeConnector.Create(this, "IN", "", ConType.cInput, ValueType.VTv1, false).SetRequired(true)
     };
 }
Exemplo n.º 11
0
        public SFN_Final Initialize(SF_Editor editor)
        {
            base.Initialize("Main");
            this.editor    = editor;
            base.showColor = true;
            AssignID();
            base.nodeName = "Main";
            Vector2 pos = new Vector2(32768, 32768);

            base.rect = new Rect(pos.x - NODE_WIDTH / 2, pos.y - NODE_HEIGHT / 2, NODE_WIDTH * 1.7f, 400 + 20f * 2);

            this.connectors = new SF_NodeConnector[] {
                // SURFACE
                diffuse      = SF_NodeConnector.Create(this, "diff", "Diffuse", ConType.cInput, ValueType.VTvPending, true, "float3(0,0,0)").Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3),
                diffusePower = SF_NodeConnector.Create(this, "diffpow", "Diffuse Power", ConType.cInput, ValueType.VTvPending, true, "1").Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).DisplayLockIfDeferredPrePassIsOn(),
                specular     = SF_NodeConnector.Create(this, "spec", "Specular", ConType.cInput, ValueType.VTvPending, true).Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3),
                gloss        = SF_NodeConnector.Create(this, "gloss", "Gloss", ConType.cInput, ValueType.VTv1, true, "0.5").Skip(PassType.ShadCast, PassType.Outline),
                normal       = SF_NodeConnector.Create(this, "normal", "Normal", ConType.cInput, ValueType.VTv3, true).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline),
                emissive     = SF_NodeConnector.Create(this, "emission", "Emission", ConType.cInput, ValueType.VTvPending, true, "float3(0,0,0)").Skip(PassType.ShadCast, PassType.Outline).TypecastTo(3),
                transmission = SF_NodeConnector.Create(this, "transm", "Transmission", ConType.cInput, ValueType.VTvPending, true).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(),
                lightWrap    = SF_NodeConnector.Create(this, "lwrap", "Light Wrapping", ConType.cInput, ValueType.VTvPending, true).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(),

                // LIGHTING
                ambientDiffuse    = SF_NodeConnector.Create(this, "amdfl", "Diffuse Ambient Light", ConType.cInput, ValueType.VTvPending, true, "float3(0,0,0)").Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(3),
                ambientSpecular   = SF_NodeConnector.Create(this, "amspl", "Specular Ambient Light", ConType.cInput, ValueType.VTvPending, true, "float3(0,0,0)").Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(3),
                diffuseOcclusion  = SF_NodeConnector.Create(this, "difocc", "Diffuse Ambient Occlusion", ConType.cInput, ValueType.VTv1, true, "1").Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(1),
                specularOcclusion = SF_NodeConnector.Create(this, "spcocc", "Specular Ambient Occlusion", ConType.cInput, ValueType.VTv1, true, "1").Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.Outline).TypecastTo(1),
                customLighting    = SF_NodeConnector.Create(this, "custl", "Custom Lighting", ConType.cInput, ValueType.VTvPending, true).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(),

                // TRANSPARENCY
                alpha      = SF_NodeConnector.Create(this, "alpha", "Opacity", ConType.cInput, ValueType.VTv1, true, "1").Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).DisplayLockIfDeferredPrePassIsOn(),
                alphaClip  = SF_NodeConnector.Create(this, "clip", "Opacity Clip", ConType.cInput, ValueType.VTv1, true).Skip(PassType.Meta),
                refraction = SF_NodeConnector.Create(this, "refract", "Refraction", ConType.cInput, ValueType.VTv2, true).Skip(PassType.Meta, PassType.ShadCast, PassType.Outline).TypecastTo(2).DisplayLockIfDeferredPrePassIsOn(),

                // DEFORMERS
                outlineWidth = SF_NodeConnector.Create(this, "olwid", "Outline Width", ConType.cInput, ValueType.VTv1, true).Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.FwdBase).DisplayLockIfDeferredPrePassIsOn(),
                outlineColor = SF_NodeConnector.Create(this, "olcol", "Outline Color", ConType.cInput, ValueType.VTvPending, true, "float3(0,0,0)").Skip(PassType.Meta, PassType.ShadCast, PassType.FwdAdd, PassType.FwdBase).TypecastTo(3).DisplayLockIfDeferredPrePassIsOn(),
                vertexOffset = SF_NodeConnector.Create(this, "voffset", "Vertex Offset", ConType.cInput, ValueType.VTvPending, true).ForceBlock(ShaderProgram.Vert).TypecastTo(3),
                displacement = SF_NodeConnector.Create(this, "disp", "Displacement", ConType.cInput, ValueType.VTv3, true).ForceBlock(ShaderProgram.Vert).TypecastTo(3),
                tessellation = SF_NodeConnector.Create(this, "tess", "Tessellation", ConType.cInput, ValueType.VTv1, true).ForceBlock(ShaderProgram.Vert),

                ///-----------------------------------------
                Rich5Output = SF_NodeConnector.Create(this, "rich5 out", "rich5 out", ConType.cInput, ValueType.VTvPending, true, "float4(0,0,0,0)").Skip(PassType.ShadCast, PassType.Outline).TypecastTo(0)
            };

            //distortion.enableState = EnableState.Disabled;
            //customLighting.enableState = EnableState.Disabled;
            //cusomLightingDiffuse.enableState = EnableState.Disabled;
            //anisotropicDirection.enableState = EnableState.Disabled;


            return(this);
        }
Exemplo n.º 12
0
        public override void Initialize()
        {
            base.Initialize("Rich Split");

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "UV", ConType.cOutput, ValueType.VTv2, false),
                SF_NodeConnector.Create(this, "HorCount", "HorCount", ConType.cInput, ValueType.VTv1, false),
                SF_NodeConnector.Create(this, "VerCount", "VerCount", ConType.cInput, ValueType.VTv1, false),
                SF_NodeConnector.Create(this, "UV", "UV", ConType.cInput, ValueType.VTv2, false),
                SF_NodeConnector.Create(this, "Index", "Index", ConType.cInput, ValueType.VTv1, false),
            };
        }
Exemplo n.º 13
0
 public override void Initialize()
 {
     base.Initialize("Noise");
     base.UseLowerPropertyBox(false);
     base.showColor            = true;
     base.alwaysDefineVariable = true;
     base.shaderGenMode        = ShaderGenerationMode.CustomFunction;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "Rnd", ConType.cOutput, ValueType.VTv1, false),
         SF_NodeConnector.Create(this, "XY", "XY", ConType.cInput, ValueType.VTv2, false).SetRequired(false).TypecastTo(2).WithUseCount(3).SetGhostNodeLink(typeof(SFN_TexCoord), "UVOUT")
     };
 }
Exemplo n.º 14
0
        public override void Initialize()
        {
            base.Initialize("Rich _Main_ST");

            //base.property = ScriptableObject.CreateInstance<SFP_MainSTProperty>().Initialize(this);

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv4, false),
                SF_NodeConnector.Create(this, "xy", "xy", ConType.cOutput, ValueType.VTv2).Outputting(OutChannel.RG),
                SF_NodeConnector.Create(this, "z", "z", ConType.cOutput, ValueType.VTv2).Outputting(OutChannel.B),
                SF_NodeConnector.Create(this, "w", "w", ConType.cOutput, ValueType.VTv2).Outputting(OutChannel.A),
            };
        }
Exemplo n.º 15
0
        public override void Initialize()
        {
            base.Initialize("LightProbe");
            base.PrepareArithmetic(1);
            base.shaderGenMode = ShaderGenerationMode.SimpleFunction;
            UseLowerReadonlyValues(true);

            connectors = new SF_NodeConnector[]
            {
                SF_NodeConnector.Create(this, "Out", "", ConType.cOutput, ValueType.VTv3, false),
                SF_NodeConnector.Create(this, "IN", "", ConType.cInput, ValueType.VTv3, false).SetRequired(true)
            };
        }
Exemplo n.º 16
0
 public override void Initialize()
 {
     base.Initialize("channel R");
     base.showColor = true;
     UseLowerReadonlyValues(true);
     connectors = new SF_NodeConnector[] {
         SF_NodeConnectorStaticOutPut.CreateC(this, "OUT", "", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.R),
         SF_NodeConnector.Create(this, "IN", "", ConType.cInput, ValueType.VTv1v4, false).SetRequired(true)
     };
     //connectors [0].lockDefaultType = true;
     base.conGroup      = ScriptableObject.CreateInstance <SFNCG_Arithmetic>().Initialize(connectors[0], connectors[1]);
     base.shaderGenMode = ShaderGenerationMode.SimpleFunction;
 }
Exemplo n.º 17
0
        public override void Initialize()
        {
            base.Initialize("ReflectionProbe");
            base.showColor = true;
            UseLowerReadonlyValues(true);

            connectors = new SF_NodeConnector[]
            {
                SF_NodeConnector.Create(this, "Out", "Out", ConType.cOutput, ValueType.VTv4, false),
                SF_NodeConnector.Create(this, "VR", "VR", ConType.cInput, ValueType.VTv3, false),
                SF_NodeConnector.Create(this, "Mip", "Mip", ConType.cInput, ValueType.VTv1, false)
            };
        }
Exemplo n.º 18
0
 public override void Initialize()
 {
     base.Initialize("Panner");
     base.showColor = true;
     base.UseLowerPropertyBox(true, true);
     base.shaderGenMode = ShaderGenerationMode.Modal;
     texture.CompCount  = 2;
     connectors         = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "UVOUT", "UV", ConType.cOutput, ValueType.VTv2, false),
         SF_NodeConnector.Create(this, "UVIN", "UV", ConType.cInput, ValueType.VTv2, false).SetRequired(true) /*.SetGhostNodeLink(typeof(SFN_TexCoord),"UVOUT")*/,
         SF_NodeConnector.Create(this, "DIST", "Dist", ConType.cInput, ValueType.VTv1, false).SetRequired(false).SetGhostNodeLink(typeof(SFN_Time), "T")
     };
 }
Exemplo n.º 19
0
 public override void Initialize()
 {
     node_height = NODE_HEIGHT;
     base.Initialize("Matrix 4x4");
     base.showColor = false;
     base.UseLowerPropertyBox(false);
     base.texture.uniform       = true;
     base.texture.CompCount     = 4;
     base.canAlwaysSetPrecision = true;
     base.alwaysDefineVariable  = true;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTm4x4, false)
     };
 }
Exemplo n.º 20
0
 public override void Initialize()
 {
     base.Initialize("Screen Pos.", InitialPreviewRenderMode.BlitQuad);
     base.showColor = true;
     base.UseLowerPropertyBox(true, true);
     UpdateIcon();
     base.texture.CompCount   = 2;
     base.neverDefineVariable = true;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "UVOUT", "UV", ConType.cOutput, ValueType.VTv2, false).Outputting(OutChannel.RG),
         SF_NodeConnector.Create(this, "U", "U", ConType.cOutput, ValueType.VTv1).WithColor(Color.red).Outputting(OutChannel.R),
         SF_NodeConnector.Create(this, "V", "V", ConType.cOutput, ValueType.VTv1).WithColor(Color.green).Outputting(OutChannel.G)
     };
 }
Exemplo n.º 21
0
 public override void Initialize()
 {
     base.Initialize("Code");
     functionName   = "Function_node_" + base.id;
     base.minWidth  = (int)(NODE_WIDTH * 2.5f);
     base.minHeight = NODE_HEIGHT;
     base.ClampSize();
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "Out", ConType.cOutput, ValueType.VTvPending)
     };
     controlName = base.id + "_codeArea";
     connectors[0].CustomValueType = CustomValueType.Float3;
     //Debug.Log("Creating thing " + base.id);
 }
Exemplo n.º 22
0
 public override void Initialize()
 {
     base.Initialize("View Pos.", InitialPreviewRenderMode.BlitQuad);
     base.showColor = true;
     base.UseLowerPropertyBox(false);
     base.texture.CompCount   = 3;
     base.neverDefineVariable = true;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "XYZ", "XYZ", ConType.cOutput, ValueType.VTv3, false),
         SF_NodeConnector.Create(this, "X", "X", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.R).WithColor(Color.red),
         SF_NodeConnector.Create(this, "Y", "Y", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.G).WithColor(Color.green),
         SF_NodeConnector.Create(this, "Z", "Z", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.B).WithColor(Color.blue)
     };
 }
Exemplo n.º 23
0
 public override void Initialize()
 {
     base.Initialize("Posterize");
     base.showColor     = true;
     base.shaderGenMode = ShaderGenerationMode.CustomFunction;
     UseLowerReadonlyValues(true);
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTvPending, false),
         SF_NodeConnector.Create(this, "IN", "", ConType.cInput, ValueType.VTvPending, false).SetRequired(true),
         SF_NodeConnector.Create(this, "STPS", "Steps", ConType.cInput, ValueType.VTv1, false).SetRequired(true).WithUseCount(2)
     };
     base.conGroup        = ScriptableObject.CreateInstance <SFNCG_Arithmetic>().Initialize(connectors[0], connectors[1]);
     base.extraWidthInput = 6;
 }
Exemplo n.º 24
0
 public override void Initialize()
 {
     base.Initialize("Pixel Size");
     base.SearchName = "Pixel Size";
     base.showColor  = true;
     base.UseLowerPropertyBox(false);
     base.texture.CompCount = 2;
     connectors             = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "PXWH", "XY", ConType.cOutput, ValueType.VTv2, false).Outputting(OutChannel.RG),
         SF_NodeConnector.Create(this, "PXW", "X", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.R).WithColor(Color.red),
         SF_NodeConnector.Create(this, "PXH", "Y", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.G).WithColor(Color.green)
     };
     //base.extraWidthOutput = 12;
 }
Exemplo n.º 25
0
 public override void Initialize()
 {
     base.Initialize("Face Sign", InitialPreviewRenderMode.BlitQuad);
     base.showColor = true;
     base.UseLowerPropertyBox(true, true);
     UpdateIcon();
     base.texture.CompCount   = 1;
     base.neverDefineVariable = true;
     base.shaderGenMode       = ShaderGenerationMode.Manual;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "VFACE", "", ConType.cOutput, ValueType.VTv1, false)
     };
     texture.dataUniform = Color.white;
 }
Exemplo n.º 26
0
 public override void Initialize()
 {
     perturbed = false;
     base.Initialize("Normal Dir.", InitialPreviewRenderMode.BlitSphere);
     base.showColor = true;
     base.UseLowerPropertyBox(true, true);
     //UpdateIcon();
     base.texture.CompCount   = 3;
     base.neverDefineVariable = true;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv3, false)
     };
     base.lockedVariableName = true;
 }
Exemplo n.º 27
0
        public override void Initialize()
        {
            base.Initialize("Blend Over");
            base.showColor = true;
            base.UseLowerPropertyBox(true, true);
            alwaysDefineVariable = true;

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv4, false),
                SF_NodeConnector.Create(this, "OUT_RGB", "RGB", ConType.cOutput, ValueType.VTv3, false).Outputting(OutChannel.RGB),
                SF_NodeConnector.Create(this, "OUT_A", "A", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.A),
                SF_NodeConnector.Create(this, "SRC", "Top", ConType.cInput, ValueType.VTv4, false).WithUseCount(2).SetRequired(true),
                SF_NodeConnector.Create(this, "DST", "Btm", ConType.cInput, ValueType.VTv4, false).WithUseCount(2).SetRequired(true)
            };
        }
Exemplo n.º 28
0
 public override void Initialize()
 {
     base.Initialize("Scene Color");
     base.showColor = true;
     base.UseLowerPropertyBox(false);
     base.texture.CompCount = 4;
     connectors             = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "UVIN", "UV", ConType.cInput, ValueType.VTv2),
         SF_NodeConnector.Create(this, "RGB", "RGB", ConType.cOutput, ValueType.VTv3).Outputting(OutChannel.RGB),
         SF_NodeConnector.Create(this, "R", "R", ConType.cOutput, ValueType.VTv1).WithColor(Color.red).Outputting(OutChannel.R),
         SF_NodeConnector.Create(this, "G", "G", ConType.cOutput, ValueType.VTv1).WithColor(Color.green).Outputting(OutChannel.G),
         SF_NodeConnector.Create(this, "B", "B", ConType.cOutput, ValueType.VTv1).WithColor(Color.blue).Outputting(OutChannel.B),
         SF_NodeConnector.Create(this, "A", "A", ConType.cOutput, ValueType.VTv1).Outputting(OutChannel.A)
     };
 }
Exemplo n.º 29
0
        public override void Initialize()
        {
            base.Initialize("Power");
            base.showColor     = true;
            base.shaderGenMode = ShaderGenerationMode.CustomFunction;
            UseLowerReadonlyValues(true);

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTvPending, false),
                SF_NodeConnector.Create(this, "VAL", "Val", ConType.cInput, ValueType.VTvPending, false).SetRequired(true),
                SF_NodeConnector.Create(this, "EXP", "Exp", ConType.cInput, ValueType.VTvPending, false).SetRequired(true)
            };

            base.conGroup = ScriptableObject.CreateInstance <SFNCG_Arithmetic>().Initialize(connectors[0], connectors[1], connectors[2]);
        }
Exemplo n.º 30
0
 public override void Initialize()
 {
     node_height /= 2;
     base.Initialize("Vector 2");
     base.showColor = true;
     base.UseLowerPropertyBox(true);
     base.texture.uniform       = true;
     base.canAlwaysSetPrecision = true;
     base.texture.CompCount     = 2;
     base.shaderGenMode         = ShaderGenerationMode.OffUniform;
     lowerRect.width           /= 2;
     connectors = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv2, false)
     };
 }