Skip to content

Commit

Permalink
more normal map checks
Browse files Browse the repository at this point in the history
  • Loading branch information
floxay committed Aug 26, 2021
1 parent 5560615 commit d8beb34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Prism/PrismForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ private void DumpSelectionAsPng(string outputDir, object o)
if (_settings.FlipPngSpace)
bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);

if (texture.TexFormat == 0x6) // Most normal maps use BC5
if ((texture.TexType == TextureType.Normal || texture.TexType == TextureType.Misc) &&
texture.TexFormat == 0x6)
{
if (_settings.FlipPngGreenChannel || _settings.RecalculatePngBlueChannel)
{
Expand Down
5 changes: 3 additions & 2 deletions RainbowForge/Image/TextureType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ public enum TextureType : uint
Diffuse = 0x0, // older GUI tetxures
Normal = 0x1, // not just yellow (RG = XY) ones, head detail (RGA = XYZ) as well
Specular = 0x2, // usually holds gloss, metalness and cavity
Diffuse2 = 0x3, // GUI texture, cubemaps, spritesheets
Normal2 = 0x5,
Misc = 0x3, // Misc Map; can be Diffuse, GUI, Normal, Emission, Mask, Distortion, Cubemap or pretty much anything
Displacement = 0x5,
Translucence = 0x6,
ColorMask = 0x7
}
}

0 comments on commit d8beb34

Please sign in to comment.