Permalink
Browse files

Fixed mipmap generation for render targets in ANGLE.

  • Loading branch information...
1 parent 2a335b9 commit 367ee78804beca03b523901f2e95dc65a4b512d4 @alteredq committed Apr 4, 2012
Showing with 12 additions and 8 deletions.
  1. +4 −4 build/Three.js
  2. +4 −4 build/custom/ThreeWebGL.js
  3. +4 −0 src/renderers/WebGLRenderer.js
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -5864,6 +5864,8 @@ THREE.WebGLRenderer = function ( parameters ) {
}
+ if ( isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_CUBE_MAP );
+
} else {
renderTarget.__webglFramebuffer = _gl.createFramebuffer();
@@ -5877,6 +5879,8 @@ THREE.WebGLRenderer = function ( parameters ) {
setupFrameBuffer( renderTarget.__webglFramebuffer, renderTarget, _gl.TEXTURE_2D );
setupRenderBuffer( renderTarget.__webglRenderbuffer, renderTarget );
+ if ( isTargetPowerOfTwo ) _gl.generateMipmap( _gl.TEXTURE_2D );
+
}
// Release everything

0 comments on commit 367ee78

Please sign in to comment.