1
0
mirror of synced 2024-11-29 09:44:32 +01:00

Some fixes for applying in nutexb

This commit is contained in:
KillzXGaming 2019-04-29 14:46:48 -04:00
parent c03e90d331
commit 25681de95c
2 changed files with 5 additions and 4 deletions

Binary file not shown.

View File

@ -595,12 +595,14 @@ namespace FirstPlugin
{
if (!IsSwizzled)
{
// MipCount = GenerateMipCount(bitmap.Width, bitmap.Height);
MipCount = GenerateMipCount(bitmap.Width, bitmap.Height);
ImageData = GenerateMipsAndCompress(bitmap, Format);
// ImageData = GenerateMipsAndCompress(bitmap, Format);
return;
}
MipCount = GenerateMipCount(bitmap.Width, bitmap.Height);
Texture tex = new Texture();
tex.Height = (uint)bitmap.Height;
tex.Width = (uint)bitmap.Width;
@ -626,9 +628,8 @@ namespace FirstPlugin
tex.SurfaceDim = SurfaceDim.Dim2D;
tex.SampleCount = 1;
tex.Pitch = 32;
tex.MipOffsets = new long[tex.MipCount];
MipCount = GenerateMipCount(bitmap.Width, bitmap.Height);
tex.MipOffsets = new long[tex.MipCount];
var mipmaps = TextureImporterSettings.SwizzleSurfaceMipMaps(tex,
GenerateMipsAndCompress(bitmap, Format), MipCount);