Skip to main content
skill CX Codex

unity-shaders-rendering — Claude Code skill: what it does

unity-shaders-rendering guides AI assistants through Unity shaders, lighting setups, and render pipelines across URP, HDRP, and Built-in RP.

MIT 133 installs ★ 66 updated 2026-06-18

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add JosiahSiegel/claude-plugin-marketplace --skill unity-shaders-rendering -a claude-code
Open on GitHub

What unity-shaders-rendering does

This skill equips coding agents with targeted guidance on Unity graphics. It covers HLSL shader structures for Universal Render Pipeline, Shader Graph recipes such as triplanar mapping and dissolve, lighting baked workflows, and post-processing stacks via Volume Profile assets.

Code templates follow modern Scriptable Render Pipeline standards. Parameters require the CBUFFER_START(UnityPerMaterial) block to keep SRP Batcher working, while textures use TEXTURE2D instead of older CG syntax.

Legacy Built-in RP is explicitly flagged as migration-only, so projects relying on old surface shaders will get less direct utility from these snippets.

What it helps with

  • write SRP Batcher compatible HLSL shaders for URP
  • build dissolve or rim glow setups in Shader Graph
  • configure light baking with GPU Lightmapper and probes
  • set up camera post-processing via Volume overrides
  • migrate shader code from legacy CGPROGRAM to HLSL

Example prompts for the agent

  • Create a basic URP unlit HLSL shader with SRP Batcher support
  • Show node connections for an outline effect in Shader Graph
  • What are the best settings for indoor lightmap baking in URP?

How to install unity-shaders-rendering

1Skills CLI (Vercel)

npx skills add JosiahSiegel/claude-plugin-marketplace --skill unity-shaders-rendering -a claude-code

2Manually: put the files in place

~/.claude/skills/unity-shaders-rendering/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/unity-shaders-rendering/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about unity-shaders-rendering

How to install unity-shaders-rendering in Claude Code?

Run npx skills add JosiahSiegel/claude-plugin-marketplace --skill unity-shaders-rendering -a claude-code in your terminal.

What does unity-shaders-rendering do?

It provides your AI agent with reference patterns for Unity shader development, lighting configuration, and render features.

Why does the HLSL template use CBUFFER blocks?

The CBUFFER_START(UnityPerMaterial) wrapper is necessary to ensure properties remain compatible with the SRP Batcher.

Source text

SKILL.md · MIT
---
name: unity-shaders-rendering
description: |
  Unity shaders, materials, and rendering pipelines (URP/HDRP/Built-in).
  PROACTIVELY activate for: (1) writing shaders in Shader Graph, HLSL, or ShaderLab, (2) URP and HDRP shader authoring, (3) custom render pipeline work (SRP), (4) lighting setup (baked vs realtime, lightmaps, Global Illumination), (5) post-processing stacks, (6) reflection probes and light probes, (7) custom render features and full-screen passes, (8) shader stripping and variant management, (9) compute shaders, (10) ray tracing in HDRP.
  Provides: Shader Graph templates, HLSL snippets, URP/HDRP differences, lighting setup recipes, render-feature examples, and shader-variant guidance.
---

# Unity Shaders and Rendering

## Overview

Reference for Unity's rendering systems, shader development, lighting configuration, and visual effects. Covers all three render pipelines, Shader Graph, hand-written shaders, and VFX Graph.

## Render Pipeline Comparison

| Feature | Built-in RP | URP | HDRP |
|---------|------------|-----|------|
| Target | Legacy projects | Mobile, VR, wide range | High-end PC/console |
| Shader language | Surface shaders + HLSL | HLSL (no surface shaders) | HLSL |
| Shader Graph | Yes | Yes | Yes |
| SRP Batcher | No | Yes | Yes |
| Render Features | No | Yes (ScriptableRendererFeature) | Custom Pass |
| Post-processing | Post Processing Stack v2 | Volume system (built-in) | Volume system (built-in) |
| Ray tracing | No | No (probe-based) | Yes (DXR) |
| Performance | Moderate | Optimized for scale | Highest fidelity |

**Recommendation:** Use URP for new projects unless targeting high-end visuals exclusively (HDRP). Built-in RP is legacy -- migrate when possible.

## Shader Graph

### Getting Started

1. Right-click in Project: Create > Shader Graph > URP > Lit Shader Graph
2. Double-click to open Shader Graph editor
3. Build node network connecting to Master Stack outputs
4. Create a Material using the shader, assign to renderers

### Master Stack Outputs (URP Lit)

