Beispiel #1
0
        public void UpdateInputLabels()
        {
            string rgba = "RGBA";

            int conCount = 4;
            int cSub     = 0;

            for (int i = 0; i < conCount; i++)
            {
                SF_NodeConnector con = connectors[i + 1];
                if (GetInputIsConnected(con.strID))
                {
                    int cc = con.GetCompCount();
                    con.label = rgba.Substring(cSub, cc);
                    if (cc == 1)
                    {
                        con.color = channelColors[cSub];
                    }
                    cSub += cc;
                }
                else
                {
                    con.label = "";
                    con.color = SF_NodeConnector.colorEnabledDefault;
                    cSub++;
                }
            }
        }
Beispiel #2
0
        public bool HasNodeInput <T>(SF_NodeConnector con)
        {
            if (con.IsConnectedEnabledAndAvailable())
            {
                if (con.inputCon.node is T)
                {
                    return(true);
                }

                // Recursively loop through inputs of the connnected node
                foreach (SF_NodeConnector c in con.inputCon.node.connectors)
                {
                    if (c.conType == ConType.cOutput)
                    {
                        continue;
                    }
                    if (!c.IsConnected())
                    {
                        continue;
                    }
                    if (HasNodeInput <T>(c))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Beispiel #3
0
        public bool CanConnectTo(SF_NodeConnector other)
        {
            if (other == null)
            {
                return(false);
            }

            if (other.node == node)
            {
                return(false);                // Disallow connecting to self
            }
            if (other.conType == this.conType)
            {
                return(false);                // Disallow connecting same types (i <- i & o <- o)
            }
            if (conType == ConType.cOutput)   // Disallow connecting loops
            {
                if (node.IsDescendantOf(other.node))
                {
                    return(false);
                }
            }
            else
            {
                if (other.node.IsDescendantOf(node))
                {
                    return(false);
                }
            }

            return(true);
        }
Beispiel #4
0
        public override void DrawLowerPropertyBox()
        {
            Rect r = new Rect(lowerRect);

            r.yMin += 4;
            r.yMax -= 2;
            r.xMin += 2;
            Rect[] splitRects = r.SplitHorizontal(0.25f, 2);

            int selectedID = -1;

            if (connectors[1].inputCon != null)
            {
                selectedID = editor.nodeView.NodeIdToRelayId(connectors[1].inputCon.node.id);
            }

            EditorGUI.BeginChangeCheck();
            int newID = UndoableEnumPopupNamed(splitRects[1], selectedID, editor.nodeView.relayInNames, "select Get option");

            if (EditorGUI.EndChangeCheck())
            {
                // Changed input, let's hook it up!
                SF_NodeConnector con = editor.nodeView.relayInSources[newID].con;
                connectors[1].LinkTo(con);
            }


            Rect texCoords = new Rect(splitRects[0]);

            texCoords.width  /= 7;
            texCoords.height /= 3;
            texCoords.x       = texCoords.y = 0;
            GUI.DrawTextureWithTexCoords(splitRects[0], SF_GUI.Handle_drag, texCoords, alphaBlend: true);
        }
Beispiel #5
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();
        }
        void UpdateConnectorVisibility()
        {
            SF_NodeConnector z = GetConnectorByID("Z");
            SF_NodeConnector w = GetConnectorByID("W");

            if (!useAsFloat4)
            {
                if (z.IsConnected())
                {
                    for (int i = 0; i < z.outputCons.Count; i++)
                    {
                        Undo.RecordObject(z.outputCons[i], "disconnect");
                    }
                    Undo.RecordObject(z, "disconnect");
                    z.Disconnect();
                }
                if (w.IsConnected())
                {
                    for (int i = 0; i < w.outputCons.Count; i++)
                    {
                        Undo.RecordObject(w.outputCons[i], "disconnect");
                    }
                    Undo.RecordObject(w, "disconnect");
                    w.Disconnect();
                }
            }
            EnableState enableState = useAsFloat4 ? EnableState.Enabled : EnableState.Disabled;

            z.enableState = enableState;
            w.enableState = enableState;
        }
Beispiel #7
0
        public void UpdateUsageCount()
        {
            SF_NodeConnector src = GetConnectorByStringID("SRC");
            SF_NodeConnector dst = GetConnectorByStringID("DST");



            if (currentBlendMode == BlendMode.Overlay)
            {
                src.usageCount = 2;
                dst.usageCount = 3;
                return;
            }

            if (currentBlendMode == BlendMode.HardLight ||
                currentBlendMode == BlendMode.VividLight ||
                currentBlendMode == BlendMode.LinearLight ||
                currentBlendMode == BlendMode.PinLight)
            {
                src.usageCount = 3;
                dst.usageCount = 2;
                return;
            }



            src.usageCount = 1;
            dst.usageCount = 1;
        }
Beispiel #8
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
        }
        private void UpdateMaskCompCountInputs()
        {
            int cc = this["M"].GetCompCount();

            base.texture.CompCount = cc;

            bool summed = channelBlendType == ChannelBlendType.Summed;

            //int enableInputCount = summed ? 4 : 5;

            for (int i = 0; i < 4; i++)
            {
                SF_NodeConnector con = connectors[i + 2];

                //if(con.IsConnected() && con.inputCon.GetCompCount() != cc)
                //	connectors[i+2].Disconnect();

                bool use = i < cc;

                con.SetRequired(use);
                con.enableState = use ? EnableState.Enabled : EnableState.Disabled;

                // Disconnect if going hidden while connected, but not during load, as it might connect an unevaluated cc
                //if(!SF_Parser.quickLoad && !SF_Parser.settingUp){
                if (con.IsConnected() && con.enableState == EnableState.Disabled)
                {
                    //connectors[i+2].Disconnect();
                    //Debug.Log("Disconnecting thing due to things!");
                }
                //}
            }

            this["BTM"].SetRequired(!summed);
            this["BTM"].enableState = summed ? EnableState.Disabled : EnableState.Enabled;
        }
Beispiel #10
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();
        }
