Project

General

Profile

« Previous | Next » 

Revision 457bd08e

Added by Leszek Koltunski over 3 years ago

Bugfix: always normalize the normal vector after modifying it, otherwise the next effect might not work correctly (Distort!)

View differences:

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