Skip to content

MeshLambertMaterial: Add support for scene.environment IBL.#32791

Merged
mrdoob merged 2 commits intodevfrom
lambert-ibl
Jan 19, 2026
Merged

MeshLambertMaterial: Add support for scene.environment IBL.#32791
mrdoob merged 2 commits intodevfrom
lambert-ibl

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Jan 19, 2026

Description:

Adds image-based lighting (IBL) support to MeshLambertMaterial, allowing it to receive indirect diffuse lighting from scene.environment. This enables some Collada files to be properly lit in the editor and other scenes using environment-based lighting.

@mrdoob mrdoob added this to the r183 milestone Jan 19, 2026
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 355.66
84.54
356.13
84.63
+475 B
+83 B
WebGPU 621.5
172.57
621.5
172.57
+0 B
+0 B
WebGPU Nodes 620.1
172.33
620.1
172.33
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 487.9
119.45
488.37
119.53
+476 B
+80 B
WebGPU 691.97
187.85
692.03
187.86
+62 B
+3 B
WebGPU Nodes 641.77
175.02
641.77
175.02
+0 B
+0 B

Enables MeshLambertMaterial to receive image-based lighting from
scene.environment, adding diffuse irradiance for more realistic
ambient lighting without the cost of MeshStandardMaterial.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add iblIrradiance to irradiance in lights_fragment_end for Lambert
- Skip classic envmap blending when using PMREM (ENVMAP_TYPE_CUBE_UV)

The classic envmap_fragment code was multiplying outgoingLight by black
when using PMREM textures, since it couldn't sample them as cubemaps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mrdoob mrdoob merged commit 77097b7 into dev Jan 19, 2026
10 checks passed
@mrdoob mrdoob deleted the lambert-ibl branch January 19, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant