diff --git a/jme3-core/src/main/java/com/jme3/material/RenderState.java b/jme3-core/src/main/java/com/jme3/material/RenderState.java index 27a3c9b30..fea4d26e2 100644 --- a/jme3-core/src/main/java/com/jme3/material/RenderState.java +++ b/jme3-core/src/main/java/com/jme3/material/RenderState.java @@ -303,6 +303,17 @@ public class RenderState implements Cloneable, Savable { * (1 - Source Alpha) * Dest Color -> (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) */ Alpha, + /** + * Alpha blending, interpolates to source color from dest color + * using source alpha. + * The resulting alpha is the sum between the source alpha and the destination alpha. + *
+ * 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) + * + */ + AlphaSumA, /** * Multiplies the source and dest colors. *
diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java index 2eb55a777..6f222eb02 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java @@ -789,6 +789,14 @@ public final class GLRenderer implements Renderer { case Alpha: blendFunc(RenderState.BlendFunc.Src_Alpha, RenderState.BlendFunc.One_Minus_Src_Alpha); break; + case AlphaSumA: + blendFuncSeparate( + RenderState.BlendFunc.Src_Alpha, + RenderState.BlendFunc.One_Minus_Src_Alpha, + RenderState.BlendFunc.One, + RenderState.BlendFunc.One + ); + break; case PremultAlpha: blendFunc(RenderState.BlendFunc.One, RenderState.BlendFunc.One_Minus_Src_Alpha); break;