plugins/unity-master/skills/unity-shaders-rendering/SKILL.md
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.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace unity-shaders-renderingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
| 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.
| 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 |
| 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 |
Extract reusable node groups into Sub Graphs (Create > Shader Graph > Sub Graph). Use for shared noise functions, UV transformations, or custom lighting models.
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:
HLSLPROGRAM/ENDHLSL (not CGPROGRAM/ENDCG)TEXTURE2D/SAMPLER macros (not sampler2D)CBUFFER_START(UnityPerMaterial) for SRP Batcher compatibility| 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) |
| 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 |
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 |
| 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).
Extend URP rendering with custom ScriptableRendererFeatures:
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.
references/shader-recipes.md -- Complete shader implementations: toon/cel shading, water, dissolve, hologram, force field, procedural skybox, stencil portal, vertex animation, custom lighting modelsreferences/lighting-vfx-detail.md -- Advanced lighting setups, GI troubleshooting, VFX Graph cookbook (fire, smoke, electricity, portals), Scriptable Render Pipeline customization, custom render passesdevelopment
This skill should be used when the user asks to train, debug, scale, or improve ML models. PROACTIVELY activate for: (1) PyTorch, TensorFlow/Keras, JAX, Flax, Hugging Face Trainer/Accelerate training loops, (2) distributed training, DDP/FSDP/DeepSpeed, TPU/GPU setup, (3) mixed precision AMP/bf16, gradient accumulation, checkpointing, seeding, (4) overfitting, imbalance, loss functions, regularization, LR schedules, warmup, (5) memory optimization, gradient checkpointing, offloading, quantization-aware training. Provides: reproducible training best practices across deep learning and classical ML.
development
This skill should be used when the user asks to productionize, track, version, govern, monitor, or automate ML systems. PROACTIVELY activate for: (1) MLflow, Weights & Biases, Neptune, Comet, ClearML experiment tracking, (2) model registry, model versioning, artifact lineage, reproducibility, (3) Kubeflow, SageMaker Pipelines, Vertex AI Pipelines, Azure ML pipelines, Databricks workflows, (4) CI/CD, continuous training/evaluation, A/B tests, canary/shadow deployments, (5) drift detection, model monitoring, data validation, responsible AI governance. Provides: end-to-end MLOps architecture and operational safeguards.
development
This skill should be used when the user asks to optimize, export, serve, compress, or accelerate ML inference. PROACTIVELY activate for: (1) latency, throughput, p95/p99, batching, concurrency, KV cache, memory, or cost issues, (2) quantization INT8/INT4, GPTQ, AWQ, bitsandbytes, pruning, sparsity, distillation, (3) ONNX export, ONNX Runtime, TensorRT, TorchScript, torch.compile, XLA, OpenVINO, Core ML, TFLite, (4) Triton, TorchServe, TF Serving, BentoML, Seldon, KServe configuration, (5) edge deployment, CPU/GPU/TPU/Inferentia serving. Provides: hardware-aware inference optimization and safe benchmarking.
testing
This skill should be used when the user asks to tune hyperparameters, run sweeps, optimize search spaces, or use AutoML. PROACTIVELY activate for: (1) Optuna, Ray Tune, FLAML, AutoGluon, Hyperopt, Nevergrad, KerasTuner, W&B sweeps, (2) grid search, random search, Bayesian optimization, TPE, Gaussian processes, evolutionary search, (3) ASHA, Hyperband, successive halving, multi-fidelity optimization, population-based training, (4) learning-rate finder, batch-size search, early stopping, pruning, (5) reproducible sweep design and experiment analysis. Provides: budget-aware hyperparameter search strategy.