PMREM causes seams on Nvidia GPUs with anisotropic filtering enabled
See original GitHub issueDescription of the problem
When adding an equirectangular environment map to a scene using THREE.WebGLRenderTargetCube.fromEquirectangularTexture
and using the PMREMGenerator
on Nvidia GPUs in both Firefox and Chrome on Windows, anisotropic filtering causes seams in the lighting of the 3D model. You can see this happening in the screenshot of the EXR environment map example below.
https://threejs.org/examples/?q=env#webgl_materials_envmaps_exr
The seams are present independent of the settings, so for EXR, PNG and JPG, any metalness / roughness and exposure. They’re not present in IE or Edge, not on an Adreno GPU on Android and not on a Chromebook.
Nvidia’s default settings enable anisotropic filtering in the control panel for the GTX 1070 and GTX 2060 (Mobile). When you disable anisotropic filtering for Chrome and Firefox, the seams are gone. This is unfortunate, because most users won’t disable anisotropic filtering manually, so they’ll see the seams.
Am I missing some setting that fixes this? I tried changing some texture filtering, wrapping and anisotropy settings, but to no avail. I believe this was not caused by any recent change, because I encountered the issue earlier this year as well.
Three.js version
- Dev
- r110
Browser
- Chrome
- Firefox
- Internet Explorer
- Edge
OS
- Windows
- Android
- Chrome OS
Hardware Requirements
- Nvidia GTX 1070
- Nvidia GTX 2060 (Mobile)
- Adreno 630 (OS: Android)
- Some integrated Intel GPU for Chromebook
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I was able to reproduce, however these seams are unrelated with
fromEquirectangularTexture
. Seams are being introduced byPMREMGenerator
.PMREM:
without:
Thanks for looking into this @sciecode! I changed the title and the issue to match your findings. I also noticed the comment in the file and apparently PMREM is going to be replaced by @elalish? https://github.com/mrdoob/three.js/issues/16409#issuecomment-548830788