Project

General

Profile

« Previous | Next » 

Revision 7a5e538a

Added by Leszek Koltunski over 5 years ago

Progress with Inflate (building block of postprocessing effects: the proper way of marking a halo around a Mesh)
'Inflate' app testing the machanism. MeshFlat appears to be working, now we only need to fill up the per-vertex Inflate vector in the MeshCubes.

View differences:

src/main/java/org/distorted/library/main/EffectQueueVertex.java
36 36
  private static int[] mNumEffectsH = new int[Distorted.MAIN_VARIANTS];
37 37
  private static int[] mNameH       = new int[Distorted.MAIN_VARIANTS];
38 38
  private static int[] mUniformsH   = new int[Distorted.MAIN_VARIANTS];
39
  private static int[] mInflateH    = new int[Distorted.MAIN_VARIANTS];
39 40

  
40 41
///////////////////////////////////////////////////////////////////////////////////////////////////
41 42
   
......
51 52
    mNumEffectsH[variant]= GLES31.glGetUniformLocation( mProgramH, "vNumEffects");
52 53
    mNameH[variant]      = GLES31.glGetUniformLocation( mProgramH, "vName");
53 54
    mUniformsH[variant]  = GLES31.glGetUniformLocation( mProgramH, "vUniforms");
55
    mInflateH[variant]   = GLES31.glGetUniformLocation( mProgramH, "u_Inflate");
54 56
    }
55 57

  
56 58
///////////////////////////////////////////////////////////////////////////////////////////////////
......
88 90

  
89 91
///////////////////////////////////////////////////////////////////////////////////////////////////
90 92

  
91
  void send(int variant)
93
  void send(float inflate, int variant)
92 94
    {
93 95
    GLES31.glUniform1i( mNumEffectsH[variant], mNumEffects);
94
      
96
    GLES31.glUniform1f( mInflateH[variant]   , inflate    );
97

  
95 98
    if( mNumEffects>0 )
96 99
      {
97 100
      GLES31.glUniform1iv( mNameH[variant]    ,                 mNumEffects, mName    ,0);

Also available in: Unified diff