threejs-materials-lighting

threejs-materials-lighting is a skill for Claude Code from gamedev-skills/awesome-gamedev-agent-skills. It costs 121 tokens per session (1,858 once invoked), scanned A, original, Apache-2.0.

A guide to making surfaces in a three.js scene look correct by choosing materials, adding lights, enabling shadows, and using environment maps. An environment map is an image-based light source that can also create realistic reflections.

In plain words
What is it for?
Use it to choose realistic or unlit materials, add common light types, enable shadow maps, and set up image-based lighting for reflections.
Why use it?
It helps explain why a 3D model looks black, flat, or incorrectly shaded. It connects the model's material settings with the lights and shadows in the scene.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the web-engines plugin — 6 skills shipped together , and of gamedev

Good fit Use it to choose realistic or unlit materials, add common light types, enable shadow maps, and set up image-based lighting for reflections.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gamedev-skills/awesome-gamedev-agent-skills/threejs-materials-lighting
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 gamedev-skills/awesome-gamedev-agent-skills --skill threejs-materials-lighting
Clone the repo
git clone --depth 1 https://github.com/gamedev-skills/awesome-gamedev-agent-skills

Made for: Claude Code.

Or install web-engines, the plugin that ships this one along with the rest of its 6 skills.

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 threejs-materials-lighting

README.md
[![agentmods](https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/threejs-materials-lighting/github.svg)](https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/threejs-materials-lighting)
Your own site
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/threejs-materials-lighting"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/threejs-materials-lighting/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 threejs-materials-lighting

Your own site · 80×15
<a href="https://agentmods.dev/skills/gamedev-skills/awesome-gamedev-agent-skills/threejs-materials-lighting"><img src="https://agentmods.dev/badge/skills/gamedev-skills/awesome-gamedev-agent-skills/threejs-materials-lighting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,858 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
  • Socket pass 9 Aug 2026
  • Snyk pass 9 Aug 2026
  • 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.00121 $0.01858
Opus 5 $0.00060 $0.00929
Sonnet 5 $0.00024 $0.00372
Haiku 4.5 $0.00012 $0.00186

Measured 9d ago against content hash 39de0912bb8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

threejs-materials-lighting 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 9d 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.

skills/web-engines/threejs-materials-lighting/SKILL.md · 171 lines

How it starts

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

three.js Materials & Lighting

Make three.js surfaces look right: pick the correct material, light the scene, enable shadows, and add image-based lighting. Patterns target r184, verified against r184 (lighting is physically based by default since r155).

When to use

  • Use when a mesh renders black or flat, when choosing a material, adding lights, enabling shadows, or setting up environment-map reflections (IBL).
  • Use when code constructs MeshStandardMaterial, DirectionalLight, etc., or sets renderer.shadowMap.enabled or scene.environment.

When not to use: the renderer/camera/loop → threejs-scene-setup. Loading models (whose PBR materials this complements) → threejs-gltf-loading. Custom GLSL/ShaderMaterial is its own topic; for the portable concept see shader-programming.

Core workflow

  1. Pick a material by need. MeshStandardMaterial (PBR: roughness, metalness, reacts to lights/IBL) for realism; MeshPhysicalMaterial for clearcoat/transmission; MeshBasicMaterial (unlit, ignores lights) for UI/flat; MeshNormalMaterial/MeshDepthMaterial for debugging.
  2. Add light, or nothing shows. Lit materials need a light source and/or scene.environment. Combine a soft fill (AmbientLight/HemisphereLight) with a key DirectionalLight.
  3. Mind light intensity. Since r155, lighting is physically based; modern intensities are higher than old tutorials (a key DirectionalLight ≈ 1–3).
  4. Enable shadows in three places. renderer.shadowMap.enabled = true, the light's castShadow = true, and each mesh's castShadow/receiveShadow. Then fit the light's shadow camera to the scene.
  5. Use an environment map for grounded reflections. Assign an equirectangular or PMREM-processed texture to scene.environment; PBR materials pick it up automatically.
  6. Verify under real lighting — confirm the surface responds to the key light (highlights move), shadows land where expected, and reflections look plausible.

Read the full file on GitHub · 171 lines

Files

What ships with it

1 file 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.

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. 9d ago First seen · 171 lines · 121 tokens per session scan A 39de0912bb8a

Subscribe to this mod's changes

threejs-materials-lighting is a skill published in the GitHub repository gamedev-skills/awesome-gamedev-agent-skills (952 stars, last pushed 2d ago), licensed Apache-2.0. It adds 121 tokens to every session and 1,858 once invoked, about $0.0006 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-09-03.