浏览代码

#7245: Added missing support for texture arrays

Marius Kintel 9 年之前
父节点
当前提交
65933fe239
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/renderers/WebGLRenderer.js

+ 5 - 1
src/renderers/WebGLRenderer.js

@@ -2366,9 +2366,13 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 							setCubeTexture( texture, textureUnit );
 							setCubeTexture( texture, textureUnit );
 
 
+						} else if ( texture instanceof THREE.WebGLRenderTarget ) {
+
+							_this.setTexture( texture.texture, textureUnit );
+
 						} else if ( texture instanceof THREE.WebGLRenderTargetCube ) {
 						} else if ( texture instanceof THREE.WebGLRenderTargetCube ) {
 
 
-							setCubeTextureDynamic( texture, textureUnit );
+							setCubeTextureDynamic( texture.texture, textureUnit );
 
 
 						} else {
 						} else {