Project

General

Profile

« Previous | Next » 

Revision 6637d0f2

Added by Leszek Koltunski about 7 years ago

Speed up shaders (both compilation and execution) by explicitly enabling only the needed effects.

View differences:

src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
31 31
import org.distorted.library.DistortedScreen;
32 32
import org.distorted.library.DistortedTexture;
33 33
import org.distorted.library.DistortedEffects;
34
import org.distorted.library.EffectNames;
34 35
import org.distorted.library.MeshFlat;
35 36
import org.distorted.library.EffectTypes;
36 37
import org.distorted.library.type.Dynamic3D;
......
171 172
      mScreen.detachAll();
172 173
      for(int i=NUM-1; i>=0; i--) mScreen.attach(texture[i], mEffects[i], mesh);
173 174

  
175
      DistortedEffects.enableEffect(EffectNames.SINK);
176
      DistortedEffects.enableEffect(EffectNames.DISTORT);
177

  
174 178
      try
175 179
        {
176 180
        Distorted.onCreate(mView.getContext());

Also available in: Unified diff