Shader Graph Functions (Sub-Graphs) (#1806)
- Adds a new Asset type with `.shdrfunc` extension.
- Shader Functions do not have the "Material" node as their final output node. Instead they have a "Result" node which has a variable amount of inputs defined by the user
- You can change the preview type of a Function Output so the value can be previewed while working on it
- Dragging a `.shdrfunc` file into a Shader Graph (or a subgraph) will create the subgraph node
- When "Add To Node Library" is set to `true` on a Shader Function it will be added to the Right Click -> Create menu
- Double Clicking on a Shader Function Node will open the Shader Function
- GraphCompiler now keeps track of the current Subgraph stack when compiling the preview and the output code, fully supports subgraphs within subgraphs.
- Constant nodes now have a "Preview" input when you're in a Shader Function
- Can Right Click -> Create Custom Node with a bunch of nodes already selected to instantly create a Shader Function. Will automatically create all the input parameters and result outputs.
- Texture Parameters/Attributes are fed the whole way up from each nested subgraph since you cannot define a default texture in the `.shader` file.
- Subgraph Nodes are now colour-coded Green and Result nodes are now colour-coded Blue
https://files.facepunch.com/CarsonKompon/2025/January/28_18-05-OddAsiantrumpetfish.mp4