commit 67c3a83b73c300263e35f353e238f5872c73d616
Author: leszek <leszek@koltunski.pl>
Date:   Wed Apr 26 00:07:16 2017 +0100

    Revert "Convert a few more APPs to the new resolution-independent Matrix Effects."
    
    This reverts commit 51554e4700774b72e18e97c7cc72ef887dfbf551.

diff --git a/src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java b/src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java
index 1633ac4..311446a 100644
--- a/src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java
+++ b/src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java
@@ -21,6 +21,7 @@ package org.distorted.examples.aroundtheworld;
 
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
+import android.opengl.GLES30;
 import android.opengl.GLSurfaceView;
 
 import org.distorted.examples.R;
@@ -48,7 +49,7 @@ class AroundTheWorldRenderer implements GLSurfaceView.Renderer
    private DistortedTexture mTexture;
    private DistortedScreen mScreen;
    private AroundTheWorldEffectsManager mManager;
-   private int bmpWidth, bmpHeight;
+   private int mObjWidth, mObjHeight;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
@@ -83,11 +84,22 @@ class AroundTheWorldRenderer implements GLSurfaceView.Renderer
     
    public void onSurfaceChanged(GL10 glUnused, int width, int height) 
       {
-      float qx = (float)width /bmpWidth;
-      float qy = (float)height/bmpHeight;
-
       mEffects.abortEffects(EffectTypes.MATRIX);
-      mEffects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
+
+      if( (float)mObjHeight/mObjWidth > (float)height/width )
+        {
+        int w = (height*mObjWidth)/mObjHeight;
+        float factor = (float)height/mObjHeight;
+        mEffects.move( new Static3D((width-w)/2,0,0) );
+        mEffects.scale(factor);
+        }
+      else
+        {
+        int h = (width*mObjHeight)/mObjWidth;
+        float factor = (float)width/mObjWidth;
+        mEffects.move( new Static3D(0,(height-h)/2,0) );
+        mEffects.scale(factor);
+        }
 
       mScreen.resize(width,height);
       }
@@ -112,14 +124,14 @@ class AroundTheWorldRenderer implements GLSurfaceView.Renderer
         catch(IOException e) { }
         }
 
-      bmpWidth = bitmap.getWidth();
-      bmpHeight= bitmap.getHeight();
+      mObjWidth = bitmap.getWidth();
+      mObjHeight= bitmap.getHeight();
 
-      if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
+      if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight);
       mTexture.setTexture(bitmap);
 
       mScreen.detachAll();
-      mScreen.attach(mTexture, mEffects, new MeshFlat(30,30*bmpHeight/bmpWidth));
+      mScreen.attach(mTexture, mEffects, new MeshFlat(30,30*mObjHeight/mObjWidth));
 
       DistortedEffects.enableEffect(EffectNames.DISTORT);
       DistortedEffects.enableEffect(EffectNames.SINK);
diff --git a/src/main/java/org/distorted/examples/blur/BlurRenderer.java b/src/main/java/org/distorted/examples/blur/BlurRenderer.java
index 3c1174d..af63e25 100644
--- a/src/main/java/org/distorted/examples/blur/BlurRenderer.java
+++ b/src/main/java/org/distorted/examples/blur/BlurRenderer.java
@@ -91,57 +91,70 @@ class BlurRenderer implements GLSurfaceView.Renderer
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-   public void onSurfaceChanged(GL10 glUnused, int width, int height)
-     {
-     float qx = (float)width /bmpWidth;
-     float qy = (float)height/bmpHeight;
-
-     mEffects.abortEffects(EffectTypes.MATRIX);
-     mEffects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
+    public void onSurfaceChanged(GL10 glUnused, int width, int height) 
+      { 
+      mEffects.abortEffects(EffectTypes.MATRIX);
       
-     mScreen.resize(width, height);
-     }
+      if( (float)bmpHeight/bmpWidth > (float)height/width )
+        {
+        int w = (height*bmpWidth)/bmpHeight;
+        float factor = (float)height/bmpHeight;
+
+        mEffects.move( new Static3D((width-w)/2,0,0) );
+        mEffects.scale(factor);
+        }
+      else
+        {
+        int h = (width*bmpHeight)/bmpWidth;
+        float factor = (float)width/bmpWidth;
+
+        mEffects.move( new Static3D(0,(height-h)/2,0) );
+        mEffects.scale(factor);
+        }
+      
+      mScreen.resize(width, height);
+      }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-   public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
-     {
-     InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog);
-     Bitmap bitmap;
+    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
+      {
+      InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog);
+      Bitmap bitmap;
         
