public static enum RenderState.BlendMode extends java.lang.Enum<RenderState.BlendMode>
BlendMode
specifies the blending operation to use.Enum Constant and Description |
---|
Additive
Additive blending.
|
Alpha
Alpha blending, interpolates to source color from dest color
using source alpha.
|
AlphaAdditive
Additive blending that is multiplied with source alpha.
|
AlphaSumA
Alpha blending, interpolates to source color from dest color
using source alpha.
|
Color
Color blending, blends in color from dest color
using source color.
|
Custom
Uses the blend equations and blend factors defined by the render state.
|
Exclusion
Mixes the destination and source colors similar to a color-based XOR
operation.
|
Modulate
Multiplies the source and dest colors.
|
ModulateX2
Multiplies the source and dest colors then doubles the result.
|
Off
No blending mode is used.
|
PremultAlpha
Premultiplied alpha blending, for use with premult alpha textures.
|
Screen
Opposite effect of Modulate/Multiply.
|
Modifier and Type | Method and Description |
---|---|
static RenderState.BlendMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RenderState.BlendMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RenderState.BlendMode Off
public static final RenderState.BlendMode Additive
Result = Source Color + Destination Color -> (GL_ONE, GL_ONE)
public static final RenderState.BlendMode PremultAlpha
Result = Source Color + (Dest Color * (1 - Source Alpha) ) -> (GL_ONE, GL_ONE_MINUS_SRC_ALPHA)
public static final RenderState.BlendMode AlphaAdditive
Result = (Source Alpha * Source Color) + Dest Color -> (GL_SRC_ALPHA, GL_ONE)
public static final RenderState.BlendMode Color
Result = Source Color + (1 - Source Color) * Dest Color -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR)
public static final RenderState.BlendMode Alpha
Result = Source Alpha * Source Color + (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
public static final RenderState.BlendMode AlphaSumA
Result.rgb = Source Alpha * Source Color + (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) Result.a = 1 * Source Alpha + 1 * Dest Alpha -> (GL_ONE, GL_ONE)
public static final RenderState.BlendMode Modulate
Result = Source Color * Dest Color -> (GL_DST_COLOR, GL_ZERO)
public static final RenderState.BlendMode ModulateX2
Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR)
public static final RenderState.BlendMode Screen
Result = 1 - (1 - Source Color) * (1 - Dest Color) -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR)
public static final RenderState.BlendMode Exclusion
Result = (Source Color * (1 - Dest Color)) + (Dest Color * (1 - Source Color)) -> (GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR)
public static final RenderState.BlendMode Custom
These attributes can be set by using the following methods:
RenderState.setBlendEquation(BlendEquation)
RenderState.setBlendEquationAlpha(BlendEquationAlpha)
RenderState.setCustomBlendFactors(BlendFunc, BlendFunc, BlendFunc, BlendFunc)
Result.RGB = BlendEquation( sfactorRGB * Source.RGB , dfactorRGB * Destination.RGB )
Result.A = BlendEquationAlpha( sfactorAlpha * Source.A , dfactorAlpha * Destination.A )
public static RenderState.BlendMode[] values()
for (RenderState.BlendMode c : RenderState.BlendMode.values()) System.out.println(c);
public static RenderState.BlendMode 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