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