-     try
-       {
-       bitmap = BitmapFactory.decodeStream(is);
-       }
-     finally
-       {
-       try
-         {
-         is.close();
-         }
-       catch(IOException e) { }
-       }
+      try 
+        {
+        bitmap = BitmapFactory.decodeStream(is);
+        } 
+      finally 
+        {
+        try 
+          {
+          is.close();
+          } 
+        catch(IOException e) { }
+        }  
       
-     bmpHeight = bitmap.getHeight();
-     bmpWidth  = bitmap.getWidth();
-
-     if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
-     mTexture.setTexture(bitmap);
-
-     mScreen.detachAll();
-     DistortedNode node = new DistortedNode(mTexture,mEffects,mMesh);
-     node.setPostprocessEffects(mPostEffects);
-     mScreen.attach(node);
-
-     DistortedEffects.enableEffect(EffectNames.BLUR);
-
-     try
-       {
-       Distorted.onCreate(mView.getContext());
-       }
-     catch(Exception ex)
-       {
-       android.util.Log.e("Blur", ex.getMessage() );
-       }
-     }
+      bmpHeight = bitmap.getHeight();
+      bmpWidth  = bitmap.getWidth();
+
+      if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
+      mTexture.setTexture(bitmap);
+
+      mScreen.detachAll();
+      DistortedNode node = new DistortedNode(mTexture,mEffects,mMesh);
+      node.setPostprocessEffects(mPostEffects);
+      mScreen.attach(node);
+
+      DistortedEffects.enableEffect(EffectNames.BLUR);
+
+      try
+        {
+        Distorted.onCreate(mView.getContext());
+        }
+      catch(Exception ex)
+        {
+        android.util.Log.e("Blur", ex.getMessage() );
+        }
+      }
 }
diff --git a/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java b/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
index 51ea6f0..cc6bff7 100644
--- a/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
+++ b/src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
@@ -21,6 +21,7 @@ package org.distorted.examples.effects3d;
 
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
+import android.opengl.GLES30;
 import android.opengl.GLSurfaceView;
 
 import org.distorted.examples.R;
diff --git a/src/main/java/org/distorted/examples/girl/GirlRenderer.java b/src/main/java/org/distorted/examples/girl/GirlRenderer.java
index 04838e2..687dd6b 100644
--- a/src/main/java/org/distorted/examples/girl/GirlRenderer.java
+++ b/src/main/java/org/distorted/examples/girl/GirlRenderer.java
@@ -157,57 +157,57 @@ class GirlRenderer implements GLSurfaceView.Renderer
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-   public void onSurfaceChanged(GL10 glUnused, int width, int height)
-     {
-     float qx = (float)width /bmpWidth;
-     float qy = (float)height/bmpHeight;
+    public void onSurfaceChanged(GL10 glUnused, int width, int height) 
+      { 
+      float qx = (float)width /bmpWidth;
+      float qy = (float)height/bmpHeight;
 
-     mEffects.abortEffects(EffectTypes.MATRIX);
-     mEffects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
+      mEffects.abortEffects(EffectTypes.MATRIX);
+      mEffects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
       
-     mScreen.resize(width, height);
-     }
+      mScreen.resize(width, height);
+      }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-   public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
-     {
-     InputStream is = mView.getContext().getResources().openRawResource(R.raw.girl);
-     Bitmap bitmap;
+    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
+      {
+      InputStream is = mView.getContext().getResources().openRawResource(R.raw.girl);
+      Bitmap bitmap;
         
-     try
-       {
-       bitmap = BitmapFactory.decodeStream(is);
-       }
-     finally
-       {
-       try
-         {
-         is.close();
-         }
-       catch(IOException e) { }
-       }
+      try 
+        {
+        bitmap = BitmapFactory.decodeStream(is);
+        } 
+      finally 
+        {
+        try 
+          {
+          is.close();
+          } 
+        catch(IOException e) { }
+        }  
       
-     bmpHeight = bitmap.getHeight();
-     bmpWidth  = bitmap.getWidth();
-
-     if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
-     mTexture.setTexture(bitmap);
-
-     mScreen.detachAll();
-     mScreen.attach(mTexture,mEffects,new MeshFlat(30,30*bmpHeight/bmpWidth));
-
-     DistortedEffects.enableEffect(EffectNames.DISTORT);
-     DistortedEffects.enableEffect(EffectNames.SINK);
-     DistortedEffects.enableEffect(EffectNames.SWIRL);
-
-     try
-       {
-       Distorted.onCreate(mView.getContext());
-       }
-     catch(Exception ex)
-       {
-       android.util.Log.e("Renderer", ex.getMessage() );
-       }
-     }
+      bmpHeight = bitmap.getHeight();
+      bmpWidth  = bitmap.getWidth();
+
+      if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
+      mTexture.setTexture(bitmap);
+
+      mScreen.detachAll();
+      mScreen.attach(mTexture,mEffects,new MeshFlat(30,30*bmpHeight/bmpWidth));
+
+      DistortedEffects.enableEffect(EffectNames.DISTORT);
+      DistortedEffects.enableEffect(EffectNames.SINK);
+      DistortedEffects.enableEffect(EffectNames.SWIRL);
+
+      try
+        {
+        Distorted.onCreate(mView.getContext());
+        }
+      catch(Exception ex)
+        {
+        android.util.Log.e("Renderer", ex.getMessage() );
+        }
+      }
 }
