渲染后改变各向异性不起作用

发布于 2025-01-17 08:59:16 字数 1056 浏览 1 评论 0 原文

我在更新上面的三个版本137上更新 - 如果我更改各向异性在渲染对象后,它会破坏对象上的材料。

例如,让我们从三个示例中使用 webgl_loader_texture_tga.html 。现在,让我们添加到 init()

scene.background = new THREE.Color()
window.setTimeout( () => {

    mesh2.material.map.anisotropy = 16;
    mesh2.material.map.needsUpdate = true;

}, 1000 );

超时运行后,对象更改为黑色,然后将这些警告转到控制台:

[.WebGL-00005420002AC600] GL_INVALID_OPERATION: Level of detail outside of range.
[.WebGL-00005420002AC600] GL_INVALID_OPERATION: Texture format does not support mipmap generation.

“在对象被渲染后更改各向异性,使对象的材料破裂材料”

编辑:

可以在此处找到实时示例: https://codepen.io/kajbo/笔/mdpwybo

请注意,如果将更改为137或以下的三个版本,则所有内容都按预期工作。

I have problem with updating THREE above version 137 - If I change anisotropy after an object was rendered, it breaks the material on the object.

For example, let's use from three.js examples webgl_loader_texture_tga.html. Now let's add into init():

scene.background = new THREE.Color()
window.setTimeout( () => {

    mesh2.material.map.anisotropy = 16;
    mesh2.material.map.needsUpdate = true;

}, 1000 );

After timeout runs, object changes into black and we get these warnings to the console:

[.WebGL-00005420002AC600] GL_INVALID_OPERATION: Level of detail outside of range.
[.WebGL-00005420002AC600] GL_INVALID_OPERATION: Texture format does not support mipmap generation.

changing anisotropy after object object is rendered breaks material of the object

EDIT:

Live example can be found here: https://codepen.io/kajbo/pen/mdpwybO

Please notice that if you change THREE version to 137 or below everything works as expected.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海不蓝 2025-01-24 08:59:16

这实际上是 three.js 中的错误。我已经在GitHub提交了PR解决此问题: https://github.com/ MrDOOB/TRIX.JS/PULL/23808

This is actually a bug in three.js. I have filed a PR at GitHub to solve this issue: https://github.com/mrdoob/three.js/pull/23808

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文