Closed prideout closed 3 years ago
This GL error occurs when the GL_DRAW_FRAMEBUFFER status is the following:
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
which means that the following spec clause has been violated:
The value of RENDERBUFFER_SAMPLES [must be] the same for all
attached renderbuffers and, if the attached images are a mix of
renderbuffers and textures, the value of RENDERBUFFER_SAMPLES
is zero.
Is this fixed now?
I can still reproduce this (Chrome 87 + macOS Catalina)
Hi,
I experience the same error ([.WebGL-0x395e5c67d000] GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomplete.). In the following demos/tutorials: https://google.github.io/filament/webgl/tutorial_triangle.html https://google.github.io/filament/webgl/tutorial_redball.html https://google.github.io/filament/webgl/tutorial_suzanne.html https://google.github.io/filament/webgl/parquet.html https://google.github.io/filament/webgl/suzanne.html https://google.github.io/filament/webgl/helmet.html
The system is Ubuntu 20.04 Chrome version: 87.0.4280.88
P.S. Surprisingly https://prideout.net/knotess/ demo works just fine for me.
@Mivr This is a known issue. Try Nightly Build.
On my machine (2017 MacBook), Chrome 87 does not support EXT_multisampled_render_to_texture so the following path is taken:
OpenGLDriver::createRenderTarget is creating two attachments: COLOR_ATTACHMENT0 and DEPTH_ATTACHMENT. The render target has 4 samples. The color attachment has 1 sample and the depth attachment has 4 samples. The usage flags are appropriately marked such that the color attachment is SAMPLEABLE and the depth attachment is not.
The here we emulate ext.EXT_multisampled_render_to_texture
path is taken for both attachments. Thus, ultimately there are four attachments:
1) renderbuffer attachment with 4 samples for color
2) non-ms texture attachment for color
3) renderbuffer attachment with 4 samples for depth
4) non-ms texture attachment for depth
This violates the spec rule that was mentioned in my Sept 28 comment, which was sourced from the ES 3.0 spec under Whole Framebuffer Completeness. This spec language was changed with ES 3.1. It became:
The value of RENDERBUFFER_SAMPLES [must be] the same for all attached renderbuffers;
the value of TEXTURE_SAMPLES is the same for all attached textures; and, if the attached
images are a mix of renderbuffers and textures, the value of RENDERBUFFER_SAMPLES
matches the value of TEXTURE_SAMPLES.
In theory Filament supports OpenGL ES 3.0, so we are non-conformant here. Also note that WebGL 2.0 is based on OpenGL ES 3.0.
@pixelflinger
grrr
following. getting the same error when msaa is enabled on webgl build.
OSX Chrome: 87.0.4280.141 Filament: 1.9.8
Firefox 78.6.1esr (blitFramebuffer: framebuffer not complete)
@prideout I am pleased with the release of Filament v1.9.11. However, I still seem to get an error on the Triangle Demo page. https://google.github.io/filament/webgl/tutorial_triangle.html
I think the version of Filament.js used in the demo page is old. (I think it's about v1.7.x
)
https://google.github.io/filament/webgl/filament.js
Thanks @cx20 , we'll update the site.
edit: This is done.
The web demos all work except the triangle demo, which does not render anything and emits the following in the console:
The triangle demo is the only WebGL demo that enables multisampling.