threejs-shaders
Installation
SKILL.md
Three.js Shaders
Work Pattern
- Use built-in materials plus
onBeforeCompilewhen you need PBR lighting with small shader changes; useShaderMaterialfor fully custom effects. - Define every uniform, attribute, varying, color space expectation, and animation update path explicitly.
- Keep shader code small first, verify coordinate spaces, then add lighting, texture sampling, noise, and post effects incrementally.
- Pair with
threejs-materialsfor material tradeoffs,threejs-geometryfor attributes, andthreejs-postprocessingfor screen-space effects.
Quick Start
import * as THREE from "three";