Revision b24e4719
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/effect/VertexEffectWave.java | ||
---|---|---|
42 | 42 |
*/ |
43 | 43 |
public boolean compute(float[] uniforms, int index, long currentDuration, long step ) |
44 | 44 |
{ |
45 |
mCenter.get(uniforms,index+5,currentDuration,step);
|
|
46 |
mRegion.get(uniforms,index+8,currentDuration,step);
|
|
45 |
mCenter.get(uniforms,index+CENTER_OFFSET,currentDuration,step);
|
|
46 |
mRegion.get(uniforms,index+REGION_OFFSET,currentDuration,step);
|
|
47 | 47 |
boolean ret = mWave.get(uniforms,index,currentDuration,step); |
48 | 48 |
|
49 | 49 |
uniforms[index+2] = (float)(Math.PI*uniforms[index+2]/180); |
50 | 50 |
uniforms[index+3] = (float)(Math.PI*uniforms[index+3]/180); |
51 | 51 |
uniforms[index+4] = (float)(Math.PI*uniforms[index+4]/180); |
52 |
uniforms[index+9] =-uniforms[index+9]; |
|
52 |
|
|
53 |
uniforms[index+REGION_OFFSET+1] =-uniforms[index+REGION_OFFSET+1]; // region's y |
|
53 | 54 |
|
54 | 55 |
return ret; |
55 | 56 |
} |
Also available in: Unified diff
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.