Browse Source

Merge branch 'dev' of https://github.com/mrdoob/three.js into dev

Mr.doob 9 years ago
parent
commit
acfeda0019
2 changed files with 2 additions and 1 deletions
  1. 1 0
      src/renderers/WebGLRenderTargetCube.js
  2. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 0
src/renderers/WebGLRenderTargetCube.js

@@ -7,6 +7,7 @@ THREE.WebGLRenderTargetCube = function ( width, height, options ) {
 	THREE.WebGLRenderTarget.call( this, width, height, options );
 	THREE.WebGLRenderTarget.call( this, width, height, options );
 
 
 	this.activeCubeFace = 0; // PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5
 	this.activeCubeFace = 0; // PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5
+	this.activeMipMapLevel = 0;
 
 
 };
 };
 
 

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -3391,7 +3391,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		if ( isCube ) {
 		if ( isCube ) {
 
 
 			var textureProperties = properties.get( renderTarget.texture );
 			var textureProperties = properties.get( renderTarget.texture );
-			_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + renderTarget.activeCubeFace, textureProperties.__webglTexture, 0 );
+			_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + renderTarget.activeCubeFace, textureProperties.__webglTexture, renderTarget.activeMipMapLevel );
 
 
 		}
 		}