This MIT-licensed repository is the original browser-local LightBaker for Three.js: a maintained WebGL package and reference implementation. The separate lightbaker-web repository contains the newer public Studio/client surface; its public deployment is intentionally held until the hosted backend is ready.
This package is intentionally WebGL-only. It requires THREE.WebGLRenderer. THREE.WebGPURenderer is not supported, including its WebGL fallback mode. WebGPU, cloud/headless execution, and the next-generation baking backend are not developed in this repository.
Try the baker in the browser: https://ibrahim-3d.github.io/three-lightmap-baker/ (desktop, WebGL2; a discrete GPU is recommended for full bakes). The playground source is apps/playground; run it locally with pnpm dev and build it with pnpm build:demo.
The documentation lives in /docs in this repository (the authoritative source); the repository Wiki can serve as a friendlier manual. GitHub Pages hosts the demo above.
npm install lightmap-baker three| Area | Supported |
|---|---|
| Three.js | >=0.185.1 <0.186.0 |
| Renderer | THREE.WebGLRenderer |
| Graphics API | WebGL 2 + EXT_color_buffer_float |
THREE.WebGPURenderer |
No |
WebGPURenderer({ forceWebGL: true }) |
No |
| Node/headless baking | No |
| Bake-target materials | MeshStandardMaterial, MeshPhysicalMaterial |
The bake pipeline uses WebGL2/GLSL ES 3.0 internally. That does not mean arbitrary application shaders are supported. Custom ShaderMaterial, RawShaderMaterial, node/TSL materials, and custom shader logic are outside the v1.1 bake-material contract.
Diffuse transport supports material.color × material.map, UV0/UV1, geometry groups/material arrays, shared material instances, and solid emissive color. Normal maps, roughness/metalness maps, emissiveMap, transparency/transmission, vertex colors, and custom shaders are not fully transported and may be approximated or ignored.
- Getting started
- API status
- Maintenance scope
- Light probes
- Architecture of the original package
- Changelog
The original playground/editor remains available in Git history. This repository now contains only the WebGL library, examples, documentation and correctness tests.
pnpm install --frozen-lockfile
pnpm run typecheck
pnpm run typecheck:examples
pnpm run build
pnpm run test:api-import
pnpm run test:correctnessBrowser correctness tests require Playwright Chromium. Hardware-dependent lighting quality needs a real GPU and should be checked on suitable hardware.