Beispiel #11
0
 public SF_NodeConnector SetVisChild(SF_NodeConnector child)          // Used to make enable-chains (Connecting B enables the C connector etc)
 {
     visControlChild        = child;
     child.visControlParent = this;
     child.enableState      = EnableState.Hidden;
     return(this);
 }
Beispiel #12
0
        public bool IsConnectionHovering(bool world = true)
        {
            bool active = enableState == EnableState.Enabled && availableState == AvailableState.Available;
            //bool free = !IsConnected();
            bool hoveringPending = SF_NodeConnector.IsConnecting() && Hovering(world) && !UnconnectableToPending();

            return(active && /*free &&*/ hoveringPending);
        }
        public override void Initialize()
        {
            base.Initialize("virtual lights diffuse");

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv3, false),
            };
        }
Beispiel #14
0
        public void StopCutting()
        {
            List <SF_NodeConnector> disconnectors = new List <SF_NodeConnector>();

            for (int i = 0; i < editor.nodes.Count; i++)
            {
                SF_Node n = editor.nodes[i];
                for (int j = 0; j < n.connectors.Length; j++)
                {
                    SF_NodeConnector con = n.connectors[j];
                    if (con.IsConnected() && con.conType == ConType.cInput)
                    {
                        if (con.conLine.aboutToBeDeleted)
                        {
                            disconnectors.Add(con);
                        }
                    }
                }
            }

            if (disconnectors.Count == 0)
            {
                isCutting = false;
                return;
            }

            UnmarkDeleteHighlights();

            //Undo.RecordObject((Object)con, "cut"
            string undoMsg = "cut ";

            if (disconnectors.Count > 1)
            {
                undoMsg += disconnectors.Count + " ";
                undoMsg += "connections";
            }
            else
            {
                undoMsg += "connection: ";
                undoMsg += disconnectors[0].node.nodeName;
                undoMsg += "[" + disconnectors[0].label + "]";
                undoMsg += " <--- ";
                undoMsg += "[" + disconnectors[0].inputCon.label + "]";
                undoMsg += disconnectors[0].inputCon.node.nodeName;
            } // = disconnectors.Count > 1 ? "cut "+disconnectors.Count+" connections" : "cut connection " + disconnectors[i].node.name + "[" +

            foreach (SF_NodeConnector con in disconnectors)
            {
                Undo.RecordObject(con, undoMsg);
            }

            foreach (SF_NodeConnector con in disconnectors)
            {
                con.Disconnect();
            }

            isCutting = false;
        }
Beispiel #15
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),
            };
        }
Beispiel #16
0
 public override void Initialize()
 {
     base.Initialize("Comment Box");
     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)
     };
 }
 public new SFNCG_ChannelBlend Initialize(SF_NodeConnector output, params SF_NodeConnector[] inputs)
 {
     SF_NodeConnector[] inputsWithoutFirst = new SF_NodeConnector[inputs.Length - 1];
     for (int i = 1; i < inputs.Length; i++)
     {
         inputsWithoutFirst[i - 1] = inputs[i];
     }
     base.Initialize(output, inputsWithoutFirst);
     return(this);
 }
Beispiel #18
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)
     };
 }
Beispiel #19
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("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),
     };
 }
        public static SF_ErrorEntry Create(string error, SF_NodeConnector target, bool isWarning)
        {
            SF_ErrorEntry entry = ScriptableObject.CreateInstance <SF_ErrorEntry>();

            entry.isWarning = isWarning;
            entry.con       = target;
            entry.node      = target.node;
            entry.error     = error;
            entry.InitializeRows();
            return(entry);
        }
 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)
     };
 }
Beispiel #23
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)
     };
 }
Beispiel #24
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),
            };
        }
Beispiel #25
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);
        }
Beispiel #26
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")
     };
 }
Beispiel #27
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),
            };
        }
        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)
            };
        }
Beispiel #29
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")
     };
 }
        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)
            };
        }