-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Open
Labels
Milestone
Description
Description
Lighting does not work at all when setting an environment map smaller than 64x64 to Scene.environment
. Creating a small map on the fly is useful when generating basic, soft gradient lighting. I suspect this may be related to PMREMGenerator. The texture still works if it's set as a background.
64x64 | 63x63 |
---|---|
![]() |
![]() |
Reproduction steps
- Create a DataTexture with dimensions of 63x63 with white data
- Set mapping to "EquirectangularReflectionMapping"
- Lighting does not work
Code
const dim = 64; // NOTE: Lighting does not work if this value is changed to < 64
const tex = new THREE.DataTexture( new Uint8Array( dim * dim * 4 ).fill( 255 ), dim, dim );
tex.mapping = THREE.EquirectangularReflectionMapping;
tex.needsUpdate = true;
scene.environment = tex;
Live example
https://jsfiddle.net/y48Lqt1m/
Screenshots
No response
Version
r161
Device
Desktop
Browser
Chrome
OS
MacOS
Mugen87