Revision 457bd08e
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/library/effect/VertexEffectRotate.java | ||
---|---|---|
94 | 94 |
|
95 | 95 |
+ "n.x = qw*nx + qz*ny - qy*nz - qx*nw; \n" |
96 | 96 |
+ "n.y = qw*ny - qz*nx - qy*nw + qx*nz; \n" |
97 |
+ "n.z = qw*nz - qz*nw + qy*nx - qx*ny; \n"; |
|
97 |
+ "n.z = qw*nz - qz*nw + qy*nx - qx*ny; \n" |
|
98 |
|
|
99 |
+ "n = normalize(n);"; |
|
98 | 100 |
} |
99 | 101 |
|
100 | 102 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Bugfix: always normalize the normal vector after modifying it, otherwise the next effect might not work correctly (Distort!)