Borrowing it
Nothing to install: this file belongs to oframe/ogpu. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/oframe/ogpu/main/.claude/skills/pbr-shading/SKILL.mdgit clone --depth 1 https://github.com/oframe/ogpuWrote 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.
[](https://agentmods.dev/skills/oframe/ogpu/pbr-shading)<a href="https://agentmods.dev/skills/oframe/ogpu/pbr-shading"><img src="https://agentmods.dev/badge/skills/oframe/ogpu/pbr-shading/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.
<a href="https://agentmods.dev/skills/oframe/ogpu/pbr-shading"><img src="https://agentmods.dev/badge/skills/oframe/ogpu/pbr-shading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00097 | $0.01762 |
| Opus 5.5 | $0.00039 | $0.00705 |
| Sonnet 5.5 | $0.00019 | $0.00352 |
| Haiku 4.5 | $0.00010 | $0.00176 |
Grade A, and why
pbr-shading 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fold PBR shading into a Shader + Mesh
The engine has a complete PBR implementation in src/modules/pbr/pbr.wgsl
(metallic-roughness + IBL: prefiltered specular cube, SH irradiance, split-sum
BRDF LUT). There is no runtime shader-chunk system — integration means copying
the right WGSL pieces into the target shader and wiring the right JS resources.
This skill tells you which pieces, in what order, and what breaks silently if
you get it wrong.
Decide the integration shape
- Stock shading, standard geometry → use
@modules/pbr/pbr.wgsl?rawdirectly as theShadercode. No WGSL editing. Works when the mesh just needs to look PBR-lit and the vertex stage is plain MVP transform. - Custom shader keeps its vertex work (displacement, instancing, skinning,
procedural normals) → fold the PBR fragment stage into the user's WGSL.
Read
references/wgsl-folding.mdfor exactly which blocks to copy and how to splice them.
Either way the JS wiring (IBL resources, fallback textures, bind group) is the
same — references/js-wiring.md has the full copy-paste blocks.
Workflow
- Read the target shader and its geometry. Confirm attribute ORDER —
@locationis assigned by declaration order in the geometry'sdataobject, not by name.pbr.wgslexpectsposition(loc 0),normal(loc 1),uv(loc 2). A geometry declared{position, normal, texcoord}works (third attr lands on loc 2 regardless of name);{position, uv, normal}silently shades garbage. - Wire IBL resources (specular cube + SH buffer + BRDF LUT + sampler). Copy
initIBL()fromexamples/gltf/GLTF.jsorexamples/pbrshader/PBRShader.js— they are the canonical block.loadIBLCubeMapreturnsmipLevels; pass it back to theShaderasconstants: { roughnessLevels: ibl.mipLevels }or the roughness→lod mapping is wrong. Default environment assets:./assets/pbr/artistworkshop_oct.exr(specular env) +./assets/pbr/artistworkshop_sh.json(precomputed 9-coeff diffuse-irradiance SH, consumed byloadSphericalHarmonics). - Resolve material textures. For every map the user did NOT provide, bind a
2×2 solid fallback instead — never leave a binding empty (pipeline creation
throws) and never branch the shader on "has texture" per-map (the material
factors already make white/black fallbacks behave as pass-throughs):
- white →
tMap,tMetallicRoughness,tOcclusion,tOpacity(sample = 1.0, so the*Factoruniforms fully control the material and opacity stays fully opaque) - black →
tEmissive(no emission),tNormal(paired withhasNormalMap: 0so the shader keeps the geometric normal — the normal map path uses screen-space derivatives and must not run on garbage data)
- white →
- Set ALL
Materialfactors once at init — they live in their own uniform (material, binding 12;pbr.wgslhas noUniformsblock, the engine'scamera/objectcome from group 1), so you own thatUniformBuffer. Unset fields are zero, and a zeroedbaseColorFactorrenders black. Defaults that mean "plain mid-grey dielectric": seereferences/js-wiring.md. - Create the bind group with
shader.bindGroupLayout(0).createBindGroup({ name: resource })— keys are the WGSL names. With stockpbr.wgslgroup 0 is: 1tSpecular(cube view), 2shConstants(SH buffer), 3tBrdf(LUT view), 4iblSampler(linear, mipmap linear, clamp), 5tMap, 6tMetallicRoughness, 7tNormal, 8tOcclusion, 9tEmissive, 10materialSampler(linear, repeat), 11tOpacity, 12material. Binding 0 is unused; groups 1 and 3 are the engine's. - Verify with
npm run build(pipeline construction / reflection errors are runtime, but build catches JS/import mistakes) andnpm run validate:shadersfor folded WGSL. If a dev server check is possible, load the example view and check the console for device validation errors.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago Changed · -1 lines · +1 tokens per session a6d0373acf59
- 1mo ago Changed 96443a5dfbe1
- 1mo ago First seen · 105 lines · 96 tokens per session scan A df7855f127dd
pbr-shading is a skill published in the GitHub repository oframe/ogpu (163 stars, last pushed 3d ago), licensed Unlicense. It adds 97 tokens to every session and 1,762 once invoked, about $0.0004 per session on Opus 5.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.
Other skills, from other repositories
playtest-report
Structured playtest report template, or turn existing playtest notes into structured feedback.
godot-signals-groups
Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…
motion
Reconstruct a skeleton from calibrated mesh projections and sequential VLM joint annotations, then fit joints and skin weights. Generate motion from joint-position trajectories, rhythm and contact constraints through IK; refine bone orientation against the action, then export, retarget and validate on the target mesh.
unity-addressables
Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).
unity-manual-component
Manually add, configure, reorder, and copy components on GameObjects using Unity Editor UI. For one-off Inspector workflows that do not need REST automation.
threejs-exposure-color-grading
Build a measured exposure and grading path in Three.js. Use for a 64x36 encoded luminance meter, asynchronous readback, weighted log-average exposure, asymmetric adaptation, single tone-map ownership, and a generated 32-cube post-tone-map LUT.