Ejemplo n.º 1
0
        public MODMaterial(MOD_Parser parser, Material mat)
        {
            this.DiffuseColor = mat.DiffuseColor;

            for (int i = 0; i < mat.TextureAttributeIndices.Length; i++)
            {
                short index = mat.TextureAttributeIndices[i];
                if (index != -1)
                {
                    var attribute = parser.TextureAttributes[index];
                    TextureMaps.Add(new STGenericTextureMap()
                    {
                        WrapU = ConvertWrapMode(attribute.WrapS),
                        WrapV = ConvertWrapMode(attribute.WrapT),
                        Name  = $"Texture{attribute.TextureIndex}",
                        Type  = STTextureType.Diffuse,
                    });
                }
            }
        }
Ejemplo n.º 2
0
 public void Load(Stream stream)
 {
     //    this.Label = FileInfo.FileName;
     //    Tag = this;
     Header = new MOD_Parser(stream);
 }