override-shader-chunks

override-shader-chunks is a skill for Claude Code, Codex from playcanvas/create-playcanvas. It costs 44 tokens per session (721 once invoked), scanned A, original, MIT.

A workflow for changing selected parts of PlayCanvas StandardMaterial shading through named shader chunks, which are reusable pieces of a material's shader.

In plain words
What is it for?
It helps add procedural or stylised looks, custom vertex movement, and per-material screen effects without writing a complete shader from scratch.
Why use it?
It supports custom visual effects while retaining built-in features such as fog, shadows, skinning, instancing, and tone mapping.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps add procedural or stylised looks, custom vertex movement, and per-material screen effects without writing a complete shader from scratch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/playcanvas/create-playcanvas/override-shader-chunks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add playcanvas/create-playcanvas --skill override-shader-chunks
Clone the repo
git clone --depth 1 https://github.com/playcanvas/create-playcanvas

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for override-shader-chunks

README.md
[![agentmods](https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/override-shader-chunks/github.svg)](https://agentmods.dev/skills/playcanvas/create-playcanvas/override-shader-chunks)
Your own site
<a href="https://agentmods.dev/skills/playcanvas/create-playcanvas/override-shader-chunks"><img src="https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/override-shader-chunks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for override-shader-chunks

Your own site · 80×15
<a href="https://agentmods.dev/skills/playcanvas/create-playcanvas/override-shader-chunks"><img src="https://agentmods.dev/badge/skills/playcanvas/create-playcanvas/override-shader-chunks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 721 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00721
Opus 5 $0.00022 $0.00360
Sonnet 5 $0.00009 $0.00144
Haiku 4.5 $0.00004 $0.00072

Measured 11d ago against content hash f34f489232ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

override-shader-chunks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/override-shader-chunks/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Override shading through chunks

A StandardMaterial's shader is assembled from named chunks (lighting, combine, transform, and more). Overriding one keeps the rest of the pipeline — fog, tonemapping, shadows, skinning, instancing — intact. Reach for a fully custom ShaderMaterial only when the look needs a stage the chunk system does not expose at all (its own vertex/fragment pair and attribute layout); a chunk override is the default for everything else, since it is cheaper and stays integrated.

Pin the version, read the source

Set material.shaderChunksVersion to the installed engine's major.minor (for example '2.21') before shipping any override. Chunk names and their contracts — what a chunk defines, what globals it reads or writes — are version-keyed and change between releases. Read the installed playcanvas source for the exact chunk being touched; do not recall its contract from memory or an older version's documentation.

Set chunks through the documented accessor

Use material.getShaderChunks(SHADERLANGUAGE_GLSL).set(name, source), and the WGSL equivalent — the public, documented method — not the underlying shaderChunks maps, which are internal. Call material.update() after any change so cached shader variants are cleared.

Emissive-only overrides

An emissivePS override implements void getEmission(), writing the result into dEmission. When the override is meant to fully drive the visible color, zero the material's diffuse/specular and disable useSkybox so no other lighting term still contributes underneath it.

Uniforms are raw

setParameter uploads exactly what it is given, with no color-space conversion. Convert any authored sRGB color with Color#linear() before calling setParameter; an sRGB color passed straight through renders visibly darker and less saturated than it was authored.

Keep vertex chunks instancing-aware

A custom transformCoreVS (or any vertex chunk reading the model matrix) must keep the engine's INSTANCING define path — pulling the per-instance matrix under that define — with a non-instanced fallback that uses matrix_model directly, matching the stock chunk's structure. Dropping this path silently breaks instancing for any mesh instance using the material.

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 60 lines · 44 tokens per session scan A f34f489232ff

Subscribe to this mod's changes

override-shader-chunks is a skill published in the GitHub repository playcanvas/create-playcanvas (53 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 721 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories