コード例 #1
0
        public MaterialType(ShaderName shader, PropName[] propNames, int flag) {
            this.shader = shader;
            this.texPropNames = Array.ConvertAll(propNames, value => value.ToString());
            if (propNames.Length == 1) {
                hasRenderTex = (propNames[0] == PropName._RenderTex);
            }

            this.hasColor   = ((flag & ShaderMapper.COLOR)   != 0);
            this.isLighted  = ((flag & ShaderMapper.LIGHT)   != 0);
            this.isToony    = ((flag & ShaderMapper.TOONY)   != 0);
            this.isOutlined = ((flag & ShaderMapper.OUTLINE) != 0);
            this.isHair     = ((flag & ShaderMapper.HAIR)    != 0);
            this.isTrans    = ((flag & ShaderMapper.TRANS)   != 0);
            this.hasFloat1  = ((flag & ShaderMapper.FLOATVAL1) != 0);
            this.hasFloat2  = ((flag & ShaderMapper.FLOATVAL2) != 0);
            this.hasFloat3  = ((flag & ShaderMapper.FLOATVAL3) != 0);
            this.hasCutoff  = ((flag & ShaderMapper.CUTTOFF) != 0);
            Init();
        }
コード例 #2
0
 public MaterialType(ShaderName shader, string[] texPropNames, 
                     bool hasColor, bool isLighted, bool isToony,
                     bool isOutlined, bool isTrans, bool isHair) {
     this.shader = shader;
     this.texPropNames = texPropNames;
     this.hasColor   = hasColor;
     this.isLighted  = isLighted;
     this.isToony    = isToony;
     this.isOutlined = isOutlined;
     this.isHair     = isHair;
     this.isTrans    = isTrans;
     Init();
 }