mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
envMap requires active preview scene to load
This commit is contained in:
parent
ba15f2e251
commit
180a691bc5
@ -103,6 +103,12 @@ class TextureGroup {
|
||||
normalScale: new THREE.Vector2(-1),
|
||||
});
|
||||
}
|
||||
|
||||
if (PreviewScene.active) {
|
||||
const g = new THREE.PMREMGenerator(Preview.selected.renderer);
|
||||
material.envMap = g.fromScene(Canvas.scene, 0.0, 100, 1024).texture;
|
||||
}
|
||||
|
||||
let textures = this.getTextures();
|
||||
let color_tex = textures.find(t => t.pbr_channel == 'color');
|
||||
let normal_tex = textures.find(t => t.pbr_channel == 'normal');
|
||||
|
Loading…
Reference in New Issue
Block a user