commit c1fa9e3cc2cdd952a239392fd43947c19ad67f09
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Thu Jul 30 16:18:42 2020 +0100

    When blurring or glowing, we need to CLAMP_TO_EDGE the texture - otherwise part of the blur or glow could appear on the other end of the texture.

diff --git a/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java b/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java
index f76330e..d8ce1cb 100644
--- a/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java
+++ b/src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java
@@ -197,6 +197,9 @@ public class PostprocessEffectBlur extends PostprocessEffect
     buffer.bindForOutput(1);
     buffer.setAsInput(0);
 
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);
+
     GLES30.glColorMask(true,true,true,true);
     GLES30.glClearColor(1.0f,1.0f,1.0f,0.0f);
     GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);
@@ -218,6 +221,9 @@ public class PostprocessEffectBlur extends PostprocessEffect
     buffer.bindForOutput(0);
     buffer.setAsInput(1);
 
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);
+
     GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);
 
     GLES30.glUniform1f ( mProgram2.mUniform[0] , n );
diff --git a/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java b/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
index 3c55e78..e706d46 100644
--- a/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
+++ b/src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
@@ -200,6 +200,9 @@ public class PostprocessEffectGlow extends PostprocessEffect
     buffer.bindForOutput(1);
     buffer.setAsInput(0);
 
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);
+
     GLES30.glColorMask(true,true,true,true);
     GLES30.glClearColor(1.0f,1.0f,1.0f,0.0f);
     GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);
@@ -221,6 +224,9 @@ public class PostprocessEffectGlow extends PostprocessEffect
     buffer.bindForOutput(0);
     buffer.setAsInput(1);
 
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);
+    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);
+
     GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);
 
     GLES30.glUniform1f ( mProgram2.mUniform[0] , n );
