public static enum SoTransparencyTypeElement.TransparencyTypes extends java.lang.Enum<SoTransparencyTypeElement.TransparencyTypes> implements IntegerValuedEnum
Enum Constant and Description |
---|
ADD
Uses additive alpha blending.
|
BLEND
Uses multiplicative alpha blending.
|
DELAYED_ADD
Uses additive blending, rendering all transparent objects after opaque ones.
|
DELAYED_BLEND
Uses multiplicative alpha blending, rendering all transparent objects after opaque ones.
|
DELAYED_SORTED_LAYERS_BLEND
Deprecated.
As of Open Inventor 9400 See documentation for more details
|
DELAYED_SORTED_PIXELS_BLEND
Same as SORTED_PIXELS_BLEND but rendering all transparent objects after opaque ones.
|
NO_TRANSPARENCY
Draw all objects as opaque ignoring their transparency.
|
SCREEN_DOOR
Uses stipple patterns to simulate transparency.
|
SORTED_LAYERS_BLEND
Deprecated.
As of Open Inventor 9400 See documentation for more details
|
SORTED_OBJECT_ADD
Same as DELAYED_ADD, but sorts transparent objects by distances of bounding boxes from camera.
|
SORTED_OBJECT_BLEND
Same as DELAYED_BLEND, but sorts transparent objects by distances of bounding boxes from camera.
|
SORTED_OBJECT_TRIANGLES_ADD
Renders all the transparent triangles of the scene using additive blending.
|
SORTED_OBJECT_TRIANGLES_BLEND
Same as SORTED_OBJECT_TRIANGLES_ADD, but uses multiplicative alpha blending.
|
SORTED_PIXELS_BLEND
Uses a fragment-level depth sorting technique.
|
SORTED_TRIANGLES_ADD
Renders all the transparent triangles of the scene using additive blending.
|
SORTED_TRIANGLES_BLEND
Same as SORTED_TRIANGLES_ADD, but uses multiplicative alpha blending.
|
Modifier and Type | Method and Description |
---|---|
static SoTransparencyTypeElement.TransparencyTypes |
fromValue(int val)
Deprecated.
Use
valueOf(int) instead. |
int |
getValue()
Returns the integer value of the enum constant.
|
static SoTransparencyTypeElement.TransparencyTypes |
valueOf(int val)
Returns the enum constant of this type with the specified integer value
|
static SoTransparencyTypeElement.TransparencyTypes |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SoTransparencyTypeElement.TransparencyTypes[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SoTransparencyTypeElement.TransparencyTypes SCREEN_DOOR
public static final SoTransparencyTypeElement.TransparencyTypes ADD
public static final SoTransparencyTypeElement.TransparencyTypes BLEND
public static final SoTransparencyTypeElement.TransparencyTypes DELAYED_ADD
public static final SoTransparencyTypeElement.TransparencyTypes DELAYED_BLEND
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_OBJECT_ADD
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_OBJECT_BLEND
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_TRIANGLES_ADD
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_TRIANGLES_BLEND
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_OBJECT_TRIANGLES_ADD
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_OBJECT_TRIANGLES_BLEND
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_PIXELS_BLEND
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:
public static final SoTransparencyTypeElement.TransparencyTypes SORTED_LAYERS_BLEND
public static final SoTransparencyTypeElement.TransparencyTypes DELAYED_SORTED_PIXELS_BLEND
public static final SoTransparencyTypeElement.TransparencyTypes DELAYED_SORTED_LAYERS_BLEND
public static final SoTransparencyTypeElement.TransparencyTypes NO_TRANSPARENCY
public static SoTransparencyTypeElement.TransparencyTypes[] values()
for (SoTransparencyTypeElement.TransparencyTypes c : SoTransparencyTypeElement.TransparencyTypes.values()) System.out.println(c);
public static SoTransparencyTypeElement.TransparencyTypes valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@Deprecated public static SoTransparencyTypeElement.TransparencyTypes fromValue(int val)
valueOf(int)
instead.public static SoTransparencyTypeElement.TransparencyTypes valueOf(int val)
public int getValue()
IntegerValuedEnum
getValue
in interface IntegerValuedEnum
Generated on August 20, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com