コード例 #1
0
        public static Node CreateParameterNode(ShaderFragmentArchive.ParameterStruct parameter, String archiveName, ShaderFragmentArchive.Parameter.SourceType type)
        {
            var node = CreateEmptyParameterNode(type, archiveName, parameter.Name);

            foreach (var param in parameter.Parameters)
            {
                bool isOutput = type == ShaderFragmentArchive.Parameter.SourceType.Output;
                node.AddItem(new ShaderFragmentNodeItem(
                                 param.Name, param.Type, archiveName + ":" + param.Name,
                                 isOutput ? true : false, isOutput ? false : true));
            }
            return(node);
        }
コード例 #2
0
        public Node CreateParameterNode(ShaderFragmentArchive.ParameterStruct parameter, String archiveName, ParamSourceType type)
        {
            var node = CreateEmptyParameterNode(type, archiveName, (parameter != null) ? parameter.Name : VisibleName(archiveName));

            if (parameter != null)
            {
                foreach (var param in parameter.Parameters)
                {
                    bool isOutput = type == ParamSourceType.Output;
                    node.AddItem(new ShaderFragmentNodeItem(
                                     param.Name, param.Type, archiveName + ":" + param.Name,
                                     isOutput ? true : false, isOutput ? false : true));
                }
            }
            return(node);
        }