Archived issue #0032648
Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
Description
OpenGl_FrameBuffer builds FBO with texture attachments for proper rendering workflow.
MSAA textures are supported since OpenGL 3.2+ and OpenGL ES 3.1+, which is fine for modern desktop and mobile environments.
Unfortunately, WebGL 2.0 has been stuck in the past and functionally limited to OpenGL ES 3.0, with no extensions available for MSAA textures.
At the same time, OpenGL ES 3.0 / WebGL 2.0 support MSAA render-targets - a limited semi-broken API which might be used to implement anti-aliasing on such platforms.
It is proposed trying to implement support of MSAA render-targets for compatibility with such environments.
MSAA textures are supported since OpenGL 3.2+ and OpenGL ES 3.1+, which is fine for modern desktop and mobile environments.
Unfortunately, WebGL 2.0 has been stuck in the past and functionally limited to OpenGL ES 3.0, with no extensions available for MSAA textures.
At the same time, OpenGL ES 3.0 / WebGL 2.0 support MSAA render-targets - a limited semi-broken API which might be used to implement anti-aliasing on such platforms.
It is proposed trying to implement support of MSAA render-targets for compatibility with such environments.
Steps to reproduce
test opengles3 general msaa 1
Public activity
13 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 2 16:23:25 2021 +0300
0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 2 16:23:25 2021 +0300
0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 2 16:23:25 2021 +0300
0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
OpenGl_FrameBuffer::Init() now creates MSAA render buffer in case if MSAA textures are unsupported.
In this case OpenGl_View::prepareFrameBuffers() creates MSAA render buffer for main content
and non-MSAA FBO for immediate content as blitting of MSAA render buffers into MSAA targets is unsupported by OpenGL ES 3.0.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 2 16:23:25 2021 +0300
0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0
OpenGl_FrameBuffer::Init() now creates MSAA render buffer in case if MSAA textures are unsupported.
In this case OpenGl_View::prepareFrameBuffers() creates MSAA render buffer for main content
and non-MSAA FBO for immediate content as blitting of MSAA render buffers into MSAA targets is unsupported by OpenGL ES 3.0.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Patch caused tests failures on Jenkins due to older ANGLE libraries being loaded from qt5.11.2 installation instead of custom builds. The error occurs within the valid glBlitFramebuffer() call and lands somewhere inside ANGLE trying to create some shading program using D3D11:
Versions tracked from weird hash codes within ANGLE git, so it seems the bug has been fixed a while ago (problem is not reproducible in Browsers within WASM builds):
ANGLE 2.1.0.8613f4946861 from qt5.11.2-vc14-64 [2016-02-11]
KO, glBlitFramebuffer() fails with MSAA render buffer.
ANGLE 2.1.0-46ad513f4e5b (occt700products) [2016-08-13]
OK, but there is a bug with window resizing.
ANGLE 2.1.0-57ea533f79a7 from qtcreator-4.13, MinGW64 [2017-11-23]
OK.
Failed to create shader resource view to resolve multisampled framebuffer.
Versions tracked from weird hash codes within ANGLE git, so it seems the bug has been fixed a while ago (problem is not reproducible in Browsers within WASM builds):
ANGLE 2.1.0.8613f4946861 from qt5.11.2-vc14-64 [2016-02-11]
KO, glBlitFramebuffer() fails with MSAA render buffer.
ANGLE 2.1.0-46ad513f4e5b (occt700products) [2016-08-13]
OK, but there is a bug with window resizing.
ANGLE 2.1.0-57ea533f79a7 from qtcreator-4.13, MinGW64 [2017-11-23]
OK.
Patch is ready for review
- OCCT: branch CR32648_1.
http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32648_1-master-KGV/
- OCCT: branch CR32648_1.
http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32648_1-master-KGV/
The patch was reviewed without remarks
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17763.090000000444 / 17742.320000000425 [+0.12%]
Products
Total CPU difference: 11658.550000000125 / 11669.660000000133 [-0.10%]
Windows-64-VC14:
OCCT
Total CPU difference: 19745.71875 / 19762.140625 [-0.08%]
Products
Total CPU difference: 13066.0625 / 12843.21875 [+1.74%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17763.090000000444 / 17742.320000000425 [+0.12%]
Products
Total CPU difference: 11658.550000000125 / 11669.660000000133 [-0.10%]
Windows-64-VC14:
OCCT
Total CPU difference: 19745.71875 / 19762.140625 [-0.08%]
Products
Total CPU difference: 13066.0625 / 12843.21875 [+1.74%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch was integrated at IR-2021-11-19
Related records