Skip to content

Commit

Permalink
getting rid of unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
floxay committed Aug 25, 2021
1 parent 504acdd commit 9b5a0dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Prism/PrismForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,13 @@ private void DumpSelectionAsPng(string outputDir, object o)
using var stream = streamProvider.Invoke();

var texture = Texture.Read(stream);
var bNormalMap = texture.TexFormat == 0x6; // Most normal maps use BC5
using var image = Pfim.Pfim.FromStream(DdsHelper.GetDdsStream(texture, texture.ReadSurfaceBytes(stream)));
using var bmp = image.CreateBitmap();

if (_settings.FlipPngSpace)
bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);

if (bNormalMap)
if (texture.TexFormat == 0x6) // Most normal maps use BC5
{
if (_settings.FlipPngGreenChannel || _settings.RecalculatePngBlueChannel)
{
Expand Down

0 comments on commit 9b5a0dd

Please sign in to comment.