Click or drag to resize
SoGLRenderActionTransparencyTypes Enumeration

Transparency rendering algorithm.

Namespace: OIV.Inventor.Actions
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 10.3.0.0 (10.3.0.0)
Syntax
public enum TransparencyTypes
Members
  Member nameValueDescription
NO_TRANSPARENCY0 Obsolete.

Obsoletesince Open Inventor 10000.

No longer supported. Will automatically switch to NO_SORT.

NO_SORT1

Uses simple alpha blending.

Note that depth buffer is activated during rendering.

OPAQUE_FIRST2

Same as NO_SORT, but the rendering of opaque objects is performed before the rendering of transparent objects.

Note: When using this algorithm, the depth buffer is not updated (depth buffer writes are disabled) during the rendering of transparent objects. As a result, complex transparent shapes may not be rendered correctly.

SORTED_OBJECT3

Same as OPAQUE_FIRST, but sorts transparent objects by distances of bounding boxes from camera.

SORTED_PIXEL4

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 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. In the SDK installation, see shaders/include/Inventor/oivDepthPeeling_frag.h

Limitations:

  • This transparency type is not compatible with interlaced stereo.

  • Texturing on transparent objects is limited to one texture.

  • Using the single-pass algorithm, it is possible to run out of GPU memory for storing fragment transparency values. This should only happen for scenes with both high depth complexity and a large number of transparent objects. In this case fragments from the objects traversed last in the scene graph may not be sorted correctly, resulting in small artifacts.

  • Not compatible with FSAA. use SUPERSAMPLING, FXAA or SMAA instead.

Remarks

See OIV.Inventor.Actions.SoGLRenderAction.SetTransparencyType(OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes) method.

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

See Also