Hmm, I tested on the same browser the example you shared and also the post process example using both antialias: true and antialias: false and both work fine and I’m getting 4 and 0 samples. No WebGL warning for the framebuffer blit.
I haven’t thought to enable antialias in the Post Process example that one does a scene grab as well so the setup should be somewhat similar.
I’m going to debug that one too and compare to what I’m getting on our side and see where’s the difference. Thanks Martin!
Yes, using the stencil seems to work fine on our side, we just don’t know if this is a proper fix. On the long run I guess PC should try to match the buffer formats or do some conversion.
Writing the depth back to the canvas target via gl_FragDepth works for us in order to render UI after post-effects with correct depth culling. The following steps are needed:
1.) enable depth buffer access for your last post-effect this.needsDepthBuffer = true;
2.) be sure to use glsl version 300 and add shader code to comfortable access depth