From f6f58809c31e6ab2ee5be6b47040e53ff56ef79d Mon Sep 17 00:00:00 2001 From: Chromum Date: Fri, 9 May 2025 10:33:38 +0000 Subject: [PATCH] Add Nodes/Image/Invert --- Nodes%2FImage%2FInvert.md | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Nodes%2FImage%2FInvert.md diff --git a/Nodes%2FImage%2FInvert.md b/Nodes%2FImage%2FInvert.md new file mode 100644 index 0000000..86a909c --- /dev/null +++ b/Nodes%2FImage%2FInvert.md @@ -0,0 +1,41 @@ +# Invert + +--- + +## 🔌 INPUT PORTS + +| Name | Type | Description | +|-------------|-------------|------------------------------------------| +| `inputTexture` | `ImageData` | The input image whose colors will be inverted. | + +--- + +## 📤 EXPORT PORTS + +| Name | Type | Description | +|-------------|-------------|---------------------------------------------| +| `inputTexture` | `ImageData` | The output image with inverted RGB channels. | + +--- + +## 📝 DESCRIPTION + +The **Invert** node inverts the red, green, and blue channels of every pixel in the input texture. +Alpha is preserved as-is. This node can be used to create effects like photo negatives or simple stylizations. + +Inversion formula per channel: + +``` +R = 255 - R +G = 255 - G +B = 255 - B +A = A +``` + +This node is derived from [`BaseImageNode`](Nodes/BaseImageNode). + +--- + +## ⚠️ KNOWN ISSUES + +- Currently only supports `Color32` format via `NativeArray`.