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.

Datos de origen

Repositorio
Unity-Technologies/skills
Última actividad en el origen
28 de septiembre de 2026 a las 20:01
Idioma detectado de SKILL.md
inglés
Estrellas
1087
Forks
65

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
2 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
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"`
Ver en GitHub