Revision 457bd08e
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/library/effect/VertexEffectDeform.java | ||
---|---|---|
145 | 145 |
+ "v.z += force.z*d*d*(3.0*d*d -8.0*d +6.0); \n" // thick bubble |
146 | 146 |
+ "float b = -(12.0*force.z*d*(1.0-d)*(1.0-d)*(1.0-d))*one_over_denom; \n" |
147 | 147 |
|
148 |
+ "n.xy += n.z*b*ps.xy;"; |
|
148 |
+ "n.xy += n.z*b*ps.xy; \n" |
|
149 |
+ "n = normalize(n);"; |
|
149 | 150 |
} |
150 | 151 |
|
151 | 152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Bugfix: always normalize the normal vector after modifying it, otherwise the next effect might not work correctly (Distort!)