コード例 #1
0
        public void PushLayer()
        {
            var newLayer = new MaterialBlendLayerNode(this, Current);

            if (Current != null)
            {
                Current.Children.Add(newLayer);
            }
            Current = newLayer;
        }
コード例 #2
0
            public MaterialBlendLayerNode(MaterialGeneratorContext context, MaterialBlendLayerNode parentNode)
            {
                this.context    = context;
                this.parentNode = parentNode;

                Children      = new List <MaterialBlendLayerNode>();
                ShadingModels = new MaterialShadingModelCollection();

                foreach (MaterialShaderStage stage in Enum.GetValues(typeof(MaterialShaderStage)))
                {
                    SurfaceShaders[stage]     = new List <ShaderSource>();
                    StreamInitializers[stage] = new List <string>();
                    Streams[stage]            = new HashSet <string>();
                }
            }