commit 8dccc3c20482e5ec6f3e57c300c0c3087969c2c8
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Thu Apr 12 21:42:39 2018 +0100

    Disable blending during postprocessing.

diff --git a/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java b/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
index cd7398b..8d20066 100644
--- a/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
+++ b/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
@@ -223,7 +223,9 @@ public class PostprocessEffectGlow extends PostprocessEffect
       {
       inBuffer.setAsOutput();
       outBuffer.setAsInput(0);
+      GLES31.glEnable(GLES31.GL_BLEND);
       DistortedEffects.blitPriv(inBuffer);
+      GLES31.glDisable(GLES31.GL_BLEND);
       return 3;
       }
 
diff --git a/src/main/java/org/distorted/library/main/DistortedNode.java b/src/main/java/org/distorted/library/main/DistortedNode.java
index de9f421..1b300da 100644
--- a/src/main/java/org/distorted/library/main/DistortedNode.java
+++ b/src/main/java/org/distorted/library/main/DistortedNode.java
@@ -19,6 +19,8 @@
 
 package org.distorted.library.main;
 
+import android.opengl.GLES31;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -272,6 +274,26 @@ public class DistortedNode implements DistortedMaster.Slave
     return 0;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// return the total number of render calls issued
+
+  int drawNoBlend(long currTime, DistortedOutputSurface surface)
+    {
+    DistortedInputSurface input = mNumChildren[0]==0 ? mSurface : mData.mFBO;
+
+    if( input.setAsInput() )
+      {
+      surface.setAsOutput(currTime);
+      mState.apply();
+      GLES31.glDisable(GLES31.GL_BLEND);
+      mEffects.drawPriv(mSurface.getWidth()/2.0f, mSurface.getHeight()/2.0f, mMesh, surface, currTime, 0);
+      GLES31.glEnable(GLES31.GL_BLEND);
+      return 1;
+      }
+
+    return 0;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // return the total number of render calls issued
 
diff --git a/src/main/java/org/distorted/library/main/DistortedOutputSurface.java b/src/main/java/org/distorted/library/main/DistortedOutputSurface.java
index f5b84d8..c188ed0 100644
--- a/src/main/java/org/distorted/library/main/DistortedOutputSurface.java
+++ b/src/main/java/org/distorted/library/main/DistortedOutputSurface.java
@@ -453,7 +453,7 @@ public static final int DEBUG_FPS = 1;
           cloneViewport(this);
           }
 
-        child1.draw(time,mBuffer[quality]);
+        child1.drawNoBlend(time,mBuffer[quality]);
 
         if( i==numChildren-1 )
           {
diff --git a/src/main/java/org/distorted/library/main/EffectQueuePostprocess.java b/src/main/java/org/distorted/library/main/EffectQueuePostprocess.java
index 6c7a74e..d7e9da7 100644
--- a/src/main/java/org/distorted/library/main/EffectQueuePostprocess.java
+++ b/src/main/java/org/distorted/library/main/EffectQueuePostprocess.java
@@ -19,6 +19,8 @@
 
 package org.distorted.library.main;
 
+import android.opengl.GLES31;
+
 import org.distorted.library.effect.EffectType;
 import org.distorted.library.effect.PostprocessEffect;
 import org.distorted.library.message.EffectMessage;
@@ -103,11 +105,15 @@ class EffectQueuePostprocess extends EffectQueue
     {
     int numRenders = 0;
 
+    GLES31.glDisable(GLES31.GL_BLEND);
+
     for(int i=0; i<mNumEffects; i++)
       {
       numRenders += ((PostprocessEffect)mEffects[i]).apply(mUniforms,NUM_UNIFORMS*i, buffers);
       }
 
+    GLES31.glEnable(GLES31.GL_BLEND);
+
     return numRenders;
     }
   }
