|
|
|
@ -272,27 +272,27 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
|
/** |
|
|
|
|
* Additive blending. For use with glows and particle emitters. |
|
|
|
|
* <p> |
|
|
|
|
* Result = Source Color + Destination Color -> (GL_ONE, GL_ONE) |
|
|
|
|
* Result = Source Color + Destination Color -> (GL_ONE, GL_ONE) |
|
|
|
|
*/ |
|
|
|
|
Additive, |
|
|
|
|
/** |
|
|
|
|
* Premultiplied alpha blending, for use with premult alpha textures. |
|
|
|
|
* <p> |
|
|
|
|
* Result = Source Color + (Dest Color * (1 - Source Alpha) ) -> (GL_ONE, GL_ONE_MINUS_SRC_ALPHA) |
|
|
|
|
* Result = Source Color + (Dest Color * (1 - Source Alpha) ) -> (GL_ONE, GL_ONE_MINUS_SRC_ALPHA) |
|
|
|
|
*/ |
|
|
|
|
PremultAlpha, |
|
|
|
|
/** |
|
|
|
|
* Additive blending that is multiplied with source alpha. |
|
|
|
|
* For use with glows and particle emitters. |
|
|
|
|
* <p> |
|
|
|
|
* Result = (Source Alpha * Source Color) + Dest Color -> (GL_SRC_ALPHA, GL_ONE) |
|
|
|
|
* Result = (Source Alpha * Source Color) + Dest Color -> (GL_SRC_ALPHA, GL_ONE) |
|
|
|
|
*/ |
|
|
|
|
AlphaAdditive, |
|
|
|
|
/** |
|
|
|
|
* Color blending, blends in color from dest color |
|
|
|
|
* using source color. |
|
|
|
|
* <p> |
|
|
|
|
* Result = Source Color + (1 - Source Color) * Dest Color -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) |
|
|
|
|
* Result = Source Color + (1 - Source Color) * Dest Color -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) |
|
|
|
|
*/ |
|
|
|
|
Color, |
|
|
|
|
/** |
|
|
|
@ -300,7 +300,7 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
|
* using source alpha. |
|
|
|
|
* <p> |
|
|
|
|
* Result = Source Alpha * Source Color + |
|
|
|
|
* (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) |
|
|
|
|
* (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) |
|
|
|
|
*/ |
|
|
|
|
Alpha, |
|
|
|
|
/** |
|
|
|
@ -309,28 +309,28 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
|
* The resulting alpha is the sum between the source alpha and the destination alpha. |
|
|
|
|
* <p> |
|
|
|
|
* 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) |
|
|
|
|
* (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) |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
AlphaSumA, |
|
|
|
|
/** |
|
|
|
|
* Multiplies the source and dest colors. |
|
|
|
|
* <p> |
|
|
|
|
* Result = Source Color * Dest Color -> (GL_DST_COLOR, GL_ZERO) |
|
|
|
|
* Result = Source Color * Dest Color -> (GL_DST_COLOR, GL_ZERO) |
|
|
|
|
*/ |
|
|
|
|
Modulate, |
|
|
|
|
/** |
|
|
|
|
* Multiplies the source and dest colors then doubles the result. |
|
|
|
|
* <p> |
|
|
|
|
* Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR) |
|
|
|
|
* Result = 2 * Source Color * Dest Color -> (GL_DST_COLOR, GL_SRC_COLOR) |
|
|
|
|
*/ |
|
|
|
|
ModulateX2, |
|
|
|
|
/** |
|
|
|
|
* Opposite effect of Modulate/Multiply. Invert both colors, multiply and |
|
|
|
|
* then invert the result. |
|
|
|
|
* <p> |
|
|
|
|
* Result = 1 - (1 - Source Color) * (1 - Dest Color) -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) |
|
|
|
|
* Result = 1 - (1 - Source Color) * (1 - Dest Color) -> (GL_ONE, GL_ONE_MINUS_SRC_COLOR) |
|
|
|
|
*/ |
|
|
|
|
Screen, |
|
|
|
|
/** |
|
|
|
@ -338,7 +338,7 @@ public class RenderState implements Cloneable, Savable { |
|
|
|
|
* operation. This is directly equivalent to Photoshop's "Exclusion" blend. |
|
|
|
|
* <p> |
|
|
|
|
* Result = (Source Color * (1 - Dest Color)) + (Dest Color * (1 - Source Color)) |
|
|
|
|
* -> (GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR) |
|
|
|
|
* -> (GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR) |
|
|
|
|
*/ |
|
|
|
|
Exclusion, |
|
|
|
|
/** |
|
|
|
|