ワンクリックで
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 職業分類に基づく
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.
| 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.