WebGLMultisampleRenderTarget not support DepthTexture ?
See original GitHub issuecode
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
WebGLMultisampleRenderTarget not support DepthTexture?
No, this use case is not supported so far. Just the basic setup. It's also not possible use a multisampled WebGLRenderTargetCube . You...
Read more >DepthTexture - Verge3D User Manual - Soft8Soft
When using a WebGL 1 rendering context, DepthTexture requires support for the ... Depth textures do not need to be flipped so this...
Read more >Three.js post-processing: How to keep depth texture for ...
copyTexImage2D seem to not support copying from the depth buffer. using a shader to pack the depth buffer after the first pass into...
Read more >[threejs-journey] Part 9 - Поделиться Курсом / Книгой / и тд.
If the pixel ratio is 1 and the browser supports WebGL 2, we use a WebGLMultisampleRenderTarget. If the pixel ratio is 1 but...
Read more >Using a custom depth texture source with post processes ...
But that is another fullscreen pass, so also not ideal. ... To support using a custom depth texture in place of the DepthRenderer,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Okay, I’ve created a live example with plain WebGL that reproduces the issue. I hope this makes it easier to analyze the issue:
https://windy-rocket.glitch.me/
The interesting code section is:
For code editing, use: https://glitch.com/~windy-rocket