0027925: Visualization - implement order-independent transparency algorithm within...
authorapl <apl@opencascade.com>
Tue, 25 Apr 2017 12:10:15 +0000 (15:10 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 5 May 2017 08:27:47 +0000 (11:27 +0300)
commita1073ae267989cea79ceb5299b4f921da714616d
treec21621df34c5a77019e98fe2839309c8c9142816
parent9151562167eb4067ce1c0ccfc7e4b2bc3586814e
0027925: Visualization - implement order-independent transparency algorithm within rasterization rendering

Weighted, Blended Order-Independent Transparency algorithm has been added rasterization pipeline.
In contrast to classical blending transparency it makes transparent objects look independent
from point of view. It also gives better depth occlusion when being used together with a weight factor
based on value of a GL depth buffer. The feature supports desktop OpenGL, OpenGL ES 3.0, ANGLE
and can be used together with MSAA on desktop GL.

To be used it require availability of:
1) Shaders pipeline.
2) Floating point color format for framebuffer (GL_ARB_color_buffer_float).
3) Multiple render targets (GL_ARB_draw_buffers).

Patch does not modify API and does not require application porting.
It adds new rendering options to Graphic3d_RenderingParams structure:
a) Transparency method from enumeration.
b) Scalar factor [0-1] controlling influence of a fragment's depth to its visibility.

Patch also simplifies processing of transparent objects for standard method:
rendering priority of transparent graphical structures is managed automatically,
therefore there is no need to care about it at application's side.
41 files changed:
src/AIS/AIS_Shape.cxx
src/AIS/AIS_Triangulation.cxx
src/D3DHost/D3DHost_FrameBuffer.cxx
src/Graphic3d/FILES
src/Graphic3d/Graphic3d_RenderTransparentMethod.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_RenderingParams.hxx
src/Graphic3d/Graphic3d_TypeOfLimit.hxx
src/OpenGl/OpenGl_CappingAlgo.cxx
src/OpenGl/OpenGl_CappingAlgo.hxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_Element.hxx
src/OpenGl/OpenGl_FrameBuffer.cxx
src/OpenGl/OpenGl_FrameBuffer.hxx
src/OpenGl/OpenGl_GlFunctions.hxx
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_Layer.cxx
src/OpenGl/OpenGl_LayerList.cxx
src/OpenGl/OpenGl_LayerList.hxx
src/OpenGl/OpenGl_PrimitiveArray.hxx
src/OpenGl/OpenGl_RenderFilter.hxx
src/OpenGl/OpenGl_SetOfShaderPrograms.hxx
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_ShaderProgram.cxx
src/OpenGl/OpenGl_ShaderProgram.hxx
src/OpenGl/OpenGl_ShaderStates.hxx
src/OpenGl/OpenGl_Texture.cxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_Redraw.cxx
src/OpenGl/OpenGl_Workspace.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/Shaders/Declarations.glsl
src/Shaders/PhongShading.fs
src/Shaders/Shaders_Declarations_glsl.pxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/v3d/grids.list [changed mode: 0644->0755]
tests/v3d/transparency/begin [new file with mode: 0644]
tests/v3d/transparency/blend [new file with mode: 0644]
tests/v3d/transparency/highlight [new file with mode: 0644]