WebGLMultisampleRenderTarget not support DepthTexture ?

code
var depthTexture = new THREE.DepthTexture();

var parameters = {
    format: THREE.RGBFormat,
    stencilBuffer: false,
    depthBuffer: true,
    depthTexture: depthTexture
};

var size = renderer.getDrawingBufferSize( new THREE.Vector2() );

var renderTarget = new THREE.WebGLMultisampleRenderTarget( size.width, size.height, parameters );
output error:
[.WebGL-0x7fcad880e800]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

webgl2_multisampled_renderbuffers.html:1 [.WebGL-0x7fcad880e800]GL ERROR :GL_INVALID_OPERATION : glTexImage2D: <- error from previous GL command

254[.WebGL-0x7fcad880e800]GL ERROR :GL_INVALID_OPERATION : glFramebufferTexture2D: <- error from previous GL command
Three.js version
  • Dev
  • r114
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer

Author: Fantashit

1 thought on “WebGLMultisampleRenderTarget not support DepthTexture ?

  1. Thanks for the report and test case. It was necessary to reduce it further:
    https://glitch.com/edit/#!/equable-unleashed-grouse

    but yes, it looks like there’s a bug in Chrome in the handling of DEPTH_COMPONENT16 renderbuffers or textures in conjunction with blitFramebuffer. Firefox works fine with the test case.

    Have filed this as http://crbug.com/1062887 . We’ll investigate it.

    Using DEPTH_COMPONENT24 seems to be a workable workaround. Please let me know, or ideally comment on the Chromium bug, if not; that could motivate making it higher priority.

Comments are closed.