예제 #1
0
 public override void Initialize()
 {
     base.Initialize("Vector Rotation");
     base.PrepareArithmetic(2, ValueType.VTv3);
     base.shaderGenMode = ShaderGenerationMode.SimpleFunction;
     connectors         = new SF_NodeConnector[] {
         SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv3, false),
         SF_NodeConnector.Create(this, "A", "N", ConType.cInput, ValueType.VTv3, false).SetRequired(true),
         SF_NodeConnector.Create(this, "B", "A", ConType.cInput, ValueType.VTv3, false).SetRequired(true),
     };
 }
예제 #2
0
 public override void Initialize()
 {
     base.Initialize("View Dir.", 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)
     };
 }
예제 #3
0
        public override void Initialize()
        {
            base.Initialize("Time", InitialPreviewRenderMode.BlitQuad);
            base.showColor = true;
            base.UseLowerPropertyBox(false);
            base.texture.uniform   = false;
            base.texture.CompCount = 4;

            base.alwaysDefineVariable = true;
            base.shaderGenMode        = ShaderGenerationMode.OffUniform;

            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "TSL", "t/20", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.R),
                SF_NodeConnector.Create(this, "T", "t", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.G),
                SF_NodeConnector.Create(this, "TDB", "t*2", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.B),
                SF_NodeConnector.Create(this, "TTR", "t*3", ConType.cOutput, ValueType.VTv1, false).Outputting(OutChannel.A)
            };
        }
예제 #4
0
        public override void Initialize()
        {
            base.shaderGenMode = ShaderGenerationMode.ManualModal;
            base.Initialize("Fresnel", InitialPreviewRenderMode.BlitSphere);
            base.showColor = true;
            base.UseLowerPropertyBox(false);
            base.texture.CompCount = 1;
            base.vectorDataNode    = true;


            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "OUT", "", ConType.cOutput, ValueType.VTv1, false),
                SF_NodeConnector.Create(this, "NRM", "Nrm", ConType.cInput, ValueType.VTv3, false),
                SF_NodeConnector.Create(this, "EXP", "Exp", ConType.cInput, ValueType.VTv1, false)
            };

            this["NRM"].unconnectedEvaluationValue = "normalDirection";
        }
예제 #5
0
        public override void Initialize()
        {
            base.Initialize("Parallax");
            base.showColor     = true;
            base.shaderGenMode = ShaderGenerationMode.ManualModal;
            UseLowerReadonlyValues(false);
            texture.CompCount = 2;
            //SF_NodeConnection lerpCon;
            connectors = new SF_NodeConnector[] {
                SF_NodeConnector.Create(this, "UVOUT", "UV", ConType.cOutput, ValueType.VTv2, false).Outputting(OutChannel.RG),
                SF_NodeConnector.Create(this, "UVIN", "UV", ConType.cInput, ValueType.VTv2, false).SetGhostNodeLink(typeof(SFN_TexCoord), "UVOUT"),
                SF_NodeConnector.Create(this, "HEI", "Hei", ConType.cInput, ValueType.VTv1, false).SetRequired(true),
                SF_NodeConnector.Create(this, "DEP", "Dep", ConType.cInput, ValueType.VTv1, false),
                SF_NodeConnector.Create(this, "REF", "Ref", ConType.cInput, ValueType.VTv1, false)
            };

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