Project

General

Profile

« Previous | Next » 

Revision 0ba5de00

Added by Leszek Koltunski about 4 years ago

Fixes for the merge.

View differences:

src/main/java/org/distorted/examples/triblur/TriblurRenderer.java
56 56

  
57 57
    private static final int[] OBJECTS =
58 58
        {
59
        -150, 0, 0,   255,   0,  0,  // x,y,z, R,G,B
59
        -130, 0, 0,   255,   0,  0,  // x,y,z, R,G,B
60 60
           0, 0, 0,   255, 255,  0,  //
61
        +150, 0, 0,     0, 255,  0,  //
61
        +130, 0, 0,     0, 255,  0,  //
62 62
        };
63 63

  
64 64
    private static final int NUM_OBJECTS = OBJECTS.length/NUM;
......
124 124
        mGlow[i]         = new PostprocessEffectGlow(mEffectVector[i], new Static4D(1.0f,1.0f,1.0f,0.5f) );
125 125
        chroma[i]        = new FragmentEffectChroma( new Static1D(0.3f), chromaVector[i]);
126 126
        effects[i]       = new DistortedEffects();
127

  
128 127
        effects[i].apply(mBlur[i]);
129 128
        effects[i].apply(chroma[i]);
130
        effects[i].apply( (i==0||i==NUM_OBJECTS-1) ? scaleEffect1 : scaleEffect2 );
131
        effects[i].apply(quatEffect1);
132
        effects[i].apply(quatEffect2);
129

  
133 130
        effects[i].apply(new MatrixEffectMove(moveVector[i]));
131
        effects[i].apply(quatEffect2);
132
        effects[i].apply(quatEffect1);
133
        effects[i].apply( (i==0||i==NUM_OBJECTS-1) ? scaleEffect1 : scaleEffect2 );
134 134

  
135 135
        mEffectStatus[i] = 1;
136 136
        mNode[i] = new DistortedNode(mTex, effects[i], mesh );
......
212 212
      {
213 213
      mScreenMin = width<height ? width:height;
214 214

  
215
      float factor1 = 0.22f*mScreenMin/OBJ_SIZE;
216
      float factor2 = 0.80f*factor1;
215
      float factor1 = 0.20f*mScreenMin/OBJ_SIZE;
216
      float factor2 = 0.75f*factor1;
217 217
      mScale1.set(factor1,factor1,factor1);
218 218
      mScale2.set(factor2,factor2,factor2);
219 219
      mScreen.resize(width, height);

Also available in: Unified diff