0
我一直在试图添加纹理[.CommandBufferContext]渲染警告:没有质感绑定到单元1的test.html:1
var bumptexture = THREE.ImageUtils.loadTexture('grid.jpg');
var normaltexture = THREE.ImageUtils.loadTexture("normal.jpg");
var diffusetexture = THREE.ImageUtils.loadTexture("diffuse.jpg");
var material2 = new THREE.MeshPhongMaterial({
color: 0xaaaaaa,
ambient: 0xaaaaaa,
specular: 0x333333,
map: diffusetexture,
bumpMap: bumptexture,
bumpMapScale: 1,
normalMap:normaltexture,
normalScale: (1,1),
shininess: 10
但我一直收到此错误。
[.CommandBufferContext] RENDER警告:没有纹理结合到 单元1的test.html:1 [.CommandBufferContext] RENDER警告:存在 没有纹理结合到单元0的test.html:1 [.CommandBufferContext]渲染警告:没有质感势必 单位1
我使用three.js所
我没有得到这个错误。你可以在jsfiddle上显示一个实例吗?和你正在使用哪个three.js版本? –
由于代码异步加载纹理,因此小提琴将变得非常困难。这实际上可能是问题。在尝试使用它们之前,请确保纹理已加载资源。在问题中提供的代码中的任何纹理加载中都没有指定onLoad函数。看到这个特定的答案:http://stackoverflow.com/a/36115889/3311552 – Radio