Skip to main content

shader-graph-create-custom-node

Generates custom Shader Graph nodes from HLSL code. Use when the user wants a new Shader Graph node or to make existing HLSL work as a reflected function node.

Quellinformationen

Repository
Unity-Technologies/skills
Letzte Quellaktivität
28. September 2026 um 20:01
Erkannte Sprache von SKILL.md
Englisch
Sterne
1.087
Forks
65

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

Datei-Explorer
2 Dateien

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
shader-graph-create-custom-node
description
Generates custom Shader Graph nodes from HLSL code. Use when the user wants a new Shader Graph node or to make existing HLSL work as a reflected function node.
required_packages
{"com.unity.shadergraph":">=17.5.0"}
# Generating a custom Shader Graph node ## Step 1: Generate an HLSL function definition - The function must be preceded by the preprocessor define `UNITY_EXPORT_REFLECTION` ## Step 2: Decorate with Shader Graph hint tags - See `resources/all_hints.hlsl` for all valid hint tags and usage patterns - C#-style documentation tags are supported outside of `funchints` or `paramhints` blocks - Required function hints: - `sg:ProviderKey` - `sg:SearchCategory` - `sg:SearchTerms` - `sg:DisplayName` ## Step 3: Write the code to an asset - Search the project for a `ShaderInclude` asset (`.hlsl`) that already contains custom Shader Graph nodes - If a matching asset exists, show the user its current contents and ask for confirmation before appending the new code - If no matching asset exists, create a new `.hlsl` asset - Ensure the file begins with `#include "ShaderApiReflectionSupport.hlsl"`
Auf GitHub ansehen