AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

Three.js Lighting Guide

A precise three.js r186 reference for light types, physical units, shadow maps, HDR environment lighting and performance — covering both WebGL and WebGPU/TSL.

Dev & CodingIntermediate★ 497⑂ 55AI score 9/10Last updated: Nov 24, 2026

What it does

  • Gives a comparison table of every light type (AmbientLight, HemisphereLight, DirectionalLight, SunLight, PointLight, SpotLight, RectAreaLight, LightProbe) with its physical unit (candela, nits, plain multiplier) so you pick sane intensity values.
  • Walks through the three shadow switches (renderer, light, meshes), shadow-camera frustum tuning, shadow acne fixes via bias/normalBias, and PCF vs VSM trade-offs.
  • Covers HDR image-based lighting: equirect mapping, environmentIntensity, environmentRotation, and when PMREMGenerator is actually needed.
  • Includes light probes, ready-made setups (three-point lighting, outdoor daylight), cheap fake contact shadows, and performance pitfalls like material recompiles when lights are added or removed.
  • A dedicated WebGPU/TSL section: registering SunLightNode, RectAreaLightTexturesLib, ClusteredLighting, and per-material lightsNode.

Who it's for

  • Frontend/WebGL developers building product viewers, games or interactive 3D sites with three.js.
  • Anyone fighting ugly shadow artifacts or lights that look far too dim or blown out.
  • Teams migrating from WebGLRenderer to WebGPURenderer and TSL node materials.

Examples

  1. "I added a PointLight but the scene is nearly black" → learn that intensity is candela with inverse-square falloff and retune from 1 to a few hundred.
  2. "My floor has striping shadow acne" → apply normalBias = 0.02, bias = -0.0001 and tighten the shadow camera frustum.
  3. "My HDR background renders flat like a 2D image" → spot the missing hdr.mapping = THREE.EquirectangularReflectionMapping.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/aiskillstore/marketplace/HEAD/pending/cloudai-x/threejs-lighting/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI Skill Mart.
Copy the pending/cloudai-x/threejs-lighting folder from the GitHub repo aiskillstore/marketplace into my ~/.claude/skills/threejs-lighting/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/aiskillstore/marketplace.git && mkdir -p ~/.claude/skills && cp -r marketplace/pending/cloudai-x/threejs-lighting ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open your terminal.
  2. Clone the repository: git clone https://github.com/aiskillstore/marketplace.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r marketplace/pending/cloudai-x/threejs-lighting ~/.claude/skills/
  5. Verify that ~/.claude/skills/threejs-lighting/SKILL.md exists.
  6. Restart Claude Code — the skill activates automatically when you ask about three.js lights, shadows or environment maps.