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, }); } } }
public void Load(Stream stream) { // this.Label = FileInfo.FileName; // Tag = this; Header = new MOD_Parser(stream); }