mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 04:23:09 +00:00
GTX : Fix channel properties and add default mip target
This commit is contained in:
parent
0a9520d1f2
commit
423463d082
1 changed files with 8 additions and 2 deletions
|
@ -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 a new issue