mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Further fixes.
This commit is contained in:
parent
fabe2a9a16
commit
6014d37bed
3 changed files with 4 additions and 3 deletions
|
|
@ -131,7 +131,7 @@ public partial class CombinedTexture : IDisposable
|
|||
|
||||
private static ScratchImage AddMipMaps( ScratchImage input, bool mipMaps )
|
||||
=> mipMaps
|
||||
? input.GenerateMipMaps( Math.Min( 13, 1 + BitOperations.Log2( ( uint )Math.Max( input.Meta.Width, input.Meta.Height ) ) ) )
|
||||
? input.GenerateMipMaps( Math.Min( 13, 1 + BitOperations.Log2( ( uint )Math.Max( input.Meta.Width, input.Meta.Height ) ) ), FilterFlags.SeparateAlpha )
|
||||
: input;
|
||||
|
||||
private static ScratchImage CreateUncompressed( ScratchImage input, bool mipMaps )
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public static class TexFileParser
|
|||
|
||||
var lastOffset = 0L;
|
||||
var lastSize = 80L;
|
||||
var minSize = meta.Format.IsCompressed() ? 4 : 1;
|
||||
for( var i = 0; i < 13; ++i )
|
||||
{
|
||||
var offset = header.OffsetToSurface[ i ];
|
||||
|
|
@ -61,8 +62,8 @@ public static class TexFileParser
|
|||
return i;
|
||||
}
|
||||
|
||||
width = Math.Max( width / 2, 1 );
|
||||
height = Math.Max( height / 2, 1 );
|
||||
width = Math.Max( width / 2, minSize );
|
||||
height = Math.Max( height / 2, minSize );
|
||||
lastOffset = offset;
|
||||
lastSize = requiredSize;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue