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/VertexEffectSink.java
43 43
 */
44 44
  public boolean compute(float[] uniforms, int index, long currentDuration, long step )
45 45
    {
46
    mCenter.get(uniforms,index+5,currentDuration,step);
47
    mRegion.get(uniforms,index+8,currentDuration,step);
46
    mCenter.get(uniforms,index+CENTER_OFFSET,currentDuration,step);
47
    mRegion.get(uniforms,index+REGION_OFFSET,currentDuration,step);
48 48
    boolean ret = mSink.get(uniforms,index,currentDuration,step);
49 49

  
50
    uniforms[index+9] =-uniforms[index+9];
50
    uniforms[index+REGION_OFFSET+1] =-uniforms[index+REGION_OFFSET+1];  // region's y
51 51

  
52 52
    return ret;
53 53
    }

Also available in: Unified diff