Generates custom Unity Shader Graph nodes from HLSL code with reflection hints and writes them to an .hlsl asset.
- What it does
- This skill guides the creation of custom Shader Graph nodes from HLSL function definitions. It covers adding the UNITY_EXPORT_REFLECTION preprocessor define, decorating functions with required Shader Graph hint tags such as sg:ProviderKey and sg:DisplayName, and writing the resulting code into a ShaderInclude (.hlsl) asset. It also checks for an existing asset containing custom nodes and asks for confirmation before appending.
- When to use it
- Use this when a user wants a new Shader Graph node or wants existing HLSL code to work as a reflected function node. It is intended for Unity projects using the Shader Graph package.
- Requirements
- Requires the Unity Shader Graph package (com.unity.shadergraph >= 17.5.0) and a Unity project with ShaderInclude assets. It ships no scripts; it relies on the bundled resources/all_hints.hlsl reference file.