commit 4348b52ea75ab32074d22e583b22aca584d81873
Author: Leszek Koltunski <leszek@distorted.org>
Date:   Tue Aug 9 14:52:52 2016 +0100

    Fix the 'Moving Effects' app

diff --git a/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java b/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java
index 7faf78e..a15869f 100644
--- a/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java
+++ b/src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java
@@ -80,7 +80,7 @@ public class Effects2DActivity extends Activity implements AdapterView.OnItemSel
     String[] itemsName = new String[] { getText(R.string.distort   ).toString(),
                                         getText(R.string.sink      ).toString(),
                                         getText(R.string.alpha     ).toString(),
-                                        getText(R.string.macroblock).toString(),
+                                        getText(R.string.brightness).toString(),
                                         getText(R.string.chroma    ).toString()};
 
     String[] itemsType = new String[] {"VERTEX", "FRAGMENT"};
diff --git a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
index 68e328f..f3a62c3 100644
--- a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
+++ b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
@@ -37,7 +37,7 @@ public class MovingEffectsActivity extends Activity
     private static final int COLOR_UNPRESSED = 0x888888ff;
     private static final String SHOWED_TOAST = "showed_toast";
 
-    Button mAbort, mMacro, mTrans, mSink, mBubble, mSwirl;
+    Button mAbort, mChroma, mTrans, mSink, mBubble, mSwirl;
    
 ///////////////////////////////////////////////////////////////////
     @Override
@@ -48,14 +48,14 @@ public class MovingEffectsActivity extends Activity
       setContentView(R.layout.movingeffectslayout);
       
       mAbort = (Button)findViewById(R.id.movingeffectsAbort);
-      mMacro = (Button)findViewById(R.id.movingeffectsMacro);
+      mChroma= (Button)findViewById(R.id.movingeffectsChroma);
       mTrans = (Button)findViewById(R.id.movingeffectsTrans);
       mSink  = (Button)findViewById(R.id.movingeffectsSink);
       mBubble= (Button)findViewById(R.id.movingeffectsBubble);
       mSwirl= (Button)findViewById(R.id.movingeffectsSwirl);
       
       mAbort.setBackgroundColor(COLOR_PRESSED);
-      mMacro.setBackgroundColor(COLOR_UNPRESSED);
+      mChroma.setBackgroundColor(COLOR_UNPRESSED);
       mTrans.setBackgroundColor(COLOR_UNPRESSED);
       mSink.setBackgroundColor(COLOR_UNPRESSED);
       mBubble.setBackgroundColor(COLOR_UNPRESSED);
@@ -119,7 +119,7 @@ public class MovingEffectsActivity extends Activity
       MovingEffectsSurfaceView.Bubble();
       
       mAbort.setBackgroundColor(COLOR_UNPRESSED);
-      mMacro.setBackgroundColor(COLOR_UNPRESSED);
+      mChroma.setBackgroundColor(COLOR_UNPRESSED);
       mTrans.setBackgroundColor(COLOR_UNPRESSED);
       mSink.setBackgroundColor(COLOR_UNPRESSED);
       mBubble.setBackgroundColor(COLOR_PRESSED);
@@ -133,7 +133,7 @@ public class MovingEffectsActivity extends Activity
       MovingEffectsSurfaceView.Sink();
       
       mAbort.setBackgroundColor(COLOR_UNPRESSED);
-      mMacro.setBackgroundColor(COLOR_UNPRESSED);
+      mChroma.setBackgroundColor(COLOR_UNPRESSED);
       mTrans.setBackgroundColor(COLOR_UNPRESSED);
       mSink.setBackgroundColor(COLOR_PRESSED);
       mBubble.setBackgroundColor(COLOR_UNPRESSED);
@@ -147,7 +147,7 @@ public class MovingEffectsActivity extends Activity
       MovingEffectsSurfaceView.Transparency();
       
       mAbort.setBackgroundColor(COLOR_UNPRESSED);
-      mMacro.setBackgroundColor(COLOR_UNPRESSED);
+      mChroma.setBackgroundColor(COLOR_UNPRESSED);
       mTrans.setBackgroundColor(COLOR_PRESSED);
       mSink.setBackgroundColor(COLOR_UNPRESSED);
       mBubble.setBackgroundColor(COLOR_UNPRESSED);
@@ -156,12 +156,12 @@ public class MovingEffectsActivity extends Activity
     
 ///////////////////////////////////////////////////////////////////
 
