Set DDS depth count for generic textures to 1.
This commit is contained in:
parent
ea00287462
commit
7238de5d37
Binary file not shown.
Binary file not shown.
@ -586,10 +586,14 @@ namespace Switch_Toolbox.Library
|
|||||||
var data = GetImageData(SurfaceLevel, MipLevel);
|
var data = GetImageData(SurfaceLevel, MipLevel);
|
||||||
var surfaces = new List<Surface>();
|
var surfaces = new List<Surface>();
|
||||||
|
|
||||||
|
if (Depth == 0)
|
||||||
|
Depth = 1;
|
||||||
|
|
||||||
DDS dds = new DDS();
|
DDS dds = new DDS();
|
||||||
dds.header = new DDS.Header();
|
dds.header = new DDS.Header();
|
||||||
dds.header.width = Width;
|
dds.header.width = Width;
|
||||||
dds.header.height = Height;
|
dds.header.height = Height;
|
||||||
|
dds.header.depth = Depth;
|
||||||
dds.header.mipmapCount = (uint)MipCount;
|
dds.header.mipmapCount = (uint)MipCount;
|
||||||
dds.header.pitchOrLinearSize = (uint)data.Length;
|
dds.header.pitchOrLinearSize = (uint)data.Length;
|
||||||
dds.SetFlags((DDS.DXGI_FORMAT)Format);
|
dds.SetFlags((DDS.DXGI_FORMAT)Format);
|
||||||
|
Loading…
Reference in New Issue
Block a user