提交 c736a747 编写于 作者: M Mr.doob

Updated builds

上级 53e91323
......@@ -15171,11 +15171,11 @@
return texture.generateMipmaps && supportsMips && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;
}
function generateMipmap(target, texture, width, height) {
function generateMipmap(target, texture, width, height, depth = 1) {
_gl.generateMipmap(target);
const textureProperties = properties.get(texture);
textureProperties.__maxMipLevel = Math.log2(Math.max(width, height));
textureProperties.__maxMipLevel = Math.log2(Math.max(width, height, depth));
}
function getInternalFormat(internalFormatName, glFormat, glType) {
......@@ -15936,10 +15936,10 @@
setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType);
if (textureNeedsGenerateMipmaps(texture, supportsMips)) {
generateMipmap(_gl.TEXTURE_2D, texture, renderTarget.width, renderTarget.height);
generateMipmap(glTextureType, texture, renderTarget.width, renderTarget.height, renderTarget.depth);
}
state.bindTexture(_gl.TEXTURE_2D, null);
state.bindTexture(glTextureType, null);
} // Setup depth and stencil buffers
......@@ -16765,15 +16765,13 @@
viewport = baseLayer.getViewport(view);
} else {
const glSubImage = glBinding.getViewSubImage(glProjLayer, view);
gl.bindFramebuffer(gl.FRAMEBUFFER, glFramebuffer);
state.bindXRFramebuffer(glFramebuffer);
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, glSubImage.colorTexture, 0);
if (glSubImage.depthStencilTexture !== undefined) {
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, glSubImage.depthStencilTexture, 0);
}
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
state.bindXRFramebuffer(glFramebuffer);
viewport = glSubImage.viewport;
}
此差异已折叠。
......@@ -20394,13 +20394,13 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
}
function generateMipmap( target, texture, width, height ) {
function generateMipmap( target, texture, width, height, depth = 1 ) {
_gl.generateMipmap( target );
const textureProperties = properties.get( texture );
textureProperties.__maxMipLevel = Math.log2( Math.max( width, height ) );
textureProperties.__maxMipLevel = Math.log2( Math.max( width, height, depth ) );
}
......@@ -21502,11 +21502,11 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {
generateMipmap( 3553, texture, renderTarget.width, renderTarget.height );
generateMipmap( glTextureType, texture, renderTarget.width, renderTarget.height, renderTarget.depth );
}
state.bindTexture( 3553, null );
state.bindTexture( glTextureType, null );
}
......@@ -22667,7 +22667,7 @@ class WebXRManager extends EventDispatcher {
const glSubImage = glBinding.getViewSubImage( glProjLayer, view );
gl.bindFramebuffer( 36160, glFramebuffer );
state.bindXRFramebuffer( glFramebuffer );
gl.framebufferTexture2D( 36160, 36064, 3553, glSubImage.colorTexture, 0 );
......@@ -22677,10 +22677,6 @@ class WebXRManager extends EventDispatcher {
}
gl.bindFramebuffer( 36160, null );
state.bindXRFramebuffer( glFramebuffer );
viewport = glSubImage.viewport;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册