| Output | Type | Purpose |
|--------|------|---------|
| Base Color | Color (RGB) | Albedo/diffuse color |
| Normal | Vector3 | Tangent-space normal map |
| Metallic | Float (0-1) | Metal vs. dielectric |
| Smoothness | Float (0-1) | Roughness inverse |
| Emission | Color (RGB) | Self-illumination |
| Alpha | Float (0-1) | Transparency |
| Alpha Clip Threshold | Float | Cutoff for alpha testing |

### Common Node Patterns

| Effect | Key Nodes |
|--------|-----------|
| **Dissolve** | Noise > Step > Alpha Clip + Edge emission |
| **Scrolling UV** | Time > Multiply > Add to UV |
| **Fresnel glow** | Fresnel Effect > Multiply color > Emission |
| **Triplanar mapping** | Triplanar node (avoids UV stretching) |
| **Color shift** | Lerp between colors using parameter or time |
| **Vertex displacement** | Noise > Multiply > Add to Position |
| **Outline** | Two-pass: inverted hull in custom render feature |

### Shader Graph Sub Graphs

Extract reusable node groups into Sub Graphs (Create > Shader Graph > Sub Graph). Use for shared noise functions, UV transformations, or custom lighting models.

## Hand-Written Shaders (ShaderLab + HLSL)

### URP Shader Structure

```hlsl
Shader "Custom/SimpleUnlit"
{
    Properties
    {
        _MainTex ("Texture", 2D) = "white" {}
        _Color ("Color", Color) = (1,1,1,1)
    }

    SubShader
    {
        Tags { "RenderType"="Opaque" "RenderPipeline"="UniversalPipeline" }

        Pass
        {
            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 positionHCS : SV_POSITION;
                float2 uv : TEXCOORD0;
            };

            TEXTURE2D(_MainTex);
            SAMPLER(sampler_MainTex);

            CBUFFER_START(UnityPerMaterial)
                float4 _MainTex_ST;
                half4 _Color;
            CBUFFER_END

            Varyings vert(Attributes IN)
            {
                Varyings OUT;
                OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz);
                OUT.uv = TRANSFORM_TEX(IN.uv, _MainTex);
                return OUT;
            }

            half4 frag(Varyings IN) : SV_Target
            {
                half4 tex = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, IN.uv);
                return tex * _Color;
            }
            ENDHLSL
        }
    }
}
```

**Key differences from Built-in shaders:**
- Use `HLSLPROGRAM`/`ENDHLSL` (not `CGPROGRAM`/`ENDCG`)
- Include URP shader library, not UnityCG.cginc
- Use `TEXTURE2D`/`SAMPLER` macros (not `sampler2D`)
- Wrap properties in `CBUFFER_START(UnityPerMaterial)` for SRP Batcher compatibility

## Lighting

### Light Types

| Type | Use For | Shadow Cost |
|------|---------|-------------|
| Directional | Sun, global illumination | Low (cascaded shadow maps) |
| Point | Torches, lamps | Medium |
| Spot | Flashlights, stage lights | Medium |
| Area (baked only) | Soft window light, panels | High (bake only) |

### Lighting Modes

| Mode | Description | Best For |
|------|-------------|----------|
| Realtime | Computed every frame | Dynamic objects, few lights |
| Baked | Pre-computed into lightmaps | Static environments |
| Mixed | Baked indirect + realtime direct | Best balance |

### Lightmap Baking Tips

- Set lightmap resolution based on scene scale (10-40 texels/unit for indoor)
- Use Light Probes for dynamic objects in baked scenes
- Use Reflection Probes for metallic/reflective surfaces
- Enable GPU Lightmapper for faster bake times
- Mark objects as Contribute GI in the Static flags

## Post-Processing (Volume System)

```text
Setup:
1. Add a Volume (Global or Local) to the scene
2. Create a Volume Profile asset
3. Add overrides: Bloom, Color Adjustments, Tonemapping, etc.
4. Camera must have Post Processing enabled (URP Camera settings)
```

| Effect | Performance | Notes |
|--------|-------------|-------|
| Bloom | Low | Use threshold to control intensity |
| Color Adjustments | Very Low | Saturation, contrast, color filter |
| Tonemapping | Very Low | ACES for cinematic look |
| Vignette | Very Low | Frame darkening |
| Ambient Occlusion (SSAO) | Medium | Disable on mobile |
| Depth of Field | High | Use Bokeh only for cinematics |
| Motion Blur | Medium | Can cause motion sickness in VR |

## VFX Graph vs Particle System

