Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static SlicesNode Create()
        {
            var model = new SlicesModel();
            RenderMethodBuilder defaultBuilder, classificationBuilder;
            {
                var vs       = new VertexShader(defaultVert);
                var fs       = new FragmentShader(defaultFrag);
                var provider = new ShaderArray(vs, fs);
                var map      = new AttributeMap();
                map.Add("vVertex", SlicesModel.position);
                defaultBuilder = new RenderMethodBuilder(provider, map, new BlendState(BlendingSourceFactor.SourceAlpha, BlendingDestinationFactor.OneMinusSourceAlpha));
            }
            {
                var vs       = new VertexShader(classificationVert);
                var fs       = new FragmentShader(classificationFrag);
                var provider = new ShaderArray(vs, fs);
                var map      = new AttributeMap();
                map.Add("vVertex", SlicesModel.position);
                classificationBuilder = new RenderMethodBuilder(provider, map, new BlendState(BlendingSourceFactor.SourceAlpha, BlendingDestinationFactor.OneMinusSourceAlpha));
            }

            var node = new SlicesNode(model, defaultBuilder, classificationBuilder);

            node.Initialize();

            return(node);
        }
Пример #2
0
        private SceneNodeBase GetTree()
        {
            var node = SlicesNode.Create();

            return(node);
            //var group = new GroupNode();

            //return group;
        }