SoTransparencyTypeTransparencyTypes Enumeration |
Various levels of transparency rendering quality.
Namespace: OIV.Inventor.Nodes
Member name | Value | Description | |
---|---|---|---|
SCREEN_DOOR | 0 | Uses stipple patterns to simulate transparency. Note: This algorithm is very fast because it does not require blending, shaders or sorting. However most applications should use one of the other algorithms. Screen door rendering is low quality and only works for polygons with a single transparency (alpha) value for the entire face. Screen door does not correctly handle the case of transparency per vertex or transparent textures. | |
ADD | 1 | Uses additive alpha blending. | |
BLEND | 3 | Uses multiplicative alpha blending. | |
DELAYED_ADD | 2 | Uses additive blending, rendering all transparent objects after opaque ones. Note: When using this algorithm the OpenGL depth buffer is not updated (depth buffer writes are disabled) while rendering transparent objects. As a result complex 3D shapes may not be rendered correctly. | |
DELAYED_BLEND | 4 | Uses multiplicative alpha blending, rendering all transparent objects after opaque ones. Note: When using this algorithm the OpenGL depth buffer is not updated (depth buffer writes are disabled) while rendering transparent objects. As a result complex 3D shapes may not be rendered correctly. | |
SORTED_OBJECT_ADD | 5 | Same as DELAYED_ADD, but sorts transparent objects by distances of bounding boxes from camera. | |
SORTED_OBJECT_BLEND | 6 | Same as DELAYED_BLEND, but sorts transparent objects by distances of bounding boxes from camera. | |
SORTED_TRIANGLES_ADD | 9 | Renders all the transparent triangles of the scene using additive blending. All of the transparent triangles of all objects of the scene are collected, and then sorted by triangle position. | |
SORTED_TRIANGLES_BLEND | 10 | Same as SORTED_TRIANGLES_ADD, but uses multiplicative alpha blending. | |
SORTED_OBJECT_TRIANGLES_ADD | 11 | Renders all the transparent triangles of the scene using additive blending. All of the triangles of all transparent objects of the scene are collected and then sorted by object. | |
SORTED_OBJECT_TRIANGLES_BLEND | 12 | Same as SORTED_OBJECT_TRIANGLES_ADD, but uses multiplicative alpha blending. | |
SORTED_PIXELS_BLEND | 7 | Uses a fragment-level depth sorting technique. This mode generally gives the best results for complex transparent objects. Since Open Inventor 9.4, if the hardware supports the necessary OpenGL features, this transparency mode (and DELAYED_SORTED_PIXELS_BLEND) 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 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 setSortedLayersNumPasses() allows you to set the number of rendering passes for more correct transparency. Usually, four passes gives good results. Please note that since some transparency algorithms rely on multi-pass techniques based on the depth of the polygon, there can be issues if several polygons are rendered at the same depth, resulting in incorrect blending. However, rendering polygons at the same depth is highly discouraged even without using advanced transparency since it can result in Z-fighting. Consider using an SoPolygonOffset or SoDepthOffset node to alleviate this issue. If the graphics board does not support multi-pass transparency, SORTED_OBJECT_BLEND 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_FragData[0] directly. In the SDK installation, see shaders/include/Inventor/oivDepthPeeling_frag.h Limitations:
| |
SORTED_LAYERS_BLEND | 7 | Obsolete. Deprecated name of SORTED_PIXELS_BLEND. Obsoletesince Open Inventor 9400 It corresponds to the SORTED_PIXELS_BLEND transparency type. | |
DELAYED_SORTED_PIXELS_BLEND | 8 | Same as SORTED_PIXELS_BLEND but rendering all transparent objects after opaque ones. See limitations section for SORTED_PIXELS_BLEND! | |
DELAYED_SORTED_LAYERS_BLEND | 8 | Obsolete. Deprecated name of DELAYED_SORTED_PIXELS_BLEND. Obsoletesince Open Inventor 9400 It corresponds to the DELAYED_SORTED_PIXELS_BLEND transparency type. | |
NO_TRANSPARENCY | 13 | Draw all objects as opaque ignoring their transparency. |