示例#1
0
        public static FullScreenNode Create(ITextureSource textureSource)
        {
            var model             = new FullScreenModel();
            var map               = new AttributeMap();
            var vs                = new VertexShader(secondPassVert);
            var fs                = new FragmentShader(secondPassFrag);
            var array             = new ShaderArray(vs, fs);
            var secondPassBuilder = new RenderMethodBuilder(array, map);
            var node              = new FullScreenNode(model, secondPassBuilder);

            node.textureSource = textureSource;
            node.Initialize();

            return(node);
        }
示例#2
0
        private SceneNodeBase GetRootElement()
        {
            int   lengthX = 50;
            int   lengthY = 40;
            int   lengthZ = 30;
            float scale   = 1.5f;
            var   model   = new ManyCubesModel((int)(lengthX * scale), (int)(lengthY * scale), (int)(lengthZ * scale));

            var manyCubesNode       = ManyCubesNode.Create(model);
            var deferredShadingNode = new DeferredShadingNode();

            deferredShadingNode.Children.Add(manyCubesNode);
            var fullScreenNode = FullScreenNode.Create(deferredShadingNode as ITextureSource);
            var groupNode      = new GroupNode(deferredShadingNode, fullScreenNode);

            this.deferredShadingNode = groupNode;

            var manyCubesNode0 = ManyCubesNode0.Create(model);

            this.regularNode = manyCubesNode0;

            return(groupNode);
        }