Project

General

Profile

« Previous | Next » 

Revision c1fa9e3c

Added by Leszek Koltunski over 3 years ago

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.

View differences:

src/main/java/org/distorted/library/effect/PostprocessEffectGlow.java
200 200
    buffer.bindForOutput(1);
201 201
    buffer.setAsInput(0);
202 202

  
203
    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);
204
    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);
205

  
203 206
    GLES30.glColorMask(true,true,true,true);
204 207
    GLES30.glClearColor(1.0f,1.0f,1.0f,0.0f);
205 208
    GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);
......
221 224
    buffer.bindForOutput(0);
222 225
    buffer.setAsInput(1);
223 226

  
227
    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE);
228
    GLES30.glTexParameteri( GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE);
229

  
224 230
    GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);
225 231

  
226 232
    GLES30.glUniform1f ( mProgram2.mUniform[0] , n );

Also available in: Unified diff