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/movingeffects/MovingEffectsRenderer.java
32 32
import org.distorted.library.DistortedScreen;
33 33
import org.distorted.library.DistortedTexture;
34 34
import org.distorted.library.DistortedEffects;
35
import org.distorted.library.EffectNames;
35 36
import org.distorted.library.MeshFlat;
36 37
import org.distorted.library.Distorted;
37 38

  
......
108 109

  
109 110
   public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
110 111
     {
112
     DistortedEffects.enableEffect(EffectNames.SWIRL);
113
     DistortedEffects.enableEffect(EffectNames.SMOOTH_ALPHA);
114
     DistortedEffects.enableEffect(EffectNames.SMOOTH_CHROMA);
115
     DistortedEffects.enableEffect(EffectNames.DISTORT);
116
     DistortedEffects.enableEffect(EffectNames.SINK);
117

  
111 118
     try
112 119
       {
113 120
       Distorted.onCreate(mView.getContext());

Also available in: Unified diff