Project

General

Profile

« Previous | Next » 

Revision 1585ba24

Added by Leszek Koltunski over 5 years ago

Make the Fragment effects truly 3D: change their 4D 'region' into a 3D 'center' (a point in 3D) and 3D 'region' (which is now a set of 3 radii defining an ellipsoid around the center)

Also corresponding changes to the applications.

View differences:

src/main/java/org/distorted/examples/catanddog/CatAndDogRenderer.java
75 75
      moveDyn.add(mMove);
76 76
      moveDyn.add(new Static3D(0,0,0));
77 77

  
78
      Static4D chromaRegion= new Static4D( 530, 200,100,100);
79
      Static4D alphaRegion = new Static4D( 230, 200,100,100);
78
      Static3D chromaCenter= new Static3D( 530, 200, 0   );
79
      Static3D chromaRegion= new Static3D( 100, 100, 100 );
80
      Static3D alphaCenter = new Static3D( 230, 200, 0   );
81
      Static3D alphaRegion = new Static3D( 100, 100, 100 );
80 82

  
81 83
      Dynamic1D chromaDyn = new Dynamic1D(3000,0.0f);
82 84
      chromaDyn.add(new Static1D(1));
......
92 94
      diRotate.add(new Static1D(360));
93 95

  
94 96
      mEffects = new DistortedEffects();
95
      mEffects.apply( new FragmentEffectChroma( chromaDyn, new Static3D(1,0,0), chromaRegion ,true) );
96
      mEffects.apply( new FragmentEffectAlpha(alphaDyn, alphaRegion, false) );
97
      mEffects.apply( new FragmentEffectChroma( chromaDyn, new Static3D(1,0,0), chromaCenter, chromaRegion ,true) );
98
      mEffects.apply( new FragmentEffectAlpha(alphaDyn, alphaCenter, alphaRegion, false) );
97 99
      mEffects.apply( new MatrixEffectMove(moveDyn));
98 100
      mEffects.apply( new MatrixEffectScale(diScale));
99 101
      mEffects.apply( new MatrixEffectRotate( diRotate, new Static3D(0,0,1), mRotate) );

Also available in: Unified diff