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/differenteffects/DifferentEffectsRenderer.java
30 30
import org.distorted.library.Distorted;
31 31
import org.distorted.library.DistortedEffects;
32 32
import org.distorted.library.DistortedScreen;
33
import org.distorted.library.EffectNames;
33 34
import org.distorted.library.MeshFlat;
34 35
import org.distorted.library.DistortedTexture;
35 36
import org.distorted.library.EffectTypes;
......
171 172
     mScreen.detachAll();
172 173
     for(int i=NUM-1; i>=0; i--) mScreen.attach(texture, mEffects[i], mesh);
173 174

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

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

Also available in: Unified diff