원클릭으로
unity-shader-style
Shader coding style for Unity projects. Use when writing or editing Unity shader (.shader, .hlsl) files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Shader coding style for Unity projects. Use when writing or editing Unity shader (.shader, .hlsl) files.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | unity-shader-style |
| description | Shader coding style for Unity projects. Use when writing or editing Unity shader (.shader, .hlsl) files. |
A style guide for writing Unity shaders. Follow these rules so that new shaders read like the existing code.
A .shader file is organized in this order:
Shader "ShaderName"
{
Properties
{
// Property list
}
HLSLINCLUDE
// shared vertex/fragment shader code
ENDHLSL
SubShader
{
// SubShader tags
Pass
{
Name "PassName"
// Pass tags
HLSLPROGRAM
#pragma vertex Vert
#pragma fragment Frag
ENDHLSL
}
// Subsequent passes
}
}
HLSLINCLUDE … ENDHLSL at the file level between Properties and
SubShader. All shared code (vertex shader, fragment shaders) lives there.Vert + PascalCase description — VertCommon, VertBlit.void Vert(float4 position : POSITION,
float2 texCoord : TEXCOORD0,
out float4 outPosition : SV_Position,
out float2 outTexCoord : TEXCOORD0)
Varyings Vert(Attributes attrib)
Frag + PascalCase description — FragCommon, FragBlit.float4 return value annotated with : SV_Target:
float4 Frag(float4 position : SV_Position,
float2 texCoord : TEXCOORD0) : SV_Target
void return with out float4 targetN : SV_TargetN
parameters.
void Frag(float4 position : SV_Position,
float2 texCoord : TEXCOORD0,
out float4 target0 : SV_Target0,
out float4 target1 : SV_Target1,
out float4 target2 : SV_Target2)
Pass has a Name in PascalCase:
Pass
{
Name "DownsamplePass"
HLSLPROGRAM
#pragma vertex VertCommon
#pragma fragment FragDownsample
ENDHLSL
}
HLSLPROGRAM … ENDHLSL blocks inside passes to just the two #pragma
lines; all actual code lives in HLSLINCLUDE.Use when interacting with a running Unity Editor instance — sending commands, checking editor connection status, installing the Pipeline package, or evaluating C# expressions in the editor.
Use when installing, uninstalling, or upgrading Unity editors, adding or listing modules, or browsing available Unity releases.
Use for general Unity CLI operations — list or open projects, list installed editors, read CLI logs, or any other Unity CLI task not covered by a more specific skill (unity-cli-install, unity-cli-build, unity-cli-pipeline).
Use when creating or editing Unity Shader Graph assets programmatically (Unity 6.5+) — authoring custom nodes from HLSL via the Shader Function Reflection API, generating .shadergraph files, or wiring nodes by editing the graph JSON.
Use when reading the Unity Editor Console (log/warning/error entries) or detecting compile errors (C#/Burst, shader, compute shader) from a connected editor via the Pipeline package.
Use when creating a new minimal Unity project.