Project

General

Profile

« Previous | Next » 

Revision 12f45260

Added by Leszek Koltunski about 6 years ago

First try at the SSBO (doesn't work - reads in the application don't pick up changes in the shader; crashes.

View differences:

src/main/java/org/distorted/library/main/DistortedEffects.java
53 53
  /// MAIN PROGRAM ///
54 54
  private static DistortedProgram mMainProgram;
55 55
  private static int mMainTextureH;
56
  private static int mCountIndexH;
56 57

  
57 58
  /// BLIT PROGRAM ///
58 59
  private static DistortedProgram mBlitProgram;
......
120 121
    EffectQueueVertex.getUniforms(mainProgramH);
121 122
    EffectQueueMatrix.getUniforms(mainProgramH);
122 123
    mMainTextureH= GLES31.glGetUniformLocation( mainProgramH, "u_Texture");
124
    mCountIndexH = GLES31.glGetUniformLocation( mainProgramH, "u_currentIndex");
123 125

  
124 126
    // BLIT PROGRAM ////////////////////////////////////
125 127
    final InputStream blitVertStream = resources.openRawResource(R.raw.blit_vertex_shader);
......
281 283

  
282 284
    mMainProgram.useProgram();
283 285
    GLES31.glUniform1i(mMainTextureH, 0);
286
    GLES31.glUniform1i(mCountIndexH, surface.resetNewCounter() );
287

  
288
    android.util.Log.d("surface", "SurfaceID "+ surface.getID()+" transparent fragments: "+ surface.returnCounter() );
284 289

  
285 290
    if( Distorted.GLSL >= 300 )
286 291
      {

Also available in: Unified diff