Add invert options for texture imports for Red, Blue, and Alpha channels.

This commit is contained in:
Chandler Cox
2024-12-30 21:27:03 -06:00
parent 0f847335c3
commit 899528e087
2 changed files with 96 additions and 5 deletions

View File

@@ -61,12 +61,24 @@ API_CLASS(Namespace="FlaxEngine.Tools", Static) class FLAXENGINE_API TextureTool
API_FIELD(Attributes="EditorOrder(71)")
bool FlipX = false;
// True if to invert the green channel on a normal map. Good for OpenGL to DirectX conversion.
API_FIELD(Attributes = "EditorOrder(72)")
// Invert the red channel.
API_FIELD(Attributes = "EditorOrder(72), EditorDisplay(\"Invert Channels\"), ExpandGroups")
bool InvertRedChannel = false;
// Invert the green channel. Good for OpenGL to DirectX conversion.
API_FIELD(Attributes = "EditorOrder(73), EditorDisplay(\"Invert Channels\")")
bool InvertGreenChannel = false;
// Invert the blue channel.
API_FIELD(Attributes = "EditorOrder(74), EditorDisplay(\"Invert Channels\")")
bool InvertBlueChannel = false;
// Invert the alpha channel.
API_FIELD(Attributes = "EditorOrder(75), EditorDisplay(\"Invert Channels\")")
bool InvertAlphaChannel = false;
// Rebuild Z (blue) channel assuming X/Y are normals.
API_FIELD(Attributes = "EditorOrder(73)")
API_FIELD(Attributes = "EditorOrder(76)")
bool ReconstructZChannel = false;
// Texture size scale. Allows increasing or decreasing the imported texture resolution. Default is 1.