Add Nodes/Image/Desaturate

Chromum 2025-05-09 10:29:02 +00:00
parent 9c8b9409b9
commit b264d309b1

@ -0,0 +1,41 @@
# Desaturate
---
## 🔌 INPUT PORTS
| Name | Type | Description |
|---------------|-------------------------|--------------------------------------------------|
| `inputTexture` | `ImageData` | The input image data to desaturate. |
---
## 📤 EXPORT PORTS
| Name | Type | Description |
|------------------|-------------|---------------------------------------------------------|
| `inputTexture` | `ImageData` | The resulting desaturated image, stored as `ImageData`. |
---
## 📝 DESCRIPTION
The **Desaturate** node transforms a full-color texture into a grayscale version.
The luminance calculation uses the following formula:
```text
Gray = 0.2989 * Red + 0.5870 * Green + 0.1140 * Blue
```
Ideal for previews, stylized effects, or preprocessing steps in visual pipelines.
This node is derived from [`BaseImageNode`](../../../Nodes/BaseImageNode).
---
## ⚠️ KNOWN ISSUES
- Currently only supports `Color32` format via `NativeArray`.
---