Add Nodes/Image/ViewImageNode

Chromum 2025-05-09 11:35:31 +00:00
parent a0013c97f4
commit d28eabcd4e

@ -0,0 +1,45 @@
# View Texture Node
---
## 🔌 INPUT PORTS
| Name | Type | Description |
|-----------------|-----------------|------------------------------------------------------|
| Texture | `Texture2D` | The texture to view and split into channels. |
| Image Data | `ImageData` | An optional image data that can be used in place of a texture. |
---
## 📤 EXPORT PORTS
No outputs are exported in this node. The purpose of this node is to visualize and manage texture data.
---
## 📝 DESCRIPTION
The **View Texture Node** is a utility node used to visualize and manage the RGBA channels of a texture. It allows you to split the input texture into its individual color channels (Red, Green, Blue, and Alpha) and view them separately.
### Features:
- **Texture Input**: Accepts either a `Texture2D` or `ImageData`.
- **Channel Separation**: The node splits the texture into individual channels for viewing and manipulation.
- **Texture View**: The node allows you to view the whole texture as well as individual channels (RGB, R, G, B, A) in the Unity editor.
This node is ideal for cases where you want to debug or manipulate textures on a per-channel basis. You can also view the entire texture or view specific channels like Red, Green, Blue, or Alpha.
### **How It Works**:
1. **Process**: The `Process` method checks for the texture input, and if its not provided, it converts the `ImageData` to a `Texture2D`. The texture is then processed, splitting it into its RGBA channels.
2. **Channel Textures**: The node generates textures for each individual channel (R, G, B, A), which can be viewed separately using the editor interface.
This node is derived from [`BaseImageNode`](Nodes/BaseImageNode).
---
## ⚠️ KNOWN ISSUES
- Ensure that the input texture is properly loaded. If the texture is missing or corrupted, the node may not function as expected.
- The `ImageData` input is optional, but if its provided, it will be used to generate the texture if the `Texture2D` is not connected.
---