Revision 457bd08e
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/library/effect/VertexEffectQuaternion.java | ||
---|---|---|
78 | 78 |
|
79 | 79 |
+ "n.x = qw*nx + qz*ny - qy*nz - qx*nw; \n" |
80 | 80 |
+ "n.y = qw*ny - qz*nx - qy*nw + qx*nz; \n" |
81 |
+ "n.z = qw*nz - qz*nw + qy*nx - qx*ny; \n"; |
|
81 |
+ "n.z = qw*nz - qz*nw + qy*nx - qx*ny; \n" |
|
82 |
|
|
83 |
+ "n = normalize(n);"; |
|
82 | 84 |
} |
83 | 85 |
|
84 | 86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Bugfix: always normalize the normal vector after modifying it, otherwise the next effect might not work correctly (Distort!)