PMREMGenerator EnvMaps only work with one renderer
See original GitHub issueDescription of the problem
I don’t know if it is expected or if I miss something, but it looks like the envmap textures generated by PMREGenerator and the renderer specified at that time cannot be re-used with another renderer.
In this example, the envmap is generated using renderer. If the scene is rendered with renderer2, it doesn’t work.
Replace var pmremGenerator = new THREE.PMREMGenerator( renderer );
by var pmremGenerator = new THREE.PMREMGenerator( renderer2 );
on line 49 to check the difference.
Three.js version
- Dev
- r115
Browser
- All of them
OS
- All of them
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
PMREMGenerator, CubeCamera and envmap mirroring issues
The only (ugly) workaround so far is mirroring the entire scene along x-axis before the CC.update( renderer, scene ) , while properly ...
Read more >preprocessing an environment map with PMREMGenerator
So calling compileEquirectangularShader() just distributes some work to the application start. Next, I use TextureLoader to load the envmap ...
Read more >Three.js Realistic Material Reflection Tutorial - Red Stapler
In this tutorial we're going to show you how to create realistic material reflection in Three.js. This project can be done in just...
Read more >Three.js Generate Environment - JSFiddle - Code Playground
Create a cubemap with one RGBA pixel on each face ... const envMap = pmremGenerator. ... const controls = new OrbitControls(camera, renderer.domElement).
Read more >MeshStandardMaterial - Verge3D User Manual - Soft8Soft
Modulates the emissive color. Default is 1. # .envMap : Texture. The environment map. To ensure a physically correct rendering, you should only...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sciecode I see this a bit different since the issue I linked was focused about the valid combinations of
PMREMGenerator
andWebGLRenderer
. Hence, I think this discussion belongs to it.By the way, this is not a duplicate of #18976.
This is about sharing a texture between WebGL contexts, which is impossible due to WebGL limitations. The other issue was about using instances of
PMREMGenerator
with multiple contexts and having the textures replaced because of scoping, which was fixed with your PR.Issue should still be closed, because there’s nothing we can do about it. But I just wanted to be clear about it.