| Feature | Particle System (Shuriken) | VFX Graph |
|---------|---------------------------|-----------|
| Execution | CPU | GPU (compute shader) |
| Particle count | Thousands | Millions |
| Complexity | Component-based, simple | Node-based, complex |
| Platform | All | Compute shader capable only |
| Integration | Physics, collision | Limited physics |

Use Particle System for gameplay-integrated effects (physics collisions, small counts). Use VFX Graph for visual spectacles (rain, fire, magic, ambient particles).

## URP Render Features

Extend URP rendering with custom ScriptableRendererFeatures:

```csharp
public class OutlineFeature : ScriptableRendererFeature
{
    OutlinePass _pass;

    public override void Create()
    {
        _pass = new OutlinePass();
        _pass.renderPassEvent = RenderPassEvent.AfterRenderingOpaques;
    }

    public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData data)
    {
        renderer.EnqueuePass(_pass);
    }
}
```

Common uses: custom outlines, screen-space effects, render texture generation, stencil-based effects.

## Additional Resources

### Reference Files
- **`references/shader-recipes.md`** -- Complete shader implementations: toon/cel shading, water, dissolve, hologram, force field, procedural skybox, stencil portal, vertex animation, custom lighting models
- **`references/lighting-vfx-detail.md`** -- Advanced lighting setups, GI troubleshooting, VFX Graph cookbook (fire, smoke, electricity, portals), Scriptable Render Pipeline customization, custom render passes

© JosiahSiegel · MIT · JosiahSiegel/claude-plugin-marketplace

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →
scenario-unity-shaders scenario-labs scenario-unity-shaders — a skill for authoring and debugging shaders in Unity 6.3 URP: hand-written HLSL, Shader Graph, compute, variants and optimization. Solves pink materials, non-working effects, first-frame hitches and build bloat. CX Codex +1 600installs unity-developer rmyndharis unity-developer — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that brings Unity 6 LTS expertise into the agent context: rendering pipelines, C# performance patterns, and cross-platform builds. CX Codex +1 3,000installs scenario-unity-rendering-lighting scenario-labs scenario-unity-rendering-lighting guides Unity URP setup, scene lighting and post-processing, with checks for shadow, bake, image-quality and mobile rendering issues. CX Codex +1 598installs shader-graph-create-custom-node Unity-Technologies shader-graph-create-custom-node generates custom Shader Graph nodes directly from HLSL functions. It handles reflection markup so Unity registers your shader code in the graph creation menu. CX Codex +1 7,100installs new-unity-project Unity-Technologies new-unity-project orchestrates Unity project setup from game concept to Git repo, packages, and background Editor installations. CX Codex +1 8,000installs unity-project-setup davila7 unity-project-setup scaffolds a standardized Unity project with structured Assets directories, URP configs, core C# managers, and Git LFS tracking via Claude Code. CX Codex +1 303installs

From the same set96

The whole set →
data-cloud-2025 data-cloud-2025 is a Claude Code skill with Salesforce Data Cloud architecture patterns for designing data streams, identity resolution rules, and CRM activation pipelines. CX Codex +1 155installs advanced-array-patterns advanced-array-patterns is a Claude Code skill with Bash array recipes for indexed and associative arrays, mapfile, slicing, and safe iteration under set -u. CX Codex +1 155installs ffmpeg-noise-reduction ffmpeg-noise-reduction is a Claude Code skill that references FFmpeg filters for noisy video and audio, helping choose a filter and arguments for the noise. CX Codex +1 150installs cloudflare-knowledge cloudflare-knowledge is a Claude Code skill that opens Cloudflare references for Workers, Pages, R2, D1, Workers AI and Zero Trust during setup. CX Codex +1 139installs unity-modding The unity-modding skill covers Unity mod support, asset loading, Lua scripting, mod managers, Steam Workshop distribution, and runtime code patching. CX Codex +1 132installs viral-video-hook-templates viral-video-hook-templates is a Claude Code skill with ten hook templates and FFmpeg filters for the first 3 seconds of video. It helps test opening variations and hold viewers’ attention. CX Codex +1 131installs markdown-style markdown-style lints Markdown in two passes, syntax first and style second, and reports every finding by line. Rewrites only what you approve. CX Codex +1 125installs ffmpeg-karaoke-animated-text ffmpeg-karaoke-animated-text directs coding agents to generate FFmpeg commands and ASS subtitles for karaoke sync, scrolling credits, and dynamic text animations. CX Codex +1 121installs

Project sponsors

Companies that keep this analytics open