-    public void Macroblock(View v)
+    public void Chroma(View v)
       {
-      MovingEffectsSurfaceView.Macroblock();
+      MovingEffectsSurfaceView.Chroma();
       
       mAbort.setBackgroundColor(COLOR_UNPRESSED);
-      mMacro.setBackgroundColor(COLOR_PRESSED);
+      mChroma.setBackgroundColor(COLOR_PRESSED);
       mTrans.setBackgroundColor(COLOR_UNPRESSED);
       mSink.setBackgroundColor(COLOR_UNPRESSED);
       mBubble.setBackgroundColor(COLOR_UNPRESSED);
@@ -175,7 +175,7 @@ public class MovingEffectsActivity extends Activity
       MovingEffectsSurfaceView.Swirl();
       
       mAbort.setBackgroundColor(COLOR_UNPRESSED);
-      mMacro.setBackgroundColor(COLOR_UNPRESSED);
+      mChroma.setBackgroundColor(COLOR_UNPRESSED);
       mTrans.setBackgroundColor(COLOR_UNPRESSED);
       mSink.setBackgroundColor(COLOR_UNPRESSED);
       mBubble.setBackgroundColor(COLOR_UNPRESSED);
@@ -189,7 +189,7 @@ public class MovingEffectsActivity extends Activity
       MovingEffectsSurfaceView.Abort();
       
       mAbort.setBackgroundColor(COLOR_PRESSED);
-      mMacro.setBackgroundColor(COLOR_UNPRESSED);
+      mChroma.setBackgroundColor(COLOR_UNPRESSED);
       mTrans.setBackgroundColor(COLOR_UNPRESSED);
       mSink.setBackgroundColor(COLOR_UNPRESSED);
       mBubble.setBackgroundColor(COLOR_UNPRESSED);
diff --git a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java
index b4850bf..2c5585c 100644
--- a/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java
+++ b/src/main/java/org/distorted/examples/movingeffects/MovingEffectsSurfaceView.java
@@ -49,7 +49,7 @@ public class MovingEffectsSurfaceView extends GLSurfaceView
     public static final int EFFECT_BUBBLE=1;
     public static final int EFFECT_SINK  =2;
     public static final int EFFECT_TRANS =3;
-    public static final int EFFECT_MACRO =4;
+    public static final int EFFECT_CHROMA=4;
     public static final int EFFECT_SWIRL =5;
    
     private static MovingEffectsRenderer mRenderer;
@@ -147,16 +147,16 @@ public class MovingEffectsSurfaceView extends GLSurfaceView
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-    public static void Macroblock()
+    public static void Chroma()
       {
-      if( mCurrEffect==EFFECT_MACRO ) return;   
+      if( mCurrEffect==EFFECT_CHROMA ) return;
          
       synchronized(lock)
         {
         MovingEffectsRenderer.mBackground.abortEffects(EffectTypes.VERTEX);
         MovingEffectsRenderer.mBackground.abortEffects(EffectTypes.FRAGMENT);
-        MovingEffectsRenderer.mBackground.macroblock(new Static1D(3), mRegion);
-        mCurrEffect = EFFECT_MACRO;
+        MovingEffectsRenderer.mBackground.chroma(new Static1D(0.5f), new Static3D(1,0,0), mRegion, true);
+        mCurrEffect = EFFECT_CHROMA;
         }
       }
 
diff --git a/src/main/res/layout/movingeffectslayout.xml b/src/main/res/layout/movingeffectslayout.xml
index c312344..f103d19 100644
--- a/src/main/res/layout/movingeffectslayout.xml
+++ b/src/main/res/layout/movingeffectslayout.xml
@@ -67,16 +67,16 @@
             android:text="@string/alpha" />
 
         <Button
-            android:id="@+id/movingeffectsMacro"
+            android:id="@+id/movingeffectsChroma"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="2dp"
             android:layout_marginRight="2dp"
             android:layout_weight="0.17"
-            android:onClick="Macroblock"
+            android:onClick="Chroma"
             android:paddingLeft="5dp"
             android:paddingRight="5dp"
-            android:text="@string/macroblock" />
+            android:text="@string/chroma" />
 
         <Button
             android:id="@+id/movingeffectsAbort"
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 7da174c..b57de8a 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -8,7 +8,6 @@
     <string name="shear">Shear</string>
     <string name="sink">Sink</string>
     <string name="alpha">Alpha</string>
-    <string name="macroblock">Macro</string>
     <string name="chroma">Chroma</string>
     <string name="brightness">Brightness</string>
     <string name="saturation">Saturation</string>
