Project

General

Profile

« Previous | Next » 

Revision b24e4719

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/library/effect/VertexEffectDistort.java
40 40
 */
41 41
  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
42 42
    {
43
    mCenter.get(uniforms,index+5,currentDuration,step);
44
    mRegion.get(uniforms,index+8,currentDuration,step);
43
    mCenter.get(uniforms,index+CENTER_OFFSET,currentDuration,step);
44
    mRegion.get(uniforms,index+REGION_OFFSET,currentDuration,step);
45 45
    boolean ret = mVector.get(uniforms,index,currentDuration,step);
46 46

  
47 47
    uniforms[index+1] =-uniforms[index+1];
48
    uniforms[index+9] =-uniforms[index+9];
48
    uniforms[index+REGION_OFFSET+1] =-uniforms[index+REGION_OFFSET+1];  // region's y
49 49

  
50 50
    return ret;
51 51
    }

Also available in: Unified diff