GTX : Fix channel properties and add default mip target
This commit is contained in:
parent
0a9520d1f2
commit
423463d082
@ -719,7 +719,7 @@ namespace FirstPlugin
|
||||
public override void Replace(string FileName)
|
||||
{
|
||||
FTEX ftex = new FTEX();
|
||||
ftex.ReplaceTexture(FileName, Format);
|
||||
ftex.ReplaceTexture(FileName, Format, surface.mipSize <= 1 ? 1 : 0);
|
||||
if (ftex.texture != null)
|
||||
{
|
||||
surface.swizzle = ftex.texture.Swizzle;
|
||||
@ -777,7 +777,13 @@ namespace FirstPlugin
|
||||
editor.Text = Text;
|
||||
var tex = FTEX.FromGx2Surface(surface, Text);
|
||||
tex.MipCount = MipCount;
|
||||
editor.LoadProperties(tex);
|
||||
editor.LoadProperties(tex, () =>
|
||||
{
|
||||
surface.compSel[0] = (byte)tex.CompSelR;
|
||||
surface.compSel[1] = (byte)tex.CompSelG;
|
||||
surface.compSel[2] = (byte)tex.CompSelB;
|
||||
surface.compSel[3] = (byte)tex.CompSelA;
|
||||
});
|
||||
editor.LoadImage(this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user