mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-26 06:20:24 +00:00
Adjust DDS header properly when edited
This commit is contained in:
parent
3ee6cd887a
commit
de0382a08e
4 changed files with 11 additions and 0 deletions
Binary file not shown.
|
@ -1318,6 +1318,17 @@ namespace Toolbox.Library
|
|||
this.MipCount = settings.MipCount;
|
||||
this.Depth = settings.Depth;
|
||||
this.ArrayCount = (uint)settings.DataBlockOutput.Count;
|
||||
|
||||
this.header.width = Width;
|
||||
this.header.height = Height;
|
||||
this.header.depth = Depth;
|
||||
this.header.mipmapCount = (uint)MipCount;
|
||||
this.header.pitchOrLinearSize = (uint)bdata.Length / ArrayCount;
|
||||
|
||||
if (this.ArrayCount > 0) //Use DX10 format for array surfaces as it can do custom amounts
|
||||
this.SetFlags((DDS.DXGI_FORMAT)Format, true);
|
||||
else
|
||||
this.SetFlags((DDS.DXGI_FORMAT)Format);
|
||||
}
|
||||
|
||||
public static byte[] CompressBC1Block(byte[] data, int Width, int Height)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue