Archived issue #0027787
Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
Description
Optimize rendering by additional check whether the object is fully clipped or not
Steps to reproduce
bugs/vis/bug27751_capping
Public activity
14 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: Wed Aug 17 17:40:37 2016 +0300
0027787: Visualization -- Optimize rendering by additional check whether the object is fully clipped or not
[revision removed]
Detailed log of new commits:
Author: Author
Date: Wed Aug 17 17:40:37 2016 +0300
0027787: Visualization -- Optimize rendering by additional check whether the object is fully clipped or not
Dear kgv,
Please review the patch in branch CR27787.
Please review the patch in branch CR27787.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Wed Aug 17 17:40:37 2016 +0300
0027787: Visualization -- Optimize rendering by additional check whether the object is fully clipped or not
[revision removed]
Detailed log of new commits:
Author: Author
Date: Wed Aug 17 17:40:37 2016 +0300
0027787: Visualization -- Optimize rendering by additional check whether the object is fully clipped or not
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Thu Aug 18 19:28:08 2016 +0300
OpenGl_ShaderManager - define dedicated GLSL programs for one and two clipping planes
Author: Commenter 3
Date: Thu Aug 18 19:26:52 2016 +0300
fix disabling and enabling planes
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Thu Aug 18 19:28:08 2016 +0300
OpenGl_ShaderManager - define dedicated GLSL programs for one and two clipping planes
Author: Commenter 3
Date: Thu Aug 18 19:26:52 2016 +0300
fix disabling and enabling planes
Branch [archived branch] has been created by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Aug 18 19:41:05 2016 +0300
0027787: Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
OpenGl_Structure::Render() now checks if structure is entirely clipped to skip rendering at all,
or entirely NOT clipped to disable clipping / capping plane.
OpenGl_ShaderManager now defines dedicated GLSL programs for one and two clipping planes
to optimize rendering on slow hardware.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Aug 18 19:41:05 2016 +0300
0027787: Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
OpenGl_Structure::Render() now checks if structure is entirely clipped to skip rendering at all,
or entirely NOT clipped to disable clipping / capping plane.
OpenGl_ShaderManager now defines dedicated GLSL programs for one and two clipping planes
to optimize rendering on slow hardware.
Clipping on CPU side dramatically improves rendering performance of global clipping / capping plane applied on a complex scene:
- Skipping rendering of entire object is essential, when considerable part is scene is clipped (like in case of frustum culling).
- Disabling capping for objects far behind the plane dramatically reduces CPU (multiple rendering passes) and GPU usage.
This might improve performance in 10+ times depending on scene structure and complexity.
On test model FPS increased from 10 to 60, being highly CPU-limited in first case.
Using truncated shading program in case of single clipping plane (avoid for-loop in a fragment shader) improves rendering performance on slow hardware.
On PowerVR SGX 544MP patch increases FPS by two times (at best) in case of single clipping / capping plane.
On test model FPS increased from 14.9 to 30 for clipping (7.9 to 18.5 for capping), with 53 without clipping.
- Skipping rendering of entire object is essential, when considerable part is scene is clipped (like in case of frustum culling).
- Disabling capping for objects far behind the plane dramatically reduces CPU (multiple rendering passes) and GPU usage.
This might improve performance in 10+ times depending on scene structure and complexity.
On test model FPS increased from 10 to 60, being highly CPU-limited in first case.
Using truncated shading program in case of single clipping plane (avoid for-loop in a fragment shader) improves rendering performance on slow hardware.
On PowerVR SGX 544MP patch increases FPS by two times (at best) in case of single clipping / capping plane.
On test model FPS increased from 14.9 to 30 for clipping (7.9 to 18.5 for capping), with 53 without clipping.
Patch is ready for testing in branch CR27787_1.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear Commenter 1,
Branch CR27787_1 was rebased on current master of occt git-repository.
[revision removed]
Branch CR27787_1 was rebased on current master of occt git-repository.
[revision removed]
Dear Commenter 1,
Branch CR27787_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)
products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1152
Regressions/Differences/Improvements:
No regressions/differences
Testing cases:
http://occt-tests/CR27787_1-master-OCCT/Debian70-64/bugs/vis/bug27751_capping.html
http://occt-tests/CR27787_1-master-OCCT/Windows-64-VC10/bugs/vis/bug27751_capping.html
bugs vis bug27751_capping: OK
Testing on Linux:
occt component :
Total MEMORY difference: 90213577 / 89492510 [+0.81%]
Total CPU difference: 19468.28999999995 / 19495.580000000107 [-0.14%]
products component :
Total MEMORY difference: 30074211 / 30045379 [+0.10%]
Total CPU difference: 5083.799999999969 / 5077.5199999999795 [+0.12%]
Testing on Windows:
occt component :
Total MEMORY difference: 57178209 / 57161393 [+0.03%]
Total CPU difference: 18246.610164698755 / 18084.68112669885 [+0.90%]
products component :
Total MEMORY difference: 21298922 / 21261546 [+0.18%]
Total CPU difference: 4887.46452969995 / 4849.696687599947 [+0.78%]
There are no differences in images found by testdiff.
Branch CR27787_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)
products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1152
Regressions/Differences/Improvements:
No regressions/differences
Testing cases:
http://occt-tests/CR27787_1-master-OCCT/Debian70-64/bugs/vis/bug27751_capping.html
http://occt-tests/CR27787_1-master-OCCT/Windows-64-VC10/bugs/vis/bug27751_capping.html
bugs vis bug27751_capping: OK
Testing on Linux:
occt component :
Total MEMORY difference: 90213577 / 89492510 [+0.81%]
Total CPU difference: 19468.28999999995 / 19495.580000000107 [-0.14%]
products component :
Total MEMORY difference: 30074211 / 30045379 [+0.10%]
Total CPU difference: 5083.799999999969 / 5077.5199999999795 [+0.12%]
Testing on Windows:
occt component :
Total MEMORY difference: 57178209 / 57161393 [+0.03%]
Total CPU difference: 18246.610164698755 / 18084.68112669885 [+0.90%]
products component :
Total MEMORY difference: 21298922 / 21261546 [+0.18%]
Total CPU difference: 4887.46452969995 / 4849.696687599947 [+0.78%]
There are no differences in images found by testdiff.
Dear Commenter 1,
Branch CR27787_1 is TESTED.
Branch CR27787_1 is TESTED.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records