Project

General

Profile

« Previous | Next » 

Revision 687263cc

Added by Leszek Koltunski about 4 years ago

Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)

View differences:

src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java
101 101
      MatrixEffectQuaternion quatEffect1 = new MatrixEffectQuaternion(mQuat1, mCenter);
102 102
      MatrixEffectQuaternion quatEffect2 = new MatrixEffectQuaternion(mQuat2, mCenter);
103 103

  
104

  
105 104
      for(int i=0; i<NUM_OBJECTS; i++)
106 105
        {
107
        mTex[i]          = new DistortedTexture(OBJ_SIZE,OBJ_SIZE);
106
        mTex[i]          = new DistortedTexture();
108 107
        mMoveVector[i]   = new Static3D(0,0,0);
109 108
        mAlphaVector[i]  = new Static1D(0.5f);
110 109
        mBlur[i]         = new PostprocessEffectBlur(new Static1D(0));
111 110
        mBlurApplied[i]  = true;
112 111
        alpha[i]         = new FragmentEffectAlpha(mAlphaVector[i]);
113
        mEffects[i]      = new DistortedEffects();
112
        mEffects[i]      = new DistortedEffects(OBJ_SIZE,OBJ_SIZE,0);
114 113

  
115 114
        mEffects[i].apply(mBlur[i]);
116 115
        mEffects[i].apply(alpha[i]);
......
125 124
        }
126 125
      }
127 126

  
128

  
129 127
///////////////////////////////////////////////////////////////////////////////////////////////////
130 128

  
131 129
    void setPostprocess(int object, boolean doIt)

Also available in: Unified diff