diff --git a/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java b/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
index 8375f23..53fe349 100644
--- a/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
+++ b/src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
@@ -56,7 +56,7 @@ class OlimpicRenderer implements GLSurfaceView.Renderer
    private DistortedTexture mLeaf;
    private DistortedScreen mScreen;
    private MeshFlat mMesh;
-   private int mRootW, mRootH;
+   private int mScreenW, mScreenH;
    private int mPrevRendered, mCurrRendered;
 
    private DistortedNode[] mCircleNode = new DistortedNode[NUM_CIRCLES];
@@ -95,30 +95,27 @@ class OlimpicRenderer implements GLSurfaceView.Renderer
       mMesh = new MeshFlat(1,1);
       DistortedEffects effects = new DistortedEffects();
 
-      mRootW = 9*LEAF_SIZE;
-      mRootH = 9*LEAF_SIZE;
-      mRoot = new DistortedNode(new DistortedTexture(mRootW,mRootH), effects, mMesh);
+      mScreenW = 9*LEAF_SIZE;
+      mScreenH = 9*LEAF_SIZE;
+      mRoot = new DistortedNode(new DistortedTexture(mScreenW,mScreenH), effects, mMesh);
      
       Dynamic1D rot = new Dynamic1D(5000,0.0f);
       rot.setMode(Dynamic1D.MODE_JUMP);
       rot.add(new Static1D(  0));
       rot.add(new Static1D(360));
 
-      int[]   colors    = new int[] {0,0,1,  0,0,0,  1,0,0,  1,1,0,  0,1,0}; // blue, black, red, yellow, green
-      float[] positions = new float[] { -0.333f, -0.12f,    0.0f,-0.12f,    +0.333f,-0.12f,
-                                               -0.166f,+0.166f,     +0.166f,+0.166f };
+      int[] colors    = new int[] {0,0,1,  0,0,0,  1,0,0,  1,1,0,  0,1,0}; // blue, black, red, yellow, green  
+      int[] positions = new int[] {0,2*LEAF_SIZE,  3*LEAF_SIZE,2*LEAF_SIZE,  6*LEAF_SIZE,2*LEAF_SIZE,  3*LEAF_SIZE/2,9*LEAF_SIZE/2,  9*LEAF_SIZE/2,9*LEAF_SIZE/2};
       
-      Static3D center = new Static3D(0,0,0);
+      Static3D center = new Static3D(3*LEAF_SIZE/2, 3*LEAF_SIZE/2, 0);
       Static3D axis   = new Static3D(0,0,1);
-      Static3D move   = new Static3D(-0.33f,0.0f,0.0f);
-      Static3D scale  = new Static3D(0.333f,0.333f,0.333f);
+      Static3D moveVector = new Static3D(0,LEAF_SIZE,0);
 
       for(int j=0; j<NUM_LEAVES; j++)
         {
         mEffects[j] = new DistortedEffects();
-        mEffects[j].rotate( new Static1D(j*(360/NUM_LEAVES)), axis, center);
-        mEffects[j].move(move);
-        mEffects[j].scale(scale);
+        mEffects[j].rotate( new Static1D(j*(360/NUM_LEAVES)), axis, center );
+        mEffects[j].move(moveVector);
         }
 
       for(int i=0; i<NUM_CIRCLES; i++)
@@ -126,7 +123,6 @@ class OlimpicRenderer implements GLSurfaceView.Renderer
         effects = new DistortedEffects();
         effects.move( new Static3D(positions[2*i], positions[2*i+1], 0) );
         effects.rotate( rot, axis, center );
