Different orientation for PlaneBufferGeometry in chrome vs. firefox

孤者浪人 提交于 2019-12-24 11:27:57

问题


I've created a sample to show what I'm seeing: https://haddons.net/threejs/chrome_firefox.html

I have a basic model that's loading a texture onto a plane and also pulling in some heightmap data. If I load it in chrome the texture is oriented in one direction and if I load it in firefox it's rotated 180 degrees.

Am I doing something wrong or is this a firefox, chrome or three.js bug?


回答1:


Unfortunately, this is a bug in the current version of three.js (R102). It will be fixed with the next release by this PR.

The problem was that textures were flipped if a resize was necessary. This always happens if you try to use mipmapping with a NPOT texture. A workaround is to configure your texture like the following, to use POT textures or WebGL 2:

texture.minFilter = THREE.LinearFilter;


来源:https://stackoverflow.com/questions/55180153/different-orientation-for-planebuffergeometry-in-chrome-vs-firefox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!