Project

General

Profile

« Previous | Next » 

Revision 67c3a83b

Added by Leszek Koltunski about 7 years ago

Revert "Convert a few more APPs to the new resolution-independent Matrix Effects."

This reverts commit 51554e4700774b72e18e97c7cc72ef887dfbf551.

View differences:

src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
404 404
        int crawlH = mCrawlTexture.getHeight();
405 405
        int screenW= mScreen.getWidth();
406 406
        int screenH= mScreen.getHeight();
407
        int backW  = mCrawlBackgroundTexture.getWidth();
408 407
        int backH  = mCrawlBackgroundTexture.getHeight();
409
        float scale= ((float)backW/backH)*((float)crawlH/crawlW);
408
        float scale= (float)screenW/crawlW;
410 409

  
411
        mCrawlBackgroundEffects.move( new Static3D(0, -((float)backH/screenH-1.0f)/2 ,0) );
410
        //mCrawlBackgroundEffects.move( new Static3D(0,screenH-backH,0) );
412 411
        mCrawlBackgroundEffects.rotate( new Static1D(CRAWL_ANGLE), new Static3D(1,0,0), new Static3D(0.5f,1.0f,0.0f) );
413 412
        mCrawlBackgroundEffects.scale( new Static3D(1.0f, (float)backH/screenH,1.0f) );
414 413

  
415 414
        final int transpDist = 5;
416 415
        Static4D region = new Static4D(screenW/2,(1-transpDist)*backH,transpDist*backH,transpDist*backH);
417
        mCrawlBackgroundEffects.alpha(new Static1D(1-transpDist*0.6f), region, true);
416
        //mCrawlBackgroundEffects.alpha(new Static1D(1-transpDist*0.6f), region, true);
418 417

  
419 418
        Dynamic3D di = new Dynamic3D(70000,0.5f);
420
        di.add(new Static3D(0,         0,0));
421
        di.add(new Static3D(0,-(1+scale),0));
422

  
423
        mCrawlEffects.move(di);
424
        mCrawlEffects.move ( new Static3D(0, (1+scale)/2,0) );
425
        mCrawlEffects.scale( new Static3D(1,    scale   ,1) );
419
        di.add(new Static3D(screenW/2,+backH       , 0));
420
        di.add(new Static3D(screenW/2,-scale*crawlH, 0));
426 421

  
422
        //mCrawlEffects.move(di);
423
        //mCrawlEffects.scale( new Static3D(scale,scale,scale) );
424
        //mCrawlEffects.move( new Static3D(-crawlW/2,0,0) );
425
        
427 426
        mBackground = mScreen.attach(mCrawlBackgroundTexture, mCrawlBackgroundEffects,mQuad);
428 427
        mBackground.attach(mCrawlTexture, mCrawlEffects,mQuad);
429 428
        mBackground.glDisable(GLES30.GL_DEPTH_TEST);

Also available in: Unified diff