SoGLRenderActionTransparencyTypes Enumeration |
Transparency rendering algorithm.
Namespace: OIV.Inventor.Actions
Member name | Value | Description | |||
---|---|---|---|---|---|
NO_TRANSPARENCY | 0 | Obsolete.
| |||
NO_SORT | 1 | The simplest transparency mode. Shapes are rendered in the same order as they are traversed. Alpha blending is used to combine the shape color with the color in the framebuffer. Depth buffer test and write are activated during rendering. Limitation: A shape will not be displayed if it is behind a semi-transparent shape that has been rendered before it. | |||
OPAQUE_FIRST | 2 | Same as NO_SORT, but the rendering of opaque objects is performed before the rendering of semi-transparent objects. Notes & Limitations:
| |||
SORTED_OBJECT | 3 | Same as OPAQUE_FIRST, but sorts semi-transparent objects by distances of bounding boxes from camera. Limitation : If the bounding box of a shape is ignored by setting its boundingBoxIgnoring field to true, the rendering won't be correct. | |||
SORTED_PIXEL | 4 | Same as OPAQUE_FIRST, but uses a fragment-level depth sorting technique during the rendering of semi-transparent objects. This mode generally gives the best results for complex semi-transparent objects. Since Open Inventor 9.4, if the hardware supports the necessary OpenGL features, this transparency mode is implemented using a single-pass, order-independent fragment sorting (K-buffer or A-buffer) algorithm. The required OpenGL hardware features are: shader_image_load_store, shader_atomic_counters and shading_language_420pack. These features are standard in core OpenGL 4.2. Use OIV.Inventor.Devices.SoGLExtension, if necessary, to check if they are supported. If the hardware does not support single-pass transparency, then a multi-pass "depth peeling" algorithm is used. The required OpenGL hardware features are: Multi-Texture, Texture Environment Combine, Depth texture, and Shadow . These features are standard starting with OpenGL 1.4. The method OIV.Inventor.Actions.SoGLRenderAction.SetSortedLayersNumPasses(System.Int32) allows you to set the number of rendering passes for more correct transparency. Usually, four passes gives good results. If the graphics board does not support multi-pass transparency, SORTED_OBJECT is used. Note: If the application uses fragment sorting transparency and specifies a custom fragment shader, the application shader must call an Open Inventor GLSL method instead of setting gl_FragColor directly. See TransparencyShaders for details. Limitations:
|
Note: The transparency values deprecated since OpenInventor 9 have been removed. You can find below a correspondence table:
OIV 10 | OIV 9 |
NO_SORT | NO_SORT NO_TRANSPARENCY SCREEN_DOOR ADD BLEND |
OPAQUE_FIRST | OPAQUE_FIRST DELAYED_ADD DELAYED_BLEND |
SORTED_OBJECT | SORTED_OBJECT SORTED_OBJECT_ADD SORTED_OBJECT_BLEND |
SORTED_PIXEL | SORTED_PIXEL SORTED_LAYERS_BLEND SORTED_PIXELS_BLEND DELAYED_SORTED_LAYERS_BLEND DELAYED_SORTED_PIXELS_BLEND SORTED_TRIANGLES_ADD SORTED_TRIANGLES_BLEND SORTED_OBJECT_TRIANGLES_ADD SORTED_OBJECT_TRIANGLES_BLEND |