Exemple #1
0
        public void DefaultAsMetal(int texcount)
        {
            Name       = String.Format("Shader{0}", Index);
            _datalen   = 512;
            _autoMetal = true;

            ref0                             =
                ref1                         =
                    ref2                     =
                        ref3                 =
                            ref4             =
                                ref5         =
                                    ref6     =
                                        ref7 = -1;

            switch ((texCount = texcount) - 1)
            {
            case 0: ref0 = 0; break;

            case 1: ref1 = 1; break;

            case 2: ref2 = 2; break;

            case 3: ref3 = 3; break;

            case 4: ref4 = 4; break;

            case 5: ref5 = 5; break;

            case 6: ref6 = 6; break;

            case 7: ref7 = 7; break;
            }

            stages = 4;

            Children.Clear();

            int      i = 0;
            TEVStage s;

            while (i++ < 4)
            {
                AddChild(s = new TEVStage(i));
                s.DefaultAsMetal(texcount - 1);
            }

            //MDL0ShaderStructNode s1 = new MDL0ShaderStructNode(); AddChild(s1);
            //MDL0ShaderStructNode s2 = new MDL0ShaderStructNode(); AddChild(s2);
            //s1.DefaultAsMetal(texcount - 1);
            //s2.DefaultAsMetal(texcount - 1);
        }
        public void DefaultAsMetal(int texcount)
        {
            _datalen   = 512;
            _autoMetal = true;

            _ref0                             =
                _ref1                         =
                    _ref2                     =
                        _ref3                 =
                            _ref4             =
                                _ref5         =
                                    _ref6     =
                                        _ref7 = -1;

            switch ((texCount = texcount) - 1)
            {
            case 0: _ref0 = 0; break;

            case 1: _ref1 = 1; break;

            case 2: _ref2 = 2; break;

            case 3: _ref3 = 3; break;

            case 4: _ref4 = 4; break;

            case 5: _ref5 = 5; break;

            case 6: _ref6 = 6; break;

            case 7: _ref7 = 7; break;
            }

            _stages = 4;

            Children.Clear();

            int      i = 0;
            TEVStage s;

            while (i++ < 4)
            {
                AddChild(s = new TEVStage());
                s.DefaultAsMetal(texcount - 1);
            }
        }
        public void DefaultAsMetal(int texcount)
        {
            _datalen = 512;
            _autoMetal = true;

            _ref0 =
            _ref1 =
            _ref2 =
            _ref3 =
            _ref4 =
            _ref5 =
            _ref6 =
            _ref7 = -1;

            switch ((texCount = texcount) - 1)
            {
                case 0: _ref0 = 0; break;
                case 1: _ref1 = 1; break;
                case 2: _ref2 = 2; break;
                case 3: _ref3 = 3; break;
                case 4: _ref4 = 4; break;
                case 5: _ref5 = 5; break;
                case 6: _ref6 = 6; break;
                case 7: _ref7 = 7; break;
            }

            _stages = 4;

            Children.Clear();

            int i = 0;
            TEVStage s;
            while (i++ < 4)
            {
                AddChild(s = new TEVStage());
                s.DefaultAsMetal(texcount - 1);
            }
        }