-        effects.scale( scale );
         effects.chroma( new Static1D(0.5f), new Static3D(colors[3*i],colors[3*i+1], colors[3*i+2]) );
 
         mCircleNode[i] = new DistortedNode( surface, effects, mMesh);
@@ -141,72 +137,88 @@ class OlimpicRenderer implements GLSurfaceView.Renderer
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
    
-   public void onDrawFrame(GL10 glUnused)
-     {
-     mCurrRendered = mScreen.render(System.currentTimeMillis());
+    public void onDrawFrame(GL10 glUnused) 
+      {
+      mCurrRendered = mScreen.render(System.currentTimeMillis());
 
-     if( mCurrRendered!=mPrevRendered )
-       {
-       mPrevRendered = mCurrRendered;
+      if( mCurrRendered!=mPrevRendered )
+        {
+        mPrevRendered = mCurrRendered;
 
-       final OlimpicActivity act = (OlimpicActivity)mView.getContext();
+        final OlimpicActivity act = (OlimpicActivity)mView.getContext();
 
-       act.runOnUiThread(new Runnable()
+        act.runOnUiThread(new Runnable()
           {
           public void run()
             {
-           act.setText("rendered: "+mCurrRendered+" objects");
-           }
+            act.setText("rendered: "+mCurrRendered+" objects");
+            }
           });
-       }
-     }
+        }
+      }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-   public void onSurfaceChanged(GL10 glUnused, int width, int height)
-     {
-     DistortedEffects effects = mRoot.getEffects();
+    public void onSurfaceChanged(GL10 glUnused, int width, int height) 
+      {
+      DistortedEffects effects = mRoot.getEffects();
 
-     float qx = (float)width /mRootW;
-     float qy = (float)height/mRootH;
+      effects.abortEffects(EffectTypes.MATRIX);
+      
+      if( (float)mScreenH/mScreenW > (float)height/width )
+        {
+        int w = (height*mScreenW)/mScreenH;
+        float factor = (float)height/mScreenH;
 
-     effects.abortEffects(EffectTypes.MATRIX);
-     effects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
+        effects.move( new Static3D((width-w)/2 ,0, 0) );
+        effects.scale( factor );
+        }
+      else
+        {
+        int h = (width*mScreenH)/mScreenW;
+        float factor = (float)width/mScreenW;
 
-     mScreen.resize(width, height);
-     }
+        effects.move( new Static3D(0,(height-h)/2,0) );
+        effects.scale( factor );
+        }
+      
+      mScreen.resize(width, height);
+      }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
     
-   public void onSurfaceCreated(GL10 glUnused, EGLConfig config)
-     {
-     InputStream is = mView.getContext().getResources().openRawResource(R.raw.leaf);
-     Bitmap leaf;
+    public void onSurfaceCreated(GL10 glUnused, EGLConfig config) 
+      {
+      InputStream is = mView.getContext().getResources().openRawResource(R.raw.leaf);
+      Bitmap leaf;
       
-     try
-       {
-       leaf = BitmapFactory.decodeStream(is);
-       }
-     finally
-       {
-       try
-         {
-         is.close();
-         }
-       catch(IOException e) { }
-       }
+      try 
+        {
+        leaf = BitmapFactory.decodeStream(is);
+        } 
+      finally 
+        {
+        try 
+          {
+          is.close();
+          } 
+        catch(IOException e) { }
+        }  
       
-     mLeaf.setTexture(leaf);
+      mLeaf.setTexture(leaf);
 
-     DistortedEffects.enableEffect(EffectNames.CHROMA);
+      DistortedEffects.enableEffect(EffectNames.CHROMA);
 
-     try
-       {
-       Distorted.onCreate(mView.getContext());
-       }
-     catch(Exception ex)
-       {
-       android.util.Log.e("Olympic", ex.getMessage() );
-       }
-     }
+      try
+        {
+        Distorted.onCreate(mView.getContext());
+        }
+      catch(Exception ex)
+        {
+        android.util.Log.e("Olympic", ex.getMessage() );
+        }
+      }
+ 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+    
 }
diff --git a/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java b/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
index 481e50d..843cd2b 100644
--- a/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
+++ b/src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
@@ -209,11 +209,24 @@ class RenderThread extends Thread
     {
     Log.d(TAG, "surfaceChanged " + width + "x" + height);
 
-    float qx = (float)width /bmpWidth;
-    float qy = (float)height/bmpHeight;
-
     mEffects.abortEffects(EffectTypes.MATRIX);
-    mEffects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
+
+    if( (float)bmpHeight/bmpWidth > (float)height/width )
+      {
+      int w = (height*bmpWidth)/bmpHeight;
+      float factor = (float)height/bmpHeight;
+
+      mEffects.move( new Static3D((width-w)/2,0,0) );
+      mEffects.scale( factor );
+      }
+    else
+      {
+      int h = (width*bmpHeight)/bmpWidth;
+      float factor = (float)width/bmpWidth;
+
+      mEffects.move( new Static3D(0,(height-h)/2,0) );
+      mEffects.scale( factor );
+      }
 
     mScreen.resize(width, height);
     }
