/skills-gamedev:unity-shadersfrom Game Dev Skills
Authors materials and VFX in Unity using Shader Graph, HLSL, and URP/HDRP custom passes. Covers dissolve effects, Fresnel rim lighting, and precision optimization.
Ships in Game Dev Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Real-time shaders are programs executed concurrently across thousands of GPU cores for every single vertex and pixel on screen. In modern Unity (URP and HDRP), authoring game visual effects requires mastering both node-based Shader Graph and text-based HLSL. Writing efficient shaders is an exercise in computational frugality: every trigonometric function, dependent texture read, or unnecessary full-precision float in the fragment shader directly burns GPU fill-rate and tanks mobile/console frame rates.
ScriptableRendererFeature and custom Render Passes.CustomPassVolume.float (32-bit): World-space coordinates, UV coordinates, depth calculations.half (16-bit): Colors, normals, vector directions, ambient lighting calculations (saves 50% ALU register pressure on mobile GPUs).Vertex Shader: Transforms object-space vertices to clip space:
$$P_{\text{clip}} = M_{\text{projection}} \times M_{\text{view}} \times M_{\text{model}} \times P_{\text{local}}$$Fragment / Pixel Shader: Calculates final RGBA color per rasterized pixel._Cutoff property, and execute clip(noise - cutoff).ScriptableRendererFeature):
RenderPassEvent.AfterRenderingTransparents.RTHandles.Shader "Custom/URP_Dissolve"
{
Properties
{
_MainTex ("Albedo Texture", 2D) = "white" {}
_NoiseTex ("Noise Texture", 2D) = "white" {}
_Cutoff ("Dissolve Cutoff", Range(0, 1)) = 0.0
[HDR] _EdgeColor ("Edge Burn Color", Color) = (2.0, 0.5, 0.0, 1.0)
_EdgeWidth ("Edge Width", Range(0, 0.2)) = 0.05
}
SubShader
{
Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" }
LOD 100
Pass
{
Name "ForwardLit"
Tags { "LightMode"="UniversalForward" }
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
struct Attributes {
float4 positionOS : POSITION;
float2 uv : TEXCOORD0;
};
struct Varyings {
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
};
TEXTURE2D(_MainTex); SAMPLER(sampler_MainTex);
TEXTURE2D(_NoiseTex); SAMPLER(sampler_NoiseTex);
CBUFFER_START(UnityPerMaterial)
float4 _MainTex_ST;
half4 _EdgeColor;
half _Cutoff;
half _EdgeWidth;
CBUFFER_END
Varyings vert(Attributes input) {
Varyings output;
output.positionCS = TransformObjectToHClip(input.positionOS.xyz);
output.uv = TRANSFORM_TEX(input.uv, _MainTex);
return output;
}
half4 frag(Varyings input) : SV_Target {
half noise = SAMPLE_TEXTURE2D(_NoiseTex, sampler_NoiseTex, input.uv).r;
clip(noise - _Cutoff); // Discard pixel if below dissolve threshold
half4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, input.uv);
// Calculate glowing burn edge
half edgeFactor = step(noise - _Cutoff, _EdgeWidth);
half4 finalColor = lerp(albedo, _EdgeColor, edgeFactor);
return finalColor;
}
ENDHLSL
}
}
}
float precision causing high register spilling.float to half.CBUFFER_START(UnityPerMaterial) for SRP Batcher compatibility.half precision for colors, directions, and lighting math.clip() avoided on mobile tiled GPUs where Early-Z rejection is critical.ScriptableRendererFeature in URP.CBUFFER_START(UnityPerMaterial), forcing Unity to issue unique draw calls per material._CameraDepthTexture on mobile hardware without verifying bandwidth overhead.What SKILL.md sets; muted values are Claude Code's defaults
skills-gamedev@skillary is listed by poorvith-mp/skillary — review the source before installing
npx claudepluginhub poorvith-mp/skillary --plugin skills-gamedev48 skills in this plugin
/anti-cheatEnforce server authority and defend against speed hacks, memory editing, and exploits. For networking setup, see unity-multiplayer. Use when defending games against exploits or hacks./blender-add-on-engineerMoved to modernized catalog in skillary. Removed in v4.1./blender-animationRig, skin and animate characters and props, and export clean animation sets to an engine. Use when rigging skeletons, weight painting, or keyframing animations.