Threejs纹理 [英] Threejs Texture

查看:517
本文介绍了Threejs纹理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行渲染某些几何体时,我可以在控制台中看到这个警告:

When I execute my render of some geometry I can see in my console this warning:

THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.

我无法理解我的画布的原因和背景是完全黑的。

I can't understand the reason and the background of my canvas is completely black.

推荐答案

纹理的大小不是2的幂(即16x16,32x32,64x64 ......)。

The size of your texture is not powers of two (ie. 16x16, 32x32, 64x64 ...).

设置 yourTexture.minFilter = THREE.LinearFilter 以消除错误消息。

这篇关于Threejs纹理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