diff --git a/src/main/java/org/distorted/examples/save/SaveRenderer.java b/src/main/java/org/distorted/examples/save/SaveRenderer.java
index 880c741..f798bd9 100644
--- a/src/main/java/org/distorted/examples/save/SaveRenderer.java
+++ b/src/main/java/org/distorted/examples/save/SaveRenderer.java
@@ -187,11 +187,24 @@ class SaveRenderer implements GLSurfaceView.Renderer
 
   private void applyMatrixEffects(int width, int height)
     {
-    float qx = (float)width /bmpWidth;
-    float qy = (float)height/bmpHeight;
-
     mEffects.abortEffects(EffectTypes.MATRIX);
-    mEffects.scale(  qx<qy ? (new Static3D(1,qx/qy,1)) : (new Static3D(qy/qx,1,1)) );
+
+    if( (float)bmpHeight/bmpWidth > (float)height/width )
+      {
+      int w = (height*bmpWidth)/bmpHeight;
+      float factor = (float)height/bmpHeight;
+
+      mEffects.move( new Static3D((width-w)/2,0,0) );
+      mEffects.scale(factor);
+      }
+    else
+      {
+      int h = (width*bmpHeight)/bmpWidth;
+      float factor = (float)width/bmpWidth;
+
+      mEffects.move( new Static3D(0,(height-h)/2,0) );
+      mEffects.scale(factor);
+      }
 
     mEffects.scale(mScaleDyn);
     }
diff --git a/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java b/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
index 22bb859..e8ad3c0 100644
--- a/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
+++ b/src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
@@ -404,26 +404,25 @@ class StarWarsRenderer implements GLSurfaceView.Renderer, EffectListener
         int crawlH = mCrawlTexture.getHeight();
         int screenW= mScreen.getWidth();
         int screenH= mScreen.getHeight();
-        int backW  = mCrawlBackgroundTexture.getWidth();
         int backH  = mCrawlBackgroundTexture.getHeight();
-        float scale= ((float)backW/backH)*((float)crawlH/crawlW);
+        float scale= (float)screenW/crawlW;
 
-        mCrawlBackgroundEffects.move( new Static3D(0, -((float)backH/screenH-1.0f)/2 ,0) );
+        //mCrawlBackgroundEffects.move( new Static3D(0,screenH-backH,0) );
         mCrawlBackgroundEffects.rotate( new Static1D(CRAWL_ANGLE), new Static3D(1,0,0), new Static3D(0.5f,1.0f,0.0f) );
         mCrawlBackgroundEffects.scale( new Static3D(1.0f, (float)backH/screenH,1.0f) );
 
         final int transpDist = 5;
         Static4D region = new Static4D(screenW/2,(1-transpDist)*backH,transpDist*backH,transpDist*backH);
-        mCrawlBackgroundEffects.alpha(new Static1D(1-transpDist*0.6f), region, true);
+        //mCrawlBackgroundEffects.alpha(new Static1D(1-transpDist*0.6f), region, true);
 
         Dynamic3D di = new Dynamic3D(70000,0.5f);
-        di.add(new Static3D(0,         0,0));
-        di.add(new Static3D(0,-(1+scale),0));
-
-        mCrawlEffects.move(di);
-        mCrawlEffects.move ( new Static3D(0, (1+scale)/2,0) );
-        mCrawlEffects.scale( new Static3D(1,    scale   ,1) );
+        di.add(new Static3D(screenW/2,+backH       , 0));
+        di.add(new Static3D(screenW/2,-scale*crawlH, 0));
 
+        //mCrawlEffects.move(di);
+        //mCrawlEffects.scale( new Static3D(scale,scale,scale) );
+        //mCrawlEffects.move( new Static3D(-crawlW/2,0,0) );
+        
         mBackground = mScreen.attach(mCrawlBackgroundTexture, mCrawlBackgroundEffects,mQuad);
         mBackground.attach(mCrawlTexture, mCrawlEffects,mQuad);
         mBackground.glDisable(GLES30.GL_DEPTH